E2B vs Modal VM Sandboxes

Both give an agent a small Linux VM with its own kernel that runs for at most 24 hours. E2B can pause a sandbox with its memory and wake it on the next request, while Modal VM Sandboxes have no paused state but run a bit faster and sit inside a big serverless AI platform.

The companies and products

E2B

E2B calls itself the AI agent cloud: an API that gives each agent session its own isolated Linux machine.

Every E2B sandbox is a Firecracker microVM that boots from a snapshot, so it starts fast and can be paused and resumed with its memory. You build custom sandboxes from templates based on a Docker image, and drive them from Python or JavaScript SDKs. It is built for teams that run many short code, data or agent jobs, and its runtime is open source.

Modal VM Sandboxes

Modal is a serverless cloud for AI work, and VM Sandboxes are the version of its sandboxes that run in a virtual machine with their own Linux kernel.

You create a VM Sandbox from Python, TypeScript or Go code with runtime="vm", run commands in it, and terminate it when the job is done. Modal built the runtime on the Rust-based Cloud Hypervisor, so Docker, FUSE, systemd and nested cgroups work, with the same API, images and prices as its gVisor sandboxes. It became generally available on 1 October 2026 and suits teams that want many short-lived agent machines next to Modal's inference and training.

Which use cases each one fits

For each use case, Battleships prices every sandbox provider on the same workload and sorts them from the cheapest monthly bill up. “16th cheapest of 367” means 15 of the other 366 providers run that workload, with every feature it needs, for less. “With limits” means the provider runs it but misses something, so it is listed after every full match. Open a use case for its whole ranking and what each provider misses.

Use case and its workloadE2B: price rankModal VM Sandboxes: price rankbochka: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
E2B ranks 16th and fits fully, while Modal VM Sandboxes rank 84th because files outside a Volume reset; bochka ranks 3rd with no session cap and a faster CPU.
16th cheapest of 367
$4,143 a month
84th of 367, with limits
$759 a month
3rd cheapest of 367
$634 a month
Always-on AI employees
50 machines 24/7 · 2 vCPU / 4 GB
An assistant that lives on its machine all month hits the 24-hour cap on both, so E2B has to pause and resume and Modal has to start a new sandbox.
51st of 366, with limits
$5,348 a month
Can't run it5th cheapest of 366
$657 a month
Code interpreter bursts
100 at once · 1 vCPU / 2 GB · 200,000 sessions of 1 min a month
Short code runs that sleep between requests fit E2B well, because a paused sandbox wakes on the next call with its memory intact.
37th cheapest of 345
$421 a month
Can't run it186th of 345, with limits
$2,000 a month
Sandboxes for your users
300 at once · 2 vCPU / 4 GB · 30,000 sessions of 23 min a month
E2B fits and wakes a paused user sandbox on the next request; bochka ranks 1st, with a stopped sandbox that keeps its disk and costs nothing while it waits.
23rd cheapest of 361
$2,354 a month
Can't run itCheapest of 361
$209 a month
RL rollouts
1,000 at once · 2 vCPU / 4 GB · 1,000,000 sessions of 3 min a month
E2B ranks 2nd here: memory forks and fast starts suit many short rollouts, while Modal VM Sandboxes rank 171st on this workload.
2nd cheapest of 360
$9,384 a month
171st of 360, with limits
$16,322 a month
34th of 360, with limits
$2,000 a month
Agent evals
250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month
78th cheapest of 364
$1,975 a month
Can't run it10th cheapest of 364
$200 a month
CI runners
40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month
Both are a compromise for CI, and only Modal offers nested virtualization (Team and Enterprise, on request); bochka ranks 4th with /dev/kvm on every plan.
337th of 377, with limits
$1,429 a month
188th of 377, with limits
$1,064 a month
4th cheapest of 377
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
192nd of 368, with limits
$358 a month
Can't run it18th cheapest of 368
$26 a month
Computer-use agents
50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month
E2B has a Linux desktop for computer use and Modal VM Sandboxes do not; bochka streams its desktop at 60fps with a computer-use API.
32nd cheapest of 369
$1,342 a month
Can't run it6th cheapest of 369
$200 a month
Browser-use agents
50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month
100th of 367, with limits
$746 a month
Can't run it7th cheapest of 367
$200 a month
Scraping & bots (startup scale)
50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month
57th cheapest of 346
$554 a month
Can't run it6th cheapest of 346
$90 a month
Mass scraping & bots (undetectable)
1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month
227th of 338, with limits
$9,223 a month
Can't run it71st of 338, with limits
$1,800 a month
Parallel red teaming
200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month
E2B ranks 11th and Modal VM Sandboxes rank 294th; bochka ranks 2nd, with fast parallel machines that can fork while running.
11th cheapest of 360
$1,043 a month
294th of 360, with limits
$642 a month
2nd cheapest of 360
$200 a month
GPU eval jobs
10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month
Can't run itCan't run itCan't run it
macOS agents
5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month
Can't run itCan't run itCan't run it

Key features

FeatureE2BModal VM Sandboxesbochka
IsolationFirecracker microVM with its own kernelVM with its own Linux kernel on Cloud HypervisorFull VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts
CPU benchmark (4 vCPU / 8 GB)12.61 runs/s15.54 runs/s26.69 runs/s
Longest session1 hour on Hobby, 24 hours on Pro; pausing resets the clock24 hours (default 5 minutes); continue from a filesystem snapshotNo cap on paid plans; you set the time to live
Pause and resumeSaves memory and disk; resume takes about 1 second with processes still runningNo paused state; a finished sandbox is gone, only Volumes and snapshots keep filesStop for free, resume later with the whole disk; saved every minute
Wake on requestYes; a paused sandbox can resume on the next HTTP request or SDK callNoNo; a stopped sandbox is started by API
ForkFork a running sandbox with its memory, up to 20 copies per callSnapshot the filesystem into an image and boot new sandboxes from it; memory snapshots are alpha and end the sandboxFork a running sandbox with its disk
Docker, systemd, rootYesYes; start dockerd yourself as the entrypointYes, in every sandbox
Nested virtualizationNot supportedTeam and Enterprise plans only, on requestYes, /dev/kvm on every plan
Desktop and computer useLinux desktop for computer useNot offered; an example shows how to set up Xvfb and VNC yourself60fps desktop, Chromium and computer-use API built in
Inbound accessHTTPS URL per port, public by default unless you turn on a token; no raw TCP, no dedicated IPEncrypted and raw TCP tunnels, connect tokens, inbound IP allowlistHTTPS URLs for up to 50 ports, token-protected by default; raw TCP; dedicated IPv4 or IPv6
Outbound rulesAllow and deny lists by IP, CIDR or domainBlock all, IP-range allowlist, domain allowlist (beta)Open internet, no provider-side allowlist
Coding agents and API keysTemplates and guides for many agents, run through the command API; secrets injected into outbound HTTPS headers (private beta)Examples only; secrets are environment variables, or you run your own proxy in a sidecarSeven agents preinstalled with a prompt, steer and events API; credentials proxy for model providers and any HTTPS API
RegionsUS by default; EU and APAC on Pro and above, enabled by supportUS, EU and Asia-Pacific plus narrower regions; pinning costs 1.15x to 1.75xEU only (Germany, Finland, France)
Self-hostingOpen-source runtime, plus bring your own cloud on EnterpriseNoNo
Every feature Battleships tracks (43)
FeatureE2BModal VM Sandboxesbochka
Full VM (own kernel)YesYesYes
Docker insideYesYesYes
Nested virtualizationNoYesYes
RootYesYesYes
SystemdYesYesYes
Desktop GUIYesNoYes
BrowserYesNoYes
Computer-use APIYesNoYes
SSHYesYesYes
Persistent diskYesYesYes
Pause/resumeYesNoYes
Automatic snapshotsYesNoYes
Fork/cloneYesYesYes
Live fork (no pause)YesYesYes
Memory forkYesYesNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopYesYesNo
Wake on requestYesNoNo
HTTPS preview URLsYesYesYes
Raw TCP inboundNoYesYes
Public IPv4NoNoNo
Egress allowlistYesYesNo
Secret proxyYesNoYes
Secret proxy for any APIYesNoYes
Preinstalled agentsYesNoYes
Agent harness APINoNoYes
MCP serverYesNoNo
GPUNoNoNo
WindowsNoNoNo
Arm64NoNoNo
Self-hostingYesNoNo
BYOCYesNoNo
Open sourceYesNoNo
Scoped API keysNot publishedNot publishedYes
Spend limitsYesNot publishedYes
Usage per sandbox (API)NoNot publishedYes
Audit logsNot publishedYesNo
SSONoYesNo
SOC 2YesYesNo
HIPAAYesYesNo
EU data residencyYesYesYes
Zero data retentionNot publishedNot publishedYes

Performance

E2B12.61 runs/s
Modal VM Sandboxes15.54 runs/s
bochka26.69 runs/s

All three ran the hpc-sandbox-benchmarks Node.js build-and-test loop at 4 vCPU / 8 GB in the same run on 29 September 2026. bochka did 26.69 runs per second, Modal's VM runtime 15.54 and E2B 12.61, so Modal did about 1.2 times E2B's CPU work and bochka about 1.7 times Modal's and twice E2B's. This measures CPU speed only, not start time.

Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Modal VM Sandboxes measured on: VM Sandbox, request = size.

Pricing in five scenarios

Each bill is priced from the providers' public price lists by the open Battleships engine, with the cheapest plan that runs the scenario.

ScenarioE2B, a monthModal VM Sandboxes, a monthbochka, a month
One coding agent, workdays
4 vCPU / 8 GB, 50 GB disk, 8 hours a day, 22 days a month, files kept between days
$202 · Pro$15 · Starter · with limits$20 · $20/mo
One agent that never stops
4 vCPU / 8 GB, 50 GB disk, running 24/7 all month
$368 · Pro · with limits$178 · Starter · with limits$26 · $20/mo
50 agents in parallel
50 machines of 4 vCPU / 8 GB at once, 8-hour sessions, 1,100 sessions a month, Docker inside
$2,773 · Pro$2,229 · Starter · with limits$317 · $20/mo × 3 seats
Sandboxes for your users
2 vCPU / 4 GB, 30,000 sessions of 10 minutes a month, up to 300 at once
$1,395 · Pro+ (600 concurrent)$792 · Team$200 · $100/mo × 2 seats
1,000 short jobs at once
2 vCPU / 4 GB, 1,000 at once, 3 minutes each, 200,000 jobs a month
$2,797 · Pro++ (1,100 concurrent)$3,193 · Team · with limits$2,000 · $2000/mo · with limits

E2B: E2B bills per second for the vCPU and RAM you set, idle time included, until you pause or kill the sandbox. Pro costs $150 a month for higher limits with no usage credit, and more concurrency costs $500 a month per 500 slots.

Modal VM Sandboxes: Modal bills by the second for the higher of the CPU and memory you request or what you use, until the sandbox ends. Starter is free with $30 of monthly credit, Team is $250 a month with $100 of credit, and pinning a region multiplies the price by 1.15x to 1.75x.

Modal VM Sandboxes: bochka charges one hourly rate per machine size, by the second, only while the sandbox runs. Plans start at $20 a month and the whole fee becomes usage credit; a stopped sandbox costs nothing and keeps its disk.

Limits in those scenarios

Both cap a session at 24 hours, so neither fits the always-on scenario. Modal also misses the workday and 50-agent scenarios, because files outside a Volume reset when the VM ends, while E2B fits them but includes only 20 GiB of disk on Pro and does not publish an egress price. For 1,000 short jobs at once, E2B Pro++ fits and only queues bursts above 300 starts a minute, while Modal's Team tier runs on shared vCPUs; bochka's start limits make that scenario a poor fit too.

ScenarioE2BModal VM Sandboxesbochka
One coding agent, workdays
  • disk beyond 20 GiB: price unknown
  • egress price not published
  • files survive a stop only in Volumes: packages installed elsewhere reset
None that bite
One agent that never stops
  • Pro: sessions capped at 24 h
  • disk beyond 20 GiB: price unknown
  • egress price not published
  • Starter: sessions capped at 24 h
  • files survive a stop only in Volumes: packages installed elsewhere reset
None that bite
50 agents in parallel
  • egress price not published
  • files survive a stop only in Volumes: packages installed elsewhere reset
None that bite
Sandboxes for your users
  • egress price not published
None that biteNone that bite
1,000 short jobs at once
  • egress price not published
  • bursts above 300 starts/min are queued (a burst of 333 takes ~2 min to start)
  • shared vCPUs on this tier (Modal (VM Sandboxes) sells dedicated cores separately as “VM Sandbox, request = size”): heavy, sustained CPU use can be slowed by other tenants
  • max 2,400 starts/day (needs ~6,667)
  • max 600 starts/hour (needs ~1,000)
  • bursts above 90 starts/min are queued (a burst of 333 takes ~4 min to start)

Which one should you use?

Use E2B when

you run many short jobs that sleep between requests and should wake with their memory intact, or want an open-source runtime you can host yourself.

  • Pause with memory, wake on request. For jobs that sleep between requests: a paused E2B sandbox wakes on the next call in about a second, processes still running.
  • Memory forks and a desktop. E2B forks a running sandbox with its memory, up to 20 copies per call, and ships a Linux desktop for computer use.
  • Open source and your own cloud. Its runtime is Apache-2.0, and Enterprise customers can run it in their own AWS, GCP or Azure account.

Use Modal VM Sandboxes when

you need a full kernel with raw TCP and nested virtualization on Team for jobs that finish within a day, or already run your models on Modal.

  • More kernel and network features. Modal VMs offer nested virtualization on Team by request, plus raw TCP tunnels and an inbound IP allowlist.
  • A bit more CPU per sandbox. In the same benchmark run at 4 vCPU / 8 GB, Modal's VM runtime did 15.54 runs per second and E2B did 12.61.
  • One platform with inference and training. Useful if you already serve or train models on Modal: sandboxes and models sit on one account and one bill.

Where bochka fits

E2B and Modal VM Sandboxes are both built around short sessions that end within a day. If your agents work for hours or days on a machine they come back to, with Docker, emulators and a desktop, bochka gives them a faster VM that keeps its disk and has no session cap on paid plans.

No 24-hour cutoff, disk kept

Both stop a session at 24 hours. On E2B your code has to pause and resume it; on Modal the VM's root disk is gone, so you snapshot the filesystem or use a Volume and boot a new sandbox.

Faster CPU and /dev/kvm

bochka did 26.69 runs per second against 12.61 on E2B and 15.54 on Modal, so builds wait less. E2B has no nested virtualization, and Modal offers it only on Team and Enterprise after you ask.

Desktop, agents and keys built in

Modal has no desktop, so you install Xvfb, VNC and a browser yourself. On both, you build the agent harness, and keys sit in environment variables or a beta header injector instead of a credentials proxy for any HTTPS API.

Use bochka when your agents work for hours or days in a machine they come back to: installs, builds, tests, Docker, emulators and a desktop, on a faster VM that keeps its disk and never cuts them off. Compare it one to one: bochka vs E2B and bochka vs Modal VM Sandboxes.

Questions people ask

Is E2B cheaper than Modal VM Sandboxes?

In most of our scenarios Modal costs less: sandboxes for your users cost $1,395 a month on E2B against $792 on Modal. For 1,000 short jobs at once, E2B is cheaper at $2,797 a month against $3,193, and bochka is $200 a month for the user sandboxes.

Which is faster, E2B or Modal VM Sandboxes?

On the hpc-sandbox-benchmarks CPU test at 4 vCPU / 8 GB, Modal's VM runtime did 15.54 runs per second and E2B did 12.61. bochka did 26.69 in the same run. This measures CPU speed, not start time.

How long can a sandbox run on E2B and Modal?

Both stop at 24 hours: E2B on Pro (1 hour on Hobby, and pausing resets the clock) and Modal on every plan, with a 5-minute default. bochka has no session cap on paid plans.

Can E2B and Modal run Docker and Android emulators?

Both run Docker inside the sandbox. E2B does not support nested virtualization, and Modal offers it on Team and Enterprise after you ask support. bochka exposes /dev/kvm on every plan.

Can Modal VM Sandboxes pause with memory like E2B?

Not in the same way. E2B pauses with memory and resumes in about a second with processes running. Modal has no paused state; its memory snapshots are alpha, end the sandbox and expire after 7 days.

Is bochka SOC 2 compliant?

SOC 2 is in progress. We're open about where we stand: live status at status.bochka.xyz and our data retention policy at docs.bochka.xyz/data-retention.

Try bochka

Install the CLI, then run bochka new.

Product preview

More comparisons

Bochka product preview · Pricing, benchmarks and commands are illustrative. Sandbox provisioning is not connected.