Best Agent Sandboxes in 2026: Cold Start, Per-Second Pricing, and Network Policy Across E2B, Daytona, Modal, Cloudflare, and Vercel

Every agent that writes code needs somewhere to run it. That “somewhere” is now a product category with at least a dozen vendors, four incompatible billing models, and marketing pages that quote cold starts measured under conditions nobody publishes.

This comparison fixes the units. It covers the five platforms most teams shortlist — E2B, Daytona, Modal Sandboxes, Cloudflare Sandbox SDK, and Vercel Sandbox — along with Runloop, Fly.io Sprites, and Northflank where they change the answer.

The four questions that actually decide this

Feature matrices for this category are mostly noise. Four properties change architecture, and everything else is a preference:

  1. Cold start under concurrency: An agent loop that creates a sandbox per tool call pays this tax thousands of times a day.
  2. Filesystem persistence between turns: Does turn 2 see the pip install from turn 1, or does the agent rebuild its world?
  3. Egress policy: Can the sandbox reach the internet, can you turn that off, and can you change your mind mid-session?
  4. Idle billing: Agents spend most of their wall-clock waiting on a model. Somebody is paying for those seconds.

1. Cold start: what the numbers actually say

The vendor claims are not comparable to each other. Daytona’s pricing page advertises sub-90ms sandbox creation. E2B is commonly cited at roughly 150ms. Modal advertises sub-second cold starts for pre-cached containers. None of these state concurrency, region, image size, or whether the clock stops at API acknowledgment or at first executed command.

The most useful public dataset is ComputeSDK’s sandbox leaderboard, which is open source and runs on a schedule. It measures Time to Interactive (TTI): elapsed time from create() to the first successful command inside the sandbox, 100 iterations per provider, launched concurrently in a single burst, from a 4 vCPU host in Northern Virginia.

Results from the August 21, 2026 run:

Provider Median TTI P95 P99 Success rate
Vercel Sandbox 0.67s 1.04s 1.12s 100%
Modal 0.88s 1.00s 1.08s 100%
Runloop 0.89s 3.27s 3.50s 100%
E2B 1.61s 1.77s 1.81s 100%
Cloudflare 5.06s 6.04s 6.48s 100%
Daytona 0.27s 0.43s 0.44s 37%

Three things in that table matter more than the ranking.

Reproducing this yourself

The task worth measuring is the one your agent runs, not echo hello. A useful harness runs the same unit of work everywhere: install pandas, read a CSV, plot it, return a PNG. Time four checkpoints separately.

# checkpoints: t_create -> t_ready -> t_deps -> t_result
# run 100 iterations sequential, then 100 concurrent, report median/P95/P99
import time, statistics

def one_run(provider):
    t0 = time.perf_counter()
    sbx = provider.create()              # API acknowledged
    t1 = time.perf_counter()
    sbx.exec("python -c 'print(1)'")     # first command returns: TTI
    t2 = time.perf_counter()
    sbx.exec("pip install pandas matplotlib")
    t3 = time.perf_counter()
    sbx.exec("python /work/plot.py")     # writes /work/out.png
    png = sbx.read_file("/work/out.png")
    t4 = time.perf_counter()
    sbx.kill()
    return dict(create=t1-t0, tti=t2-t0, deps=t3-t2, task=t4-t3, bytes=len(png))

Report tti and task separately. Vendors optimize the first and readers care about the second. Pin the region, pin the image, and publish both the sequential and the concurrent series, because they answer different questions.

2. Per-second pricing, normalized

Published rates as of August 27, 2026, converted to a common unit. Modal prices per physical core, which it defines as 2 vCPU, so the vCPU-equivalent is shown for comparison.

Platform CPU Memory Billing basis Plan floor
E2B $0.0504 / vCPU-hr $0.0162 / GiB-hr Wall-clock, per second Free Hobby; $150/mo Pro
Daytona $0.0504 / vCPU-hr $0.0162 / GiB-hr Wall-clock, per second None; $200 credit
Modal Sandbox $0.1419 / core-hr (~$0.0710 / vCPU-hr) $0.0240 / GiB-hr max(request, actual), per second Free Starter; $250/mo Team
Vercel Sandbox $0.128 / vCPU-hr active CPU only $0.0212 / GB-hr provisioned Split: CPU active, memory wall-clock Hobby allotment; Pro credit
Cloudflare Sandbox $0.072 / vCPU-hr active CPU only $0.009 / GiB-hr provisioned Active CPU + provisioned memory/disk $5/mo Workers Paid
Fly.io Sprites $0.07 / CPU-hr $0.04375 / GB-hr Active use only; sleeps when idle Subscription tiers
Runloop $0.108 / CPU-hr $0.0252 / GB-hr Running state; suspended is storage-only Free Basic; $250/mo Pro
Northflank $0.01667 / vCPU-hr $0.00833 / GB-hr Allocated resources, per second Free Sandbox tier

Two footnotes that people get wrong.

3. Cost per 1,000 executions

Rates are not costs. The model below fixes the workload and runs it through each rate card.

Assumptions: 2 vCPU / 4 GiB sandbox, 1,000 executions, no plan floor included, no egress, default region (Vercel iad1, Cloudflare standard-3 at 2 vCPU / 8 GiB / 16 GB disk since instance sizes are fixed).

Scenario A: short burst — 90s alive, 50% average CPU

Platform Cost / 1,000 Composition
Northflank $1.67 $0.83 CPU + $0.83 memory
Cloudflare $3.70 $1.80 CPU + $1.80 memory + $0.10 disk
E2B / Daytona $4.14 $2.52 CPU + $1.62 memory
Vercel $5.32 $3.20 active CPU + $2.12 memory
Modal $5.95 $3.55 CPU + $2.40 memory
Fly Sprites $7.88 $3.50 CPU + $4.38 memory
Runloop $7.92 $5.40 CPU + $2.52 memory

Scenario B: idle-heavy — 10 min alive, 5% average CPU

This is what a real agent loop looks like. The sandbox is open, the model is thinking, nothing is running.

Platform Cost / 1,000 Change vs A
Northflank $11.11 6.7x
Cloudflare $13.87 3.7x
Vercel $16.27 3.1x
E2B / Daytona $27.60 6.7x
Modal $39.66 6.7x
Fly Sprites (kept awake) $52.50 6.7x
Runloop (kept running) $52.80 6.7x

Vercel moves from 4th-cheapest to 3rd, and its CPU line drops from $3.20 to $2.13 while everyone else’s scales linearly. Cloudflare’s active-CPU line falls to $1.20. That is the entire argument for active-CPU billing, and it is worth roughly 2x on this workload.

Scenario B with suspend

The platforms that lose Scenario B can win it back, if your orchestration suspends between turns instead of holding the box open. Same workload, 30s awake per execution:

Platform Cost / 1,000 Mechanism
E2B (auto-pause) ~$2.16 Pause costs ~4s per GiB of RAM, resume ~1s (docs)
Fly Sprites $2.62 Idle monitor sleeps the sprite within seconds
Runloop $2.64 Suspend stops compute billing; storage continues

E2B’s number includes ~17s of pause and resume overhead for a 4 GiB sandbox. That overhead is the deciding variable: pausing is only economical when the gap between turns is meaningfully longer than the pause itself.

Fly’s idle detector is specific about what counts as activity: an in-flight HTTP or API request, output to a session’s stdout, an open TCP connection, or an active task (sprites.dev). An agent that holds a connection open while it waits is an agent that is billed. Redirecting output to a file does not count, which is a real lever.

4. Filesystem persistence between turns

This is where the platforms diverge most, and where the wrong choice shows up as a rebuilt node_modules on every turn.

Platform Default on stop/idle Memory state Mechanism
E2B onTimeout defaults to kill Pause preserves RAM and running processes pause() / connect(), paused boxes kept indefinitely
Daytona Persistent by default; auto-stop 15 min (containers), auto-pause 60 min (VMs) VM sandboxes only, via pause/resume Stop, archive, pause, fork, volumes
Modal Terminated at timeout (default 5 min, max 24h) Memory snapshots, 7-day expiry Filesystem snapshots are Images, 30-day default TTL
Cloudflare Sleeps after 10 min; disk resets to image No createBackup() / restoreBackup(), R2 mounts, snapshots rolling out
Vercel Persistent sandboxes snapshot the filesystem on stop No Snapshots, 30-day default expiry, $0.08/GB-mo
Runloop Suspend preserves state Yes, via suspend/resume Suspend/resume and snapshot branching; Pro plan only
Fly Sprites 100 GB root filesystem persists indefinitely Checkpoint/restore Object-storage-backed disk, no container image

Three details worth internalizing:

5. Egress policy

Every platform in this comparison can now run a sandbox with no internet access. The differences are in precedence, granularity, and whether policy can change without a restart.

Platform Default Block all Allowlist Change at runtime
E2B Open egress allowInternetAccess: false Domains, IPs, CIDRs; wildcards Yes, updateNetwork() replaces the whole policy
Daytona Tier-dependent networkBlockAll domainAllowList (20 max), networkAllowList (10 CIDRs, IPv4 only) Yes, Tier 3/4 only
Modal Open egress, no inbound block_network=True outbound_cidr_allowlist, outbound_domain_allowlist (beta) Alpha, and only if allowlists were set at create
Cloudflare Open egress enableInternet = false allowedHosts / deniedHosts, glob patterns Yes, handlers and host rules apply live
Vercel allow-all deny-all, including DNS Domains via SNI, plus IP/CIDR fallback Yes, without restarting
Runloop Network policies per devbox Yes Yes Documented per devbox

The precedence trap

E2B and Vercel resolve conflicts in opposite directions. In E2B, allow rules take precedence over deny rules: an IP in both lists is allowed. In Vercel Sandbox, denied ranges override allowed ranges. A policy ported from one to the other without rewriting it does not mean the same thing.

The failure-mode trap

E2B documents that blocked TCP connections can look successful from inside the sandbox. The firewall accepts the connection before deciding whether the destination is allowed, so a socket opens and no packets arrive. Verify egress with an application-level response — an HTTP status, a TLS handshake — not with a successful connect(). Any test suite that asserts “network is blocked” by checking for a connection error will pass against an unblocked sandbox.

Credential injection is the real differentiator

Blocking egress is table stakes. Letting a sandbox make an authenticated call without ever holding the credential is not.

Cloudflare runs outbound handlers in the Workers runtime, outside the sandbox, with access to Workers bindings. The sandbox issues a plain request, the handler attaches the secret, and ctx.containerId scopes credentials per instance (docs). Vercel brokers credentials on egress with matchers scoped by path, method, query string, or headers, and states the firewall runs on the host outside the microVM where sandbox code cannot disable it (Vercel). E2B ships per-host request transforms in public beta that inject headers at the egress proxy, including workload-identity tokens the sandbox never sees. Runloop offers a Credential Gateway with opaque token injection.

For agents processing untrusted input, this design matters more than cold start. A prompt-injected agent with a GitHub token in its environment is a different incident from one that can only reach GitHub through a proxy holding the token.

6. Isolation, limits, and the fine print

Platform Isolation Max session Concurrency GPU in sandbox Self-host / BYOC
E2B Firecracker microVM 1h Hobby, 24h Pro; resets after pause 20 Hobby, 100 Pro, up to 1,100 No Apache-2.0 infra repo, Terraform + Nomad + Consul
Daytona Containers, plus VM and Windows classes Configurable, wall-clock TTL optional Tier-based Yes (ephemeral) BYOC, enterprise
Modal gVisor 5 min default, 24h max 100 Starter, 5,000 Team Yes, full rate card No
Cloudflare Containers on Workers Sleeps at 10 min idle, keepAlive available 15,000 lite, 1,000+ standard-2 No No
Vercel Firecracker microVM 45 min Hobby, 24h Pro 10 Hobby, 10,000 Pro No AWS BYOC in private beta
Runloop microVM Suspend/resume 10,000 demonstrated No VPC deployment
Fly Sprites Firecracker microVM Persistent Subscription tiers No No
Northflank microVM (Kata, Firecracker, gVisor) Persistent or ephemeral Platform-level Yes Self-serve BYOC

7. How to choose

Key Takeaways


Sources: E2B pricing, E2B persistence, E2B internet access, Daytona pricing, Daytona persistence, Daytona network limits, Daytona billing, Modal pricing, Modal sandbox networking, Modal sandbox resources, Modal sandbox snapshots, Cloudflare Containers pricing, Cloudflare outbound traffic, Cloudflare Sandboxes GA, Vercel Sandbox pricing, Vercel Sandbox firewall, Runloop pricing, Sprites and Northflank pricing

The post Best Agent Sandboxes in 2026: Cold Start, Per-Second Pricing, and Network Policy Across E2B, Daytona, Modal, Cloudflare, and Vercel appeared first on MarkTechPost.

Exit mobile version