AI code sandboxes
Agents write code, and that code has to run somewhere that isn't your laptop or your production box. A code sandbox gives each task its own isolated machine with a shell, a filesystem and a network, and throws it away or pauses it when the job is done. E2B, Vercel Sandbox, Cloudflare and Runloop isolate with microVMs. Modal uses gVisor or a full VM. Daytona gives every sandbox its own kernel and adds Windows, macOS and GPUs. Buddy keeps one machine around for as long as you want it. E2B is the one whose runtime is open source and self-hostable today. 7 tools, in the order they appear in the directory. This is not a ranking.
Grouped by job: Agent Safety & MCP Security · Claude Code Tools · AI Agent Infrastructure
Buddy Sandboxes
Persistent Linux VM sandboxes for AI coding agents from Buddy: Ubuntu with passwordless sudo, Docker, SSH, a 50 GB disk that survives restarts, public HTTPS endpoints and snapshots, up to 12 vCPU and 24 GB of RAM, driven from a CLI, TypeScript SDK, REST API or MCP tool call. $0.0144 per vCPU-hour plus $0.0144 per GB of RAM an hour, billed by the minute.
E2B
Open-source (Apache-2.0) cloud sandboxes for AI agents: each sandbox is a Firecracker microVM that resumes from a snapshot, driven from the Python or JavaScript SDK, with a Code Interpreter SDK for running model-written code. The runtime can be self-hosted on your own hardware. Hobby is free with a one-time $100 credit; Pro is $150 a month plus per-second usage.
Daytona
Sandboxes for AI-generated code, each with its own kernel, filesystem and network: Linux, Windows, macOS and GPU machines built from OCI images or snapshots, with volumes, computer use and an MCP server, driven from SDKs for Python, TypeScript, Ruby, Go and Java. Runs on Daytona's cloud or your own compute. Pay per second, with $200 of free compute.
Modal Sandboxes
Sandboxes on Modal's serverless cloud for running untrusted or LLM-written code, created from Python, JavaScript or Go: gVisor isolation, or a VM with its own Linux kernel when you need Docker or FUSE, plus GPUs, custom images, volumes, filesystem snapshots and runs of up to 24 hours. Billed per second; the Starter plan includes $30 of compute a month.
Vercel Sandbox
Firecracker microVM sandboxes on Vercel for running untrusted or agent-written code, from a JavaScript or Python SDK or the CLI: Node.js, Python and coding agents in the default image or your own OCI image, Docker inside, persistent sandboxes, snapshots and drives. CPU is billed only while active, with a free monthly quota on Hobby.
Cloudflare Sandbox SDK
Open-source (Apache-2.0) SDK for per-user or per-task Linux sandboxes started from your Worker: each sandbox is a Durable Object plus a Container, a microVM with its own kernel and network, and @cloudflare/sandbox adds file streaming, S3 bucket mounts and directory backups to R2. Needs the $5 Workers Paid plan.
Runloop
Devboxes for AI agents: micro-VM sandboxes with a VM and a container as two layers of isolation, on arm64 or x86, with full Docker support, snapshots you can branch from, suspend and resume, and browser and computer use. Python and TypeScript SDKs (MIT). Free plan plus usage with a $50 trial credit; Pro is $250 a month; Enterprise deploys into your own AWS, GCP or Azure.
What it is, where it runs, what it costs.
Straight from each vendor's own pages. Plans move often, so the check date is below.
| Tool | What it is | Runs on | Open source | Price |
|---|---|---|---|---|
| Buddy Sandboxes | Persistent Linux VMs your agent keeps: a 50 GB disk that survives restarts, root with Docker, SSH, public HTTPS endpoints, snapshots, auto stop and start. | Buddy's cloud, Ubuntu 22.04 or 24.04, from 1 vCPU and 2 GB up to 12 vCPU and 24 GB. CLI, TypeScript SDK, REST API or MCP. | No. | $0.0144 per vCPU-hour plus $0.0144 per GB of RAM an hour, billed by the minute, no monthly fee. Stopped sandboxes pay only for disk. |
| E2B | Firecracker microVM sandboxes that resume from a snapshot, with a Code Interpreter SDK for running model-written code. | E2B's cloud, from the Python or JavaScript SDK, 1 to 8 vCPU, no GPUs. The runtime can be self-hosted on your own hardware. | Yes, Apache-2.0 (SDKs and runtime). | Hobby $0 with a one-time $100 credit and 1-hour sessions. Pro $150/mo plus usage and 24-hour sessions. vCPU $0.000014/s. |
| Daytona | Sandboxes with their own kernel, filesystem and network, built from OCI images or snapshots, with volumes, computer use, SSH, VNC and an MCP server. | Daytona's cloud, or your own runner nodes with Bring Your Own Compute. Linux, Windows, macOS and GPU. SDKs for Python, TypeScript, Ruby, Go and Java. | SDKs Apache-2.0, CLI AGPL-3.0. Core moved to a private codebase in June 2026; the archived public code stays AGPL-3.0. | Pay per second: vCPU $0.0504/h, memory $0.0162/GiB-h, first 5 GiB of storage free. $200 of free compute, no card. |
| Modal Sandboxes | Sandboxes for untrusted code on Modal: gVisor containers, or a VM with its own kernel for Docker and FUSE, with GPUs, custom images, volumes and snapshots. | Modal's cloud, from the Python, JavaScript or Go SDK. 5 minutes by default, up to 24 hours per sandbox. GPUs on gVisor only. | No. The client SDK is Apache-2.0. | Per second: CPU $0.00003942/core, memory $0.00000667/GiB. Starter $0 with $30 of compute a month; Team $250/mo with $100. |
| Vercel Sandbox | Firecracker microVMs with Node.js, Python and coding agents in the default image or your own OCI image, Docker inside, persistent sandboxes, snapshots and drives. | Vercel, in 19 regions, from the JavaScript or Python SDK or the CLI. 45-minute sessions on Hobby, 24 hours on Pro. | SDK and CLI Apache-2.0; the service is Vercel's. | Hobby free: 5 active CPU hours, 420 GB-hours of memory and 5,000 creations a month. Pro $0.128 per active CPU hour, $0.0212/GB-hour (iad1). |
| Cloudflare Sandbox SDK | Per-user or per-task Linux sandboxes: a Durable Object starts a Container, and the SDK streams files, mounts S3 buckets and backs up directories to R2. | Cloudflare's network, behind your own Worker, using the image you provide. Dynamic Workers cover JS, Python and Wasm without a Linux box. | Yes, Apache-2.0 (the SDK; it runs only on Cloudflare). | Workers Paid $5/mo includes 375 vCPU-minutes and 25 GiB-hours of memory; then $0.000020/vCPU-s and $0.0000025/GiB-s, plus Workers and Durable Objects usage. |
| Runloop | Devboxes: micro-VM sandboxes with a container inside, full Docker support, snapshots you can branch from, suspend and resume, and browser and computer use. | Runloop's cloud on arm64 or x86, or your own AWS, GCP or Azure account on Enterprise. Python and TypeScript SDKs. | No. SDKs and CLI are MIT. | Basic free plus usage: $0.108/CPU-hour, $0.0252/GB-hour, $50 trial credit. Pro $250/mo plus usage. Enterprise custom. |
Checked 2026-10-31. Sources: Buddy Sandboxes, E2B pricing, E2B SDK on GitHub, E2B runtime on GitHub, Daytona pricing, Daytona docs, Daytona on GitHub, Daytona SDKs on GitHub, Modal Sandboxes guide, Modal pricing, Vercel Sandbox pricing, Vercel Sandbox SDK on GitHub, Cloudflare Sandboxes docs, Cloudflare Containers pricing, Cloudflare Sandbox SDK on GitHub, Runloop pricing, Runloop Python SDK on GitHub.
Pick it if.
- E2BYou want an open-source sandbox you can start on someone else's cloud and later run on your own hardware.
- DaytonaYour agent needs more than Linux: Windows, macOS or a GPU, or SDKs in Ruby, Go or Java.
- Modal SandboxesAgent code needs GPUs, or your Python jobs already run on Modal.
- Vercel SandboxYour app lives on Vercel and your agent spends most of its time waiting on a model rather than using CPU.
- Cloudflare Sandbox SDKYou build on Workers and want one sandbox per user or session, with backups going to R2.
- RunloopYou run many coding agents and want to snapshot, branch and resume their machines on arm64 or x86.
- Buddy SandboxesYou want a machine your agent keeps for days, with SSH and a public URL, not a container on a timer.
Each listing.
The directory page, alternatives in the same category, and a head-to-head where we have one.
- Buddy SandboxesAlternatives
- E2BAlternatives
- DaytonaAlternatives
- Modal SandboxesAlternatives
- Vercel SandboxAlternatives
- Cloudflare Sandbox SDKAlternatives
- RunloopAlternatives
Category pages list every tool in that category, including ones left off this page. Built one of these? Get it featured in its category.
The 2 biggest AI stories, every morning.
One short email: the two stories that matter, and why.
You're in.
The Daily AI Brief will land in your inbox soon. If you don't see it, check Promotions or Spam and move it to your main inbox.