Blog / 31 October 2026
Deep dive · 31 October 2026 · 7 min read
E2B, Daytona, Modal, Vercel Sandbox and local options: how AI sandboxes differ
AI sandbox providers differ less in whether they isolate code than in how long a sandbox can live, what survives when it stops, how you are billed, and where it can run. This post takes those attributes one at a time, from each vendor's own documentation read on 31 October 2026, and ranks nothing.
01How should you compare AI sandbox providers?
Compare attributes, not brands. Two teams with different workloads will reasonably pick different providers, and the same team may use one for short code execution and another for long-running coding agents. The attributes below are the ones most likely to change a design: the runtime underneath, the lifetime of one sandbox, what state survives a stop, the billing model, and where the sandbox can run.
Providers are listed alphabetically in each section. Every fact comes from that vendor's documentation or pricing page as read on 31 October 2026. Limits and prices change often, so treat the numbers as a dated snapshot and recheck them before you commit. For the isolation boundary and network controls of each option, see our earlier map of AI agent sandboxes; this post does not repeat it.
02What does each sandbox run on?
The runtime decides what code can do inside the sandbox, such as running Docker or FUSE, as well as how strong the boundary is. Several providers offer more than one runtime, so the answer can differ per sandbox.
Whether code can run privileged workloads also varies. Modal's VM runtime and Vercel Sandbox both document running container runtimes such as Docker inside the sandbox, which matters for agents that build images or run integration tests.
- Cloudflare Sandbox SDK: sandboxes run on Containers or Dynamic Workers, started and driven by a Durable Object in your Worker. It requires the Workers Paid plan.
- Daytona: Linux containers by default. VM sandboxes run a dedicated Linux or Windows system and add VM-only features such as forking and pause and resume.
- E2B: each sandbox is a Linux VM that can be paused and resumed.
- Modal: a gVisor runtime, or a VM runtime with its own Linux kernel for workloads such as Docker or FUSE, chosen with the
runtimeparameter. - Vercel Sandbox: each sandbox runs in a Firecracker microVM with its own filesystem and network.
03How long can one sandbox run?
Lifetime limits matter most for coding agents, which can work for hours. Read two numbers for each provider: the default, which catches you when you forget to set it, and the maximum, which bounds the longest task.
Pausing or stopping often resets the clock. E2B says a pause and resume resets its running-time limit, and Vercel says its maximum applies to one session, so a persistent sandbox's total lifetime is effectively unbounded.
- Cloudflare: an instance runs while its Durable Object is active. Without a timeout it stops shortly after the Durable Object goes inactive, and
setInactivityTimeout()allows up to 6 hours. - Daytona: auto-stop after 15 minutes by default, auto-archive after 7 days by default, and no automatic deletion unless you set one.
- E2B: continuous running time is capped at 1 hour on Hobby and 24 hours on Pro.
- Modal: a default lifetime of 5 minutes, adjustable up to 24 hours, plus an optional
idle_timeout. - Vercel Sandbox: a default timeout of 5 minutes; the maximum session is 45 minutes on Hobby and 24 hours on Pro and Enterprise.
04What state survives when a sandbox stops?
This is where providers differ most, and it decides whether you can pause an agent mid-task or only skip setup on the next run. Files-only persistence restarts processes. Memory persistence brings running processes back.
Retention is part of the answer. A snapshot or paused sandbox that expires before you need it is not a backup, and one that never expires keeps adding storage charges, so set expiry on purpose.
- Cloudflare: files and processes end with the instance. A snapshot restores the writable root filesystem, not memory or processes.
- Daytona: stopping keeps the filesystem but not the memory state. VM sandboxes add pause and resume.
- E2B: pausing saves both filesystem and memory, including running processes. Paused sandboxes are kept until you kill them.
- Modal: filesystem and directory snapshots, kept 30 days by default, and memory snapshots, documented as alpha, that expire after 7 days.
- Vercel Sandbox: sandboxes are persistent by default, and a filesystem snapshot is taken automatically when a session stops. Snapshots expire 30 days after last use by default, adjustable to never, and stay in their region.
05How are AI sandboxes billed?
Billing models reward different workloads. Per-second billing on provisioned resources charges for the whole time a sandbox is up. Billing on active CPU charges less while an agent waits on a model. Local tools cost your own hardware. The rates below are the published list rates on 31 October 2026 and exclude plan fees, credits and discounts unless stated.
Agents spend much of their time waiting on model calls, so ask each provider what an idle but running sandbox costs. That number, multiplied by how long your agents sit waiting, often matters more than the headline CPU rate.
- Cloudflare: billed under Containers or Dynamic Workers pricing, on the Workers Paid plan.
- Daytona: billed per second; vCPU at $0.0504 an hour and memory at $0.0162 per GiB an hour, with $200 of compute included and BYOC on Enterprise.
- E2B: running sandboxes billed per second for provisioned CPU and RAM, at $0.000014 per vCPU-second and $0.0000045 per GiB-second, plus a plan fee; Hobby is $0 and Pro is $150 a month.
- Modal: sandboxes are billed at the greater of requested and actual resources.
- Vercel Sandbox: Active CPU at $0.128 an hour on Pro, where time waiting on I/O such as model calls does not count, plus provisioned memory, creations and outbound data.
- Docker Sandboxes: the
sbxCLI and local compute are free to use; cloud compute is pay-as-you-go.
06Cloud vs local sandbox: where can each one run?
Location is often decided by data rules before anything else. A managed cloud sandbox runs in the vendor's regions. Some vendors offer bring-your-own-cloud on enterprise plans. A local sandbox runs on the developer's machine, which keeps code and data there and makes you the operator.
SDK support follows the same split. E2B documents JavaScript and TypeScript and Python SDKs, Modal documents Python, JavaScript and Go, Vercel shows TypeScript and Python, and Cloudflare's package is @cloudflare/sandbox for Workers.
- Managed cloud: Cloudflare, Daytona, E2B, Modal and Vercel Sandbox. Vercel lists 19 regions, and its snapshots cannot move between regions.
- Bring your own cloud: listed on Daytona's and E2B's enterprise plans. E2B's infrastructure repository is Apache-2.0 licensed and describes itself as the runtime behind its cloud, enterprise and your-own-machine setups.
- Local: Docker Sandboxes runs agents locally or on Docker-managed cloud, and microsandbox is an Apache-2.0 licensed, local-first microVM runtime and library.
Takeaways
- Compare providers attribute by attribute: runtime, lifetime, state, billing and location.
- Defaults catch you before maximums do; check the default lifetime as well as the cap.
- Only some providers persist memory and running processes; others persist files only.
- Billing on provisioned time and billing on active CPU reward different agent workloads.
- Local and bring-your-own-cloud options exist when data must stay on your hardware or account.
- Prices and limits change; recheck each vendor's docs before you commit.
Where kosa8 fits
kosa8 is one of the local options. Each agent gets its own microVM on your machine that sees one workspace folder, with a network closed except for an allow-list you write and API keys kept on the host. A checkpoint saves the whole running machine, memory and processes, in about 0.7 seconds. It runs on Apple-chip Macs and x86-64 Linux, with Windows through WSL2 in preview, and plans start at $29 a month. It is not a managed cloud service, so for sandboxes in a vendor's regions the providers above are built for that.
Check yourself · +100 XP
On Vercel Sandbox, which billing metric does not count time spent waiting on I/O such as AI model calls?
Vercel's pricing page says Active CPU measures time the code actively uses the CPU, and time waiting for I/O such as model calls does not count. Provisioned memory is billed for the whole time the sandbox runs, including idle time.
Questions people ask
What is the difference between E2B and Daytona?
Per their docs, E2B sandboxes are Linux VMs whose pause saves memory and files, while Daytona sandboxes are Linux containers by default with VM sandboxes available, and stopping keeps files but not memory. Their billing units and default lifetimes also differ.
Which AI sandbox keeps running processes when paused?
Among the providers here, E2B documents saving memory and running processes on pause, Modal documents alpha memory snapshots, and Daytona documents pause and resume for VM sandboxes. Cloudflare and Vercel snapshots restore files only.
Should I use a cloud or a local sandbox for coding agents?
Use a cloud sandbox when you need many sandboxes on demand or run agents server-side. Use a local sandbox when code and data must stay on the developer's machine. Many teams use both.
Sources
- Sandbox SDK — Cloudflare docs
- Sandbox lifetime — Cloudflare docs
- Sandboxes — Daytona docs
- Pricing — Daytona
- E2B documentation — E2B docs
- Sandbox persistence — E2B docs
- Pricing — E2B
- e2b-dev/infra — E2B on GitHub
- Sandboxes — Modal docs
- Sandbox snapshots — Modal docs
- Vercel Sandbox — Vercel docs
- Vercel Sandbox pricing and quotas — Vercel docs
- Snapshots — Vercel docs
- Docker Sandboxes — Docker docs
- microsandbox — microsandbox on GitHub
- How do I run an AI agent sandbox on my own machine? — kosa8 guides
- Docker containers vs microVMs for AI agents — kosa8 guides
Written by the kosa8 team. Every kosa8 command was checked against the CLI, and every claim about another product links to that product's own documentation. Spotted a mistake? Tell us.
Try it on your own machine
Give your next agent its own sealed machine.
One line installs kosa8 on your own machine. Every feature, plans from $29 a month.