
One Word, Very Different Machines
My first sandbox for an agent’s work was a container, and waking an idle one took about 30 seconds. The sandboxes I run now start in 65 to 170 milliseconds, depending on the machine. The agents didn’t change. A handful of decisions underneath them did, and every platform that sells an “agent sandbox” has made those decisions differently:
| Platform | Isolation | Sleep keeps | Disk |
|---|---|---|---|
| E2B | microVM | memory and disk | block layers |
| Vercel | microVM | disk | disk images in S3 |
| Modal | gVisor or VM | nothing, unless you snapshot | images |
| Daytona | container or VM | disk; memory too on a VM | the runner, then a bucket |
| Cloudflare | microVM | nothing, unless you snapshot | a fresh disk per start |
| Fly Sprites | microVM | disk | a block device on a bucket |
| CubeSandbox | microVM | memory and disk | local XFS, JuiceFS optional |
Each column is one of the decisions below. They’re simplified, and the same word hides different things. “Snapshot” means a running machine’s memory on one platform and a copy of its files on another.
I build agents for work, and my agents build apps, and each app needs somewhere to run: isolated, because nobody has reviewed the code, and fast, because the agent is in a loop of writing, running and checking. I studied the options, then built a small self-hosted platform called soulvm on E2B’s open-source orchestrator. This post is the map I wish I’d had. It goes through the decisions every agent sandbox makes and what the main platforms chose, and the notes marked In soulvm say what I found when I made the same decisions myself.
What an Agent’s Computer Needs
| Requirement | Why |
|---|---|
| Starts in well under a second | the agent iterates: write, run, check, repeat |
| Isolation strong enough for untrusted code | the code is agent-written, and nobody has reviewed it |
| Disposable by default, keepable on demand | most runs are thrown away; a good one is kept |
| Cheap while idle | most agents, and most of what they build, sit idle |
| Reachable | a URL, to see what the agent built |
Six decisions shape how a platform meets these: how it isolates, how a sandbox starts, what sleeping keeps, where the disk lives, how traffic gets in and out, and how much control plane sits on top. A seventh, whether you rent or own it, cuts across all of them.
Decision 1: The Isolation Boundary
The question here is what a piece of malicious code has to break through to reach the host.
What sits between the agent’s code and the host kernel, in each design.
Containers are the cheapest and the weakest boundary: they share the host’s kernel, so a kernel vulnerability reachable from inside can become a host compromise. Hardening (seccomp filters, dropped capabilities, security modules) narrows what’s reachable, and no boundary removes the need for it. Daytona’s default class is a container with “dedicated namespaces and enforced resource limits”, and it offers a VM class with “its own kernel” when you need more.
gVisor puts a kernel written in Go, the Sentry, between the workload and the host, so most system calls never reach the host kernel. It doesn’t need hardware virtualization, which means it runs on any Linux machine, cloud VMs included. Modal, which runs tens of millions of gVisor containers a day, says it boots a sandbox in about 25 ms with 12 MB of overhead.
MicroVMs give each sandbox its own kernel behind the CPU’s virtualization support. Firecracker is the common one: E2B, Vercel, Fly and Cloudflare all use it. The open-source projects use other virtual machine monitors: Arrakis uses Cloud Hypervisor, microsandbox uses libkrun, and CubeSandbox uses RustVMM on KVM. The cost is that you need KVM, which means bare metal or a cloud that allows nested virtualization.
In soulvm: I measured what nesting costs, with the same script on three machines (median of five runs, one sandbox at a time):
Bare host VM on it, nested KVM Old laptop, bare Sandbox start 0.065 s 0.14 s 0.17 s Pause 0.06 s 0.12 s 0.17 s Resume 0.10–0.15 s 0.15 s 0.26 s CPU work in a sandbox 319 ms 298 ms 654 ms Nesting added about 70 ms to a sandbox’s start and nothing measurable to CPU or disk work inside it. The bare host’s resume times were spread across 0.10 to 0.15 s, so that cell is the range rather than one median. The old laptop, from 2014, has 4 threads and 7.6 GB of RAM, and is where soulvm first ran; the other two are a 12-thread Proxmox host and a VM on it.
Container images show up everywhere, but mostly as packaging: E2B and Vercel turn the image into the VM’s root filesystem and boot it. Fly goes a step further and keeps a container inside each Sprite, so the user’s environment can restart without rebooting the VM.
In soulvm: one Firecracker VM per sandbox, with no container inside: the app’s image becomes the VM’s root filesystem, so the VM is the only boundary. My earlier project, Nimbus, used plain containers per agent chat, which is where the next decision started.
Decision 2: How a Sandbox Starts
This decision is about how quickly a usable sandbox appears, not what it remembers. The fastest sandboxes don’t boot at all.
Boot it. Start a kernel, then init, then the app. A microVM boots in about a second or two, and the app still has to start after that.
Restore a snapshot. Boot a VM once, start the app, then save the whole thing: memory, disk and CPU state. Every new sandbox restores that snapshot instead of booting, so it starts with the app already running. E2B’s templates work this way. The trick that makes it fast is loading memory lazily: in Firecracker, either the kernel loads each page from the memory file the first time the guest touches it, or a userfaultfd handler you write yourself does. The handler gives you control over loading, and if it crashes during a restore, Firecracker’s docs warn that the VM simply hangs.
Keep a warm pool. Fly’s Sprites all start from one standard image, so Fly can keep empty Sprites ready and hand one out on request. A create takes “a second or two.”
In soulvm: a sandbox restores from its template’s snapshot in 65 to 170 ms, depending on the machine, with the app already running. One catch: a restored process keeps the environment it had when the snapshot was taken, so settings given to a new sandbox don’t reach it. Anything per-instance has to be read by the app at runtime.
Decision 3: What Sleeping Keeps
This is the decision hidden behind the word “resume”: what survives between sessions. It’s a separate choice from starting. A platform can start fast and keep nothing, or keep everything and take seconds to bring it back. A sleeping sandbox can keep nothing (a fresh start from the image), its disk (its files, with a fresh boot), or its memory and disk (its processes, exactly as they were).
Here’s what each platform documents for its sleep and resume:
| Platform | When it sleeps | What comes back |
|---|---|---|
| E2B | pause saves memory and disk, or disk only | the same processes, in about a second; paused sandboxes are kept indefinitely |
| Vercel Sandbox | stopping snapshots the filesystem | a new session that boots from that snapshot |
| Modal | there’s no pause: a sandbox ends, and a filesystem snapshot becomes an image | a new sandbox from the image, or from a memory snapshot (alpha), which ends the original when it’s taken |
| Daytona | a container stops and keeps its disk on the runner; a VM pauses with its memory | the files (container), or everything (VM) |
| Cloudflare Sandbox | the instance stops and its disk goes with it, unless you took a snapshot (beta) | a fresh disk from the image, or the files you snapshotted |
| CubeSandbox | pausing snapshots memory and disk to the node’s local disk | ”full state preserved”, woken by the next request if auto-resume is on |
| Fly Sprites | it sleeps on its own; a checkpoint is a block snapshot of the whole disk | the same disk, and a restore “costs about as much as a restart” |
Keeping memory is what agents want while they’re mid-task, and it isn’t free. A memory snapshot tends to be about the size of the memory the guest has used, though compression and how the platform tracks changed pages move that a lot, and E2B’s docs put a pause at about 4 seconds per GiB of RAM. Modal’s memory snapshots are still alpha and come with limits: taking one ends the original sandbox, open connections close, and a restore needs the same instance type. Disk-only is smaller and sturdier, with no stale connections or clock jumps on wake, but processes start again, and anything that wasn’t flushed to disk before the snapshot can be lost.
In soulvm: each full pause wrote the memory the guest was using to disk: 122 to 142 MB with the guest idle, and 344 MB after it filled 200 MB more, while its disk changes came to 0 to 1 MB. So the cost follows what the guest uses, not the VM’s size. An upstream issue explains why: on the usual pause path, the memory diff is measured against the template, not the previous snapshot. So I measured what a sleeping app should keep, on the 2014 laptop (newer machines shorten every row):
Go app Python app New sandbox from the app’s build 171 ms 192 ms Resume from a memory pause 154 ms 235 ms Boot from a disk-only stop, start the app 1719 ms 4748 ms Starting fresh from the build was as fast as resuming from memory, because the build is itself a snapshot with the app already running. So a sleeping app in soulvm keeps nothing, and a sandbox someone works in keeps only its disk, after a
syncin the guest. One more side effect of sleep: cron in a paused VM never fires, so scheduled work has to live outside the VM and wake it.
Decision 4: Where the Disk Lives
Sleeping is cheap only if a stored disk is cheap, and the platforms keep it in very different places.
Block snapshots. E2B’s orchestrator stores a sandbox’s disk as layers of changed blocks, each with a header that maps every block to the layer that holds it. The layers can live in object storage, as they do in E2B’s cloud, or on a machine’s local disk.
Compressed disk images in object storage. A Vercel snapshot is “a compressed copy of the sandbox’s disk,” stored in S3 in a format of Vercel’s own, with each host keeping a cache of decompressed images on local NVMe. Vercel’s write-up on making this fast is a good read. Parallel range downloads, parallel decompression and streaming the download straight into decompression took the 75th-percentile restore from over 40 seconds to under one, and the local cache now catches more than 90% of restores. Snapshots stay in the region they were made in, and expire 30 days after their last use.
The runner’s disk first, object storage later. A stopped Daytona container keeps its filesystem on the runner, where it counts against your disk quota. After seven days stopped it’s archived to object storage, and starting it brings it back.
A filesystem on object storage, then a block device. Fly’s Sprites were the boldest design: a heavily modified JuiceFS kept data in object storage and metadata in SQLite, so a checkpoint only moved metadata around. In October Fly replaced it. A test harness drove 400 Sprites through about 5,000 cycles of write, checkpoint, sleep, wake and restore, and a nonzero number of them “permanently lost the ability to checkpoint.” The old stack kept chunks, metadata and checkpoints as separate records: “Each one was made durable separately, so each one could be right while the others were wrong.” The replacement presents a bucket to the kernel as a block device, with a plain ext4 filesystem on top and the metadata stored alongside the blocks.
Three records that could disagree, replaced by one.
That’s the strongest signal I found. Fly moved to block-level snapshots of a plain disk, the way E2B’s orchestrator already worked, because the clever design failed where several records had to agree. The field hasn’t settled, though. CubeSandbox keeps its snapshots on each node’s local XFS disk, cloning files by reference instead of copying them. Its newest release adds JuiceFS as an opt-in backend, still in preview, so a paused sandbox can resume on a different node: close to the design Fly had just left, offered as an extra rather than the default. Two serious teams moved in opposite directions on JuiceFS within a month, which says a lot about how unsettled this still is.1
In soulvm: snapshots stay on the machine’s local disk. That’s simple, and it means losing the disk loses them, and a sandbox can only resume on the machine where it paused. My study had a plan to add JuiceFS inside the guest later, for cheap checkpoints on object storage. That’s the design Fly has just walked away from, and soulvm hasn’t needed it.
Decision 5: Getting In and Out
An agent’s sandbox is only useful if you can see what it built, and only safe if it can’t reach everything. E2B and soulvm route a URL to each port, in the form <port>-<sandbox id> on a domain. Daytona serves authenticated preview URLs and puts a firewall on each sandbox’s outbound traffic, and it injects secrets through an outbound proxy so the sandbox only ever holds a placeholder. Vercel allows up to 15 open ports per sandbox. Underneath, every platform answers the same questions about which ports are public, which need a key, and what the sandbox may call out to.
Outgoing traffic matters more for agents than for most code. An agent that reads a web page or a file can be talked into sending what it has, your code or your keys, somewhere else, and isolation doesn’t stop that, because it keeps code in, not data. So the platforms let you narrow what a sandbox can reach. E2B can switch internet access off, or take allow and deny lists of IPs, ranges and domains that can change while the sandbox runs, and it always blocks private addresses. Modal can block the network outright or allow listed IP ranges and domains. Vercel’s egress firewall is open by default and can deny everything or allow named domains, wildcards included. Its docs carry a warning worth repeating: allow address ranges without naming any domains, and every hostname still resolves, which is enough to send data out over DNS.
In soulvm: every port of every sandbox was public at first, protected only by the sandbox ID being hard to guess. A hard-to-guess ID isn’t authentication: anyone who sees the URL can use it. Now a sandbox’s Network tab finds the ports listening in it, a port is private unless shared, and a share link carries its own end time, so it lapses without soulvm storing anything. Outgoing traffic is Anything, Only these hosts (from groups like Packages and GitHub), or Nothing. The orchestrator itself was the bigger surprise: it listens on eight ports on every interface, none with authentication, and my first firewall covered only two of them. For weeks the other six, including the NFS proxy and the egress proxies, answered from the local network. All eight are closed to other hosts now, and a check compares what the orchestrator really listens on with the list.
Decision 6: How Much Control Plane
Something has to decide where a sandbox runs, when it sleeps, when it’s deleted, and what may be cleaned up. E2B’s full platform does this with an API, Postgres, Redis, ClickHouse and a client proxy around its orchestrator. At the other end, boxd, another host for agent workloads, describes its control plane as a single Rust binary with Raft and SQLite.
You mostly notice a control plane’s work when it’s missing. E2B’s orchestrator stores each sandbox’s end time but never acts on it. I created a sandbox with an end time 30 seconds away, and 70 seconds past it, it was still running. The API’s evictor had been doing that job, along with filling in each sandbox’s configuration, keeping build logs that the orchestrator forgets after 10 minutes, and deciding what could be deleted.
In soulvm: I kept E2B’s orchestrator and envd, the agent inside each VM, and replaced everything else with one Go binary and SQLite. Starting and snapshotting VMs worked from the first day. The bookkeeping didn’t: at one point soulvm’s records knew about 24 of the 209 build folders on its disk, and the orchestrator’s cache kept serving images whose files had been deleted. It’s the same kind of failure as Fly’s: records that should agree, and don’t. That story is the next post.
Decision 7: Rent or Own
Every hosted platform above makes these decisions for you, which is the point of renting. The big clouds are moving in too, with AWS’s Lambda MicroVMs (launched in June, built on Firecracker, with suspend and resume) and Google’s Agent Compute Engine (announced in October, not yet in preview), which I wrote about in Every AI Agent Gets a Computer.
If you want to own it, these are the open-source options as of mid-November 2026:
| Project | License | Isolation | Status |
|---|---|---|---|
| E2B’s runtime | Apache-2.0 | Firecracker | active; the whole E2B stack |
| CubeSandbox | Apache-2.0 | KVM, via RustVMM | active; E2B-compatible API, pause and wake |
| microsandbox | Apache-2.0 | libkrun | active; a library, not a platform |
| Flintlock | MPL-2.0 | Firecracker, Cloud Hypervisor | active; no snapshot and restore |
| Arrakis | AGPL-3.0 | Cloud Hypervisor | no commits since June 2025 |
| Daytona | — | containers, VMs | open-source repository archived in July 2026 |
Owning costs more than the hardware. You need KVM, and the control plane’s bookkeeping becomes yours to run. In return the data stays on your disk, you set the sleep policy, and nobody bills you by the second while an agent thinks. I now run all my agents around the clock on an OptiPlex mini PC with a 35 W CPU.
What I’d Look At First
The jump from 30 seconds to under 200 milliseconds came from a VM boundary, a start that restores a snapshot instead of booting, and treating three kinds of work differently: a served app needs nothing kept, because its build is already a warm snapshot; a workspace needs its disk; and only an unfinished task needs its memory. On a hosted platform those choices are made for you, so check them before you pick one. If I were choosing a self-hosted base today, I’d put CubeSandbox next to E2B’s runtime and compare them on exactly these points. And I’d avoid three things: running agent code in plain containers, keeping memory for work that doesn’t need it, and any storage design where several separate records have to agree.
None of it is settled yet. In the weeks I spent on this post, Fly moved Sprites to block snapshots, CubeSandbox added JuiceFS, and Modal announced it’s donating gVisor to the CNCF. The next post is the part I underestimated most when I built my own: keeping the records about all those snapshots in agreement.
Sources and Caveats
The In soulvm notes are first-hand, measured on a 2014 laptop, a 12-thread Proxmox host and a VM on it; the 30-second restores were Nimbus’s. Everything about other platforms comes from their own docs, posts and repositories, read in November 2026, and the figures they quote are theirs. I haven’t benchmarked the platforms against each other, and pricing, GPUs and multi-region placement are out of scope. I built soulvm with Claude Code.
Footnotes
-
Most of what this post describes is less than a year old. Sprites launched in January 2026 and changed storage in October. Cloudflare’s sandboxes reached general availability in April. CubeSandbox’s repository appeared the same month and ships a release most weeks. Daytona archived its open-source repository in July. Vercel cut its restore times from over 40 seconds to under one in the spring. Read every detail here as a snapshot of November 2026. ↩