sandbox option on defineAgent(). Pass defineSandbox({ files }) to copy a set from src/files/ into the agent’s /workspace/agent directory before each prompt, where the agent can read them like local files.
Use the agent’s own set
The simplest case:files: true on defineSandbox() uses the file set whose folder name matches the agent’s slug.
src/agents/support.ts
src/files/support/. If it doesn’t exist, the agent fails to build with an “unknown file set” error.
Use a named set
Pass a string to use a different set, useful when several agents share the same documents:src/files/{name}/ and can be attached to any number of agents.
Where files land at runtime
The set’s folder layout is preserved under/workspace/agent:
systemPrompt so the agent knows they’re there:
Verify it
After deploying, prompt the agent and confirm it’s using the files:Next steps
Files overview
What files are and how they differ from skills.
Attach skills to agents
Add reusable playbooks alongside files.
Build agents
Configure models, tools, skills, and files.
Run agents
Prompt agents and inspect their sessions.