cloudflare/sandbox-sdk
Run sandboxed code environments on Cloudflare's edge network
What it solves
Cloudflare Sandbox SDK provides a secure way to execute untrusted code in isolated containers at the edge. It eliminates the need for managing complex infrastructure for applications that require dynamic code execution, such as AI code interpreters, interactive development environments (IDEs), and CI/CD pipelines.
How it works
The SDK allows Cloudflare Workers applications to spawn and manage isolated containers. Developers can use the SDK to execute shell commands, read and write files to a persistent workspace, and expose internal container services to the public internet via zero-config tunnels (*.trycloudflare.com URLs).
Who it’s for
Developers building AI agents with code execution capabilities, data analysis platforms, and tools that require secure, ephemeral or persistent code execution environments on Cloudflare's global network.
Highlights
- Secure Isolation: Each execution environment runs in its own dedicated container.
- Edge-Native: Integrated directly with Cloudflare Workers and Durable Objects.
- Code Interpreter Capabilities: Native support for executing Python and JavaScript with rich output capture.
- Quick Tunnels: Instantly expose services running inside the sandbox to the web without DNS configuration.
- File System Access: Full ability to manage files within the sandbox workspace.
- Git Integration: Ability to clone repositories directly into the environment.