Skip to main content
Give every agent in a team or workflow one shared /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.

How It Works

The sandbox is provisioned lazily on first tool use and torn down when the run ends.

Configuration Options

Set compute= 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.
Run one shared sandbox across a parallel fan-out — three branches, one sandbox.
Agents inside nested containers — route, repeat, when, loop, if — all bind to the same sandbox automatically.
Each agent is attached exactly once, even if it appears in multiple containers. Custom image or resources — pass a pre-configured provider instance.

Best Practices

Per-agent compute (LocalAgent(compute=...)) gives each agent its own isolated instance, so files written by one agent are invisible to the next. Set compute= on AgentFlow or AgentTeam when agents need the same /workspace.
The default is zero-overhead — nothing is provisioned. Only set compute= when a run actually shares files or shell state across agents.
All steps share the same instance. Size the image, CPU, and memory for the heaviest step, since it affects the whole run.
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.
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.

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.