dcode process(LLM loop、memory、tool dispatch)在你的机器上运行,但 agent tool calls(read_file、write_file、execute 等)会面向 remote sandbox,而不是你的 local filesystem。若要将 files 放入 sandbox,请使用 setup script 或 provider 的 file transfer APIs(请参阅 Working with files)。
若要深入了解 sandbox architecture、integration patterns 和 security best practices,请参阅 Sandboxes。
安装 provider dependency
- LangSmith
- Daytona
- Modal
- Runloop
- AgentCore
安装
deepagents-code 时默认包含。无需额外安装。all-sandboxes extra:uv tool install 'deepagents-code[all-sandboxes]'。Sandbox flags 和 examples
| Flag | Description |
|---|---|
--sandbox TYPE | 要使用的 sandbox provider:langsmith、agentcore、modal、daytona 或 runloop(default:none) |
--sandbox-id ID | 通过 ID 复用现有 sandbox,而不是创建新 sandbox。跳过 creation 和 cleanup。更多信息请参阅你的 sandbox documentation |
--sandbox-snapshot-name NAME | 使用或创建 sandbox snapshot(仅 LangSmith)。不能与 --sandbox-id 组合使用 |
--sandbox-setup PATH | Sandbox 创建后要在其中运行的 setup script path |
execute commands 会从此 directory 运行:
| Provider | Working directory |
|---|---|
| LangSmith | /root |
| Daytona | /home/daytona |
| Modal | /workspace |
| Runloop | /home/user |
| AgentCore | /tmp |
Setup scripts
使用--sandbox-setup 在 sandbox 创建后在其中运行 shell script。这适用于 clone repos、安装 dependencies 和配置 environment variables。
setup.sh
${VAR} references。将 secrets 存储在 local .env file 中,供 setup script 访问。
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

