Sandbox
Claim isolated runtimes from templates, pause and resume work, expose ports, and run processes.
Use the Sandbox SDK when you want direct control over the runtime primitives: sandboxes, templates, volumes, credentials, files, processes, ports, webhooks, and network policy.
Prompt for your agent
Read https://sandbox0.ai/llms.txt and plan a Sandbox SDK integration for my AI agent backend. Cover sandboxes, volumes, files, processes, network policy, credentials, tests, and risks.
direct API
const sandbox = await client.sandboxes.claim("agent-dev", {
volumes: ["repo-cache"],
network: { egress: "policy" }
});
await sandbox.process.exec("npm", ["test"]);template
Images, resources, warm processes, defaults, and policy live in reusable templates.
sandbox
Run commands, REPLs, file operations, app servers, and agent tools inside isolated sandboxes.
volume
Mount, snapshot, restore, and fork durable storage independently from sandbox compute.
Direct primitives
The Sandbox SDK is for teams that want to own orchestration, but do not want to rebuild isolated execution, storage, and network control from scratch.
Claim isolated runtimes from templates, pause and resume work, expose ports, and run processes.
Package runtime images, resources, warm pools, volume mounts, and default policy.
Persist repositories, caches, checkpoints, and artifacts with snapshot, restore, and fork workflows.
Resolve and project outbound auth without placing raw secret material inside the agent process.
SDKs
Use Sandbox0 through SDKs and the CLI when you want to assemble your own session model, scheduler, workflow engine, or product-specific agent backend.
The preferred hand-written wrapper layer over the generated API client for backend services.
Use generated SDK surfaces for app servers, automation scripts, and agent-side tooling.
Use the CLI for local workflows, debugging, and operational access to sandboxes and volumes.
When to choose it
Some teams need to own the queue, session schema, approvals, tenant routing, or workflow graph. Sandbox0 gives them the execution substrate directly.
Build your scheduler, workflow engine, or product-specific session model above Sandbox0 primitives.
Run the exact command model, file pipeline, context lifecycle, and port exposure your agent needs.
Control templates, volume lifecycle, credential sources, egress rules, and cluster deployment shape.
Start with sandbox docs when you want direct runtime control, or use Managed Agents when you want the higher-level session API.