Cloudflare Sandbox SDK
Code executionApache-2.0
Cloudflare Sandbox SDK runs untrusted or generated code in an isolated Linux environment that belongs to one user, task or session. Each sandbox is a Durable Object that starts a Cloudflare Container, and the @cloudflare/sandbox package adds file transfer, bucket mounts and directory backups. The page lists uses such as agent-written code, user-uploaded applications, data analysis, development previews and build pipelines. Credentials can stay in the Worker and outbound network access can be restricted.
For JavaScript or Python without a Linux environment, the README points to Dynamic Workers, which create a Worker at runtime.

Pinout
- MCP server: not checked yet
- HTTP API: not checked yet
- command line: not checked yet
- Python SDK: not checked yet
- TypeScript SDK: supported, verified
- OpenAPI description: not checked yet
| Interface | Status | Source we read | Read on |
|---|---|---|---|
| MCP server | Not checked yet | — | — |
| HTTP API | Not checked yet | — | — |
| Command line | Not checked yet | — | — |
| Python SDK | Not checked yet | — | — |
| TypeScript SDK | Supported, verified | Cloudflare docs, Sandboxes, SDK languages | |
| OpenAPI description | Not checked yet | — | — |
Facts
| Purpose | Executes untrusted or generated code in Linux virtual machines or isolated Workers. Cloudflare docs, Sandboxes, read . |
|---|---|
| Isolation | Container sandboxes run as microVMs with their own kernel and network, started by a Durable Object. Cloudflare docs, Sandboxes, How it runs, read . |
| Package | The package is @cloudflare/sandbox and the page examples are TypeScript. Cloudflare docs, Sandboxes, SDK languages, read . |
| Uses | Agent-written code, user-uploaded apps, data analysis, development previews, build pipelines and running coding agents. Cloudflare docs, Sandboxes, read . |
| Pricing, plan | The page says it is available on the Workers Paid plan. Cloudflare docs, Sandboxes, Status, read . |
| Beta label | The Durable Object scheduling policy used by sandbox containers is in public beta. Cloudflare docs, Sandboxes, How it runs, read . |
| Repository features | Files, S3Mount for S3-compatible buckets and DirectoryBackup to R2. GitHub README, cloudflare/sandbox-sdk, Features, read . |
| Requirement | The Worker must enable the nodejs_compat flag. GitHub README, cloudflare/sandbox-sdk, Requirements, read . |
| License | Apache-2.0. Repository packages/sandbox/LICENSE file, read . |
| Last commit | . GitHub API, latest commit on the default branch of cloudflare/sandbox-sdk, read . |
Limits
- Building and testing the repository needs Node.js and Docker.
Strengths
- Credentials can stay in the Worker outside the sandbox.
- Outbound network access can be restricted.
- The repository is under Apache-2.0.
Pricing
As written on Cloudflare Sandbox SDK's own page on the read date. Prices change: check there before you pay.
Alternatives to Cloudflare Sandbox SDK
All code execution tools for agents
Isolated Linux sandboxes for running agent code through Python or JavaScript SDKs.

Hardware-isolated microVM sandboxes for agent code, local-first.

Isolated containers on Modal for running untrusted or LLM-generated code.

Open-source sandboxed code execution system with an HTTP API.
Last check: . Method: public repository and docs read automatically, page and day written down. Next check due within 90 days. How we check
Is this your tool? Write to hello@agent-tools.directory from an address on its domain to correct a pin or a fact.