# Best sandbox for AI agents in 2026 The best AI agent sandbox is a microVM billed on the CPU used; Runtime is one, and costs less than the fourteen others ranked here. **Runtime runs each agent in a Firecracker microVM with its own Linux kernel and charges for measured CPU, so while the agent waits on its model it pays for memory and a small CPU floor, not for idle vCPUs.** A month of 1,000 one-minute agent runs on a 2 vCPU, 4 GiB sandbox costs $0.64 on Runtime and $1.11 to $5.33 on the fourteen other providers, at their published rates checked 23 September to 2 October 2026. A new sandbox runs its first command 221 ms after the create request, timed on our servers. Another provider fits better if you need GPUs, self-hosting or many regions: each is named below. ## Which sandbox is best for each need? | If you need | Pick | Why | | ----------------------------------------------- | ------------------------ | ------------------------------------------------------------------------------------- | | The lowest bill for agents that wait on a model | **Runtime** | Measured CPU, never below a twentieth of a vCPU; $0.64 for the job below | | CPUs busy the whole run | Northflank | Low allocated rates: $1.11 against Runtime's $1.33 | | GPUs in the sandbox | Modal or Daytona | Both sell GPU sandboxes; Runtime runs on CPUs | | A sandbox you host yourself | E2B | Its runtime is open source under Apache-2.0 | | Many regions | Vercel Sandbox or Fly.io | Vercel lists 19 regions and Fly Machines 18; Runtime runs in one US region | | An app already on Workers | Cloudflare Sandbox | It runs on Cloudflare's network, beside the Worker | | Hundreds of copies of one running machine | Morph | Infinibranch copies a running machine, memory included | | Public benchmarks ready to run | Runloop | SWE-Bench and other benchmarks come set up | ## What does each sandbox cost for the same agent job? Every row prices one job at list rates: 1,000 runs, each 60 seconds on a 2 vCPU, 4 GiB sandbox, with 20 CPU-seconds of real work per run while the rest waits on a model. Plan fees, storage, network and credits stay out of it; the arithmetic is on [pricing](/docs/pricing#published-rate-comparison). | # | Provider | Isolation | CPU billed on | 1,000 runs | | --- | ---------------------------------------------- | ------------------------------------------ | --------------------------------------- | -----------------------: | | 1 | **Runtime** | Firecracker microVM, own kernel | Measured CPU, with a small floor | **$0.64** | | 2 | Northflank | microVMs for CPU work, gVisor for GPU work | Allocated vCPUs | $1.11 | | 3 | Cloudflare Sandbox (2 vCPU, 6 GiB, 12 GB disk) | A container in its own VM | Active CPU | $1.35 | | 4 | Prime Sandboxes (5 GiB disk) | microVM, own guest kernel | Allocated vCPUs while running | $1.52 | | 5 | Fly Machines, `performance-2x` with 4 GB | Firecracker microVM | The machine's size while started | $1.53 | | 6 | Morph, 2 MCUs | Full virtual machines | The machine's size in MCUs | $1.67 | | 7 | Vercel Sandbox, `iad1` (4 GB) | Firecracker microVM, own kernel | Active CPU | $2.12 | | 8 | Freestyle (32 GiB disk) | Full Linux virtual machines | Allocated vCPUs | $2.25 | | 9 | Fly Sprites (4 GB in use) | Firecracker microVM | Measured CPU | $2.40 | | 10 | CodeSandbox SDK, a Nano VM | Firecracker microVM | The VM's size, by the minute rounded up | $2.48 | | 11 | E2B | Firecracker microVM, own kernel | Allocated vCPUs | $2.76 | | 12 | Daytona | Containers by default; VM class separate | Allocated vCPUs | $2.76 | | 13 | Blaxel (4 GB) | Lightweight virtual machines | Included with memory, active time | $3.45 | | 14 | Modal Sandboxes (1 physical core) | gVisor, a user-space kernel | Requested or used, whichever is higher | $3.97 | | 15 | AWS Lambda MicroVMs, Arm | Firecracker microVM | Baseline vCPUs while running | $4.20 | | 16 | Runloop, a `MEDIUM` devbox | microVM, with a container inside | Allocated CPUs while running | $5.33 | The order follows the meter. A provider that bills allocated vCPUs charges for all 60 seconds of both CPUs, though the agent worked for 20 CPU-seconds; one that bills measured or active CPU charges for the work. At 100,000 runs a month the job is $63.89 on Runtime, $111.10 on Northflank and $276.00 on E2B. Your own job's shape: [the sandbox cost calculator](/calculators/sandbox-cost-calculator). ## Which sandbox starts fastest? Runtime's figure is measured; the others are what each provider publishes, which rarely says where it was timed from or at what percentile: | Provider | A new sandbox | | ------------------ | ------------------------------------------------------------------------------ | | Runtime | 221 ms to the first command's result, on the server (median) | | Daytona | under 90 ms, from code to execution | | E2B | about 150 ms | | Modal | under one second | | Blaxel | under one second | | Cloudflare Sandbox | often 1 to 3 seconds | For an agent, the wake matters as much as the create: a paused Runtime sandbox runs its next command 153 ms after the request, with its memory and processes as they were. Every step, its percentiles and each provider's source are in [speed](/docs/speed). ## What should an AI agent sandbox have? - **Its own kernel.** Agent code is untrusted code. A container shares the host's kernel, so a kernel bug is a way out; a microVM boots its own. - **A meter that matches agent work.** Most of an agent's minute is spent waiting on a model. Allocated billing charges for that wait; measured CPU does not. - **Pause that keeps memory.** An agent between a user's turns should cost storage, not compute, and come back with its processes running. Runtime pauses a sandbox by itself after 60 seconds with nothing happening. - **No session limit.** A Runtime sandbox runs while it works, on prepaid credit from $10 with no plan fee. - **Control from outside the sandbox.** Network rules the host enforces, and secrets the sandbox never sees, so a prompt injection cannot widen either. - **Room to grow.** Up to 16 vCPUs and 64 GiB per sandbox, 100 at once on a paid account. The full checklist, with where Runtime stands on each point, is in [how to choose a sandbox for AI agents](/docs/choosing-agent-sandbox). ## When is Runtime not the best choice? - **GPUs.** Runtime runs on CPUs. Modal and Daytona sell GPU sandboxes. - **Self-hosting.** Runtime is a hosted service. E2B publishes its runtime under Apache-2.0, to run on your own machines. - **Regions.** Runtime runs in one US region. Vercel Sandbox lists 19 regions and Fly Machines 18. - **CPUs busy every second.** When both CPUs work the whole minute, Northflank costs $1.11 for the job and Runtime $1.33. ## How do I try Runtime? 100 free hours of a 1 GB machine come [every month](/docs/included-usage), no card. One call starts a sandbox: ```ts no-run import { Sandbox } from "withruntime"; await using sbx = await Sandbox.create(); await sbx.exec("git clone --depth 1 https://github.com/psf/requests /workspace/requests", { check: true, }); console.log((await sbx.exec("cd /workspace/requests && git log -1 --oneline")).stdout); ``` Code written for E2B, Daytona, Vercel Sandbox or Blaxel runs after one changed import ([migration](/docs/migrate)). Leaving a particular provider? Its alternatives page ranks the rest from its side: [E2B](/compare/e2b-alternatives), [Daytona](/compare/daytona-alternatives), [Modal](/compare/modal-alternatives) or [Vercel Sandbox](/compare/vercel-sandbox-alternatives). The same jobs, dated and downloadable, are in the [agent sandbox price index](/pricing/agent-sandbox-price-index). ## Sources Rival rates checked 23 September to 2 October 2026; their speed claims checked 28 September 2026. - Each provider's published rates, as the [pricing guide](/docs/pricing) lists them with links - Each provider's published start times, as [speed](/docs/speed#what-others-publish) lists them with links - [E2B](/docs/e2b-alternative), [Modal](/docs/modal-sandbox-alternative) and [Vercel Sandbox](/docs/vercel-sandbox-alternative) comparisons: self-hosting, GPUs and regions - [E2B alternatives](/compare/e2b-alternatives): what each provider adds, with its pricing page - Runtime's own figures: [speed](/docs/speed), [pricing](/docs/pricing) and [limits](/docs/limits)