Which sandbox is best for AI agents?
It depends on how your agent spends its time. For agents that mostly wait on a model, Runtime has the lowest bill: $0.64 for the job below, against $1.11 to $5.33 elsewhere. It bills measured CPU, not held vCPUs, and pause keeps memory and processes. Pick Northflank for always-busy CPUs, Modal or Daytona for GPUs, E2B to host it yourself, Vercel Sandbox or Fly.io for many regions, Cloudflare Sandbox beside a Worker, Morph for many copies of one running machine and Runloop for evaluation on your own workload.
Which sandbox fits each need?
| If you need | Pick | Why |
|---|---|---|
| The lowest bill for agents that wait on a model | Runtime Cloud | 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 17; 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 |
| Evaluation on your own workload | Runloop | Evaluates models against your workload and generates RL rollouts |
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.
| # | Provider | Isolation | CPU billed on | 1,000 runs |
|---|---|---|---|---|
| 1 | Runtime Cloud | Firecracker microVM, own kernel | Measured CPU, with a small floor | $0.64 |
| 2 | Northflank | microVMs; gVisor for some 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.
Which sandbox starts fastest?
Providers' published start times rarely say where they were timed from or at what percentile, so time the steps your agent takes yourself, from where it runs. For an agent, the wake matters as much as the create: a paused sandbox should come back with its memory and processes as they were. Runtime times every operation from outside each minute, and speed lists an operation once it is within 2× of its floor. What cold start benchmarks leave out shows how to time them yourself.
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.
- No session limit. A long task should run while it works, not end at a fixed number of minutes.
- 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. Enough vCPUs and memory per sandbox, and enough sandboxes running at the same time, for the busiest hour.
The full checklist is in how to choose a sandbox for AI agents.
Runtime Cloud
Runtime runs each agent in a Firecracker microVM with its own Linux kernel and charges for measured CPU, never below a twentieth of a vCPU, so while the agent waits on its model it pays for memory and a small CPU floor, not for idle vCPUs. That is why it is first in the ranking above: the job costs $0.64 on Runtime, and the fourteen others cost $1.11 to $5.33, at their published rates checked 25 October 2026.
A paused Runtime sandbox runs its next command with its memory and processes as they were.
Against the checklist above:
- It pauses a sandbox by itself after 300 seconds with nothing happening.
- A sandbox runs while it works, on prepaid credit from $10 with no plan fee.
- Up to 16 vCPUs and 64 GiB per sandbox, 100 running at the same time on a paid account.
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 17.
- 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 in the first 30 days, no card. One call starts a sandbox:
TypeScriptimport { 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). Leaving a particular provider? Its alternatives page ranks the rest from its side: E2B, Daytona, Modal or Vercel Sandbox. The same jobs, dated and downloadable, are in the agent sandbox price index.
To start free, run npx withruntime login. To move an agent you already run
elsewhere, follow the migration guide.
Sources
- Each provider's published rates, as the pricing guide lists them with links
- E2B, Modal and Vercel Sandbox comparisons: self-hosting, GPUs and regions
- E2B alternatives: what each provider adds, with its pricing page
- Runtime's own figures: speed, pricing and limits