sandbox option on defineAgent(). Pass defineSandbox({ files }) to copy paths from src/files/ into the agent’s /workspace/agent directory before each prompt, where the agent can read them like local files.
files accepts:
- A directory under
src/files/(a file set), as a string - One or more directories and/or specific files, as a string array
- Inline
{ path, file }entries when you seed content directly in code
Attach an entire file set
Pass a string to attach every file insrc/files/{name}/:
src/agents/support.ts
Attach multiple sets
Pass an array of set names when an agent needs several shared folders:/workspace/agent. If two sets contain the same relative path with different contents, resolve fails with a conflicting-path error.
Attach specific files
Pass paths relative tosrc/files/ to attach only those files (or a nested directory):
files: ["planetscale", "support/macros.md"].
Where files land at runtime
Paths are relative to the file set root (the top-level folder undersrc/files/):
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.