/workspace so a file written by step 1 is visible to step 2.
Without a shared sandbox, each agent provisions its own isolated instance, so agents cannot hand files to each other. Set compute= once on the flow or team and every agent shares the same filesystem.
Quick Start
1
Simplest Usage (AgentFlow)
Set
compute="docker" on the flow — every step runs its shell and file tools in one sandbox.2
AgentTeam
The same
compute= kwarg works on a team.3
Pick a Provider
Pass a provider name, or a pre-configured instance for custom image and resources.
- docker
- e2b
- modal
- daytona
- flyio
- tenki
- local
- custom instance
How It Works
The sandbox is provisioned lazily on first tool use and torn down when the run ends.Configuration Options
Setcompute= on AgentFlow (or its Workflow / Pipeline aliases) or on AgentTeam. Orchestration (route, parallel, repeat, when) stays local — only shell and file tools follow the sandbox.
Any other string raises
ValueError.
AgentFlow API Reference
The workflow orchestrator that accepts
compute=.Common Patterns
Hand a file between two agents — step 1 writes, step 2 reads the same/workspace.
route, repeat, when, loop, if — all bind to the same sandbox automatically.
Best Practices
Give the sandbox enough resources for the biggest step
Give the sandbox enough resources for the biggest step
All steps share the same instance. Size the image, CPU, and memory for the heaviest step, since it affects the whole run.
Don't mix compute= with agents that carry their own backend=
Don't mix compute= with agents that carry their own backend=
Backend-owning agents are deliberately skipped by the shared sandbox — they keep pointing at their own runtime. Use one approach or the other per agent.
Write any content with write_file — no escaping needed
Write any content with write_file — no escaping needed
Every call to
write_file uses a fresh random heredoc delimiter, so file bodies containing quotes, heredoc terminators, or shell fragments are written verbatim and never leak into the shell. You do not need to escape, quote, or sanitise content yourself.Related
Local Agent
Per-agent compute — one agent’s tools in a sandbox.
Sandboxed Agent
Per-agent compute — isolate a single agent’s tools.
AgentFlow
The workflow orchestrator.
AgentTeam
The team orchestrator.

