Home / What is an agent sandbox?
What is an agent sandbox?
An agent sandbox is an isolated computer that an AI agent uses to run code. The agent starts it through an API or SDK. It installs packages, runs commands and edits files there, away from your own machine, data and credentials. When the task ends, the sandbox stops or is deleted.
Developers also call it an AI sandbox or an AI code sandbox. Coding agents, data-analysis agents and code interpreters use one for each task or user.
Agent sandboxes in numbers (2026-11-15)
- We rate 63 agent sandboxes with one published method.
- 46 (73%) give each sandbox its own kernel in a microVM or VM.
- 46 (73%) can pause a sandbox and resume it later with its memory or disk.
- Of the 51 hosted services, 16 give a free allowance every month and 26 give a one-time credit or trial. The other 12 are software you run yourself.
- Median list price: $26.22 a month for 2 vCPU, 4 GiB, 176 hours a month (8 h × 22 days), CPU busy 30%. Cheapest: Agent37 Cloud at $1.06.
- Fastest start in the ComputeSDK benchmarks test (2026-11-13): Isorun. Burst start time (median of 100 at once): 96 ms.
Why AI agents need a sandbox
- Model-written code can be wrong or harmful. A sandbox keeps it away from your servers and files.
- Prompt injection can make an agent run commands that an attacker wrote. A sandbox limits what those commands can reach.
- Each user or task gets a clean machine, so one run cannot read or break another.
- You can limit network access, CPU, memory and run time, and delete the sandbox at the end.
Isolation types
Isolation is the most important safety fact. It decides how hard it is for code to escape to the host.
| Isolation | How it works | Rated providers |
|---|---|---|
| microVM | Each sandbox has its own kernel in a light VM (for example Firecracker). The strongest common isolation for untrusted code. | 38 |
| virtual machine | Each sandbox is a full virtual machine with its own kernel. Strong isolation, often slower to start. | 8 |
| sandboxed container (gVisor or similar) | A container with a user-space kernel between the code and the host kernel. Stronger than a plain container. | 5 |
| V8 or WebAssembly isolate | A V8 or WebAssembly isolate. Very fast to start, but it runs only some languages and has no full Linux system. | 2 |
| container | A container that shares the host kernel. Fast and cheap, but a kernel bug can let code escape. | 4 |
| OS-level process sandbox | An operating-system sandbox around one process on your own machine. | 2 |
Agent sandbox, dev box, browser sandbox: the difference
How to choose an agent sandbox
- Pick the isolation you need. Use a microVM or VM for code from users or from the internet.
- Check the start time if your agent starts many sandboxes. See public benchmarks.
- Check the session limit and pause and resume if tasks run for hours.
- Price your own workload in the cost calculator. For the same workload, list prices go from $1.06 to $83.36 a month.
- Check SDK languages, regions, custom images and network controls. The workload picker filters on these.
Top-rated agent sandboxes
| # | Provider | Score | List price per month | Free tier | Isolation | Upvotes |
|---|---|---|---|---|---|---|
| 1 | Isorun KVM microVMs from any OCI image, billed per second for vCPU and RAM, with hibernate, fork and persistent disks. | 78 | $19.36 | Credit or trial | microVM | 0 |
| 2 | Northflank MicroVM sandboxes on Northflank's container platform, billed per second for CPU and memory, on its cloud or yours. | 78 | $11.73 | Monthly | microVM | 0 |
| 3 | Koyeb Sandboxes MicroVM sandboxes on Koyeb's serverless platform, billed per second at Koyeb instance prices, with CPU or GPU. | 76 | $10.14 | None | microVM | 0 |
| 4 | Lizard Sandboxes Firecracker microVM sandboxes at flat per-size hourly prices from $0.0081 for 1 vCPU / 2 GB, billed per second. | 76 | $19.00 | Credit or trial | microVM | 0 |
| 5 | Tensorlake Sandboxes Firecracker microVM sandboxes billed on active CPU time (20% floor), with suspend/resume, snapshots and SSH. | 76 | $17.95 | Monthly | microVM | 0 |
| 6 | Vercel Sandbox Firecracker microVMs on Vercel, billed for active CPU time plus provisioned memory. | 76 | $28.44 | Monthly | microVM | 0 |
| 7 | InstaBox Persistent Firecracker Linux machines for agents, billed per second while running, with plan fees returned as credit. | 75 | $20.00 | Monthly | microVM | 0 |
| 8 | MIOSA Firecracker sandboxes, persistent desktop computers and deployments from one API, billed per second by machine size. | 75 | $20.00 | Monthly | microVM | 0 |
| 9 | Archil Firecracker sandboxes whose root filesystem lives on a durable Archil disk, plus per-call serverless tool runs. | 74 | $33.44 | Monthly | microVM | 0 |
| 10 | Mosaic Sandbox Firecracker microVMs at a flat $0.05 per active hour for 2 vCPU / 4 GB, free while hibernated, with native SSH. | 74 | $8.80 | None | microVM | 0 |
All 63 agent sandboxes ranked →
Questions
What is an agent sandbox?
An agent sandbox is an isolated computer that an AI agent uses to run code, install packages, use files and run commands. It keeps the code away from your own machine, data and credentials. The agent starts it through an API or SDK, uses it for seconds to hours, and then stops or deletes it.
Is an agent sandbox the same as an AI sandbox?
Often, yes. Developers use "AI sandbox", "AI code sandbox" and "agent sandbox" for the same product. "AI sandbox" also names regulatory and research programs for AI, which are not compute products.
Why does an AI agent need a sandbox?
Model-written code can be wrong or unsafe, and prompts can be manipulated. A sandbox limits what that code can reach: the network, files, secrets and other users. If something goes wrong, you delete the sandbox.
Which isolation is safest for an agent sandbox?
A microVM or full VM, because each sandbox gets its own kernel. 46 of the 63 agent sandboxes we rate (73%) use a microVM or VM. Containers share the host kernel, so they are weaker for untrusted code.
How much does an agent sandbox cost?
For 2 vCPU, 4 GiB, 176 hours a month (8 h × 22 days), CPU busy 30%, the median list price is $26.22 a month across 46 priced providers (checked 2026-11-15). The cheapest is Agent37 Cloud at $1.06. 16 hosted providers give a free allowance every month.
What is the best agent sandbox?
Isorun, with 78/100 on our published method (checked 2026-11-15). Isorun scores 78/100, #1 of 63 AI agent sandboxes. Strong on isolation, persistence, docs and SDKs, external benchmarks. Best for: Short code-execution runs from any Docker image with per-second billing and no minimum.