E2B vs Modal
E2B gives each agent a Firecracker microVM that can pause with its memory and wake on the next request. Modal gives you short-lived gVisor sandboxes inside a bigger AI cloud, with GPUs from T4 to B300.
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.
- Isolation
- Firecracker microVM per sandbox
- Bring your own cloud
- Enterprise data plane in your AWS, GCP or Azure account
- Compliance
- SOC 2 Type II; HIPAA BAA on request
- Machine size
- 1 to 8 vCPU and 1 to 8 GiB RAM, CPU only
Modal
Modal is a serverless cloud for AI work: inference, training, batch jobs and sandboxed code, all driven from Python, TypeScript or Go code.
Modal Sandboxes are containers you create from code, run commands in, and then terminate. By default they run under gVisor, a user-space kernel from Google; since October 2026 you can also pick a VM runtime with its own Linux kernel for Docker and FUSE (Battleships tracks that as a separate card, Modal VM Sandboxes). It suits teams that already run models on Modal and want short-lived, scalable code execution next to their GPUs.
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 workload | E2B: price rank | Modal: price rank | bochka: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month | 16th cheapest of 367 $4,143 a month | Can't run it | 3rd cheapest of 367 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB Both cap a session at 24 hours, so an always-on assistant has to be paused or restarted; bochka ranks 5th with no session cap on paid plans. | 51st of 366, with limits $5,348 a month | 196th of 366, with limits $1,924 a month | 5th cheapest of 366 $657 a month |
| Code interpreter bursts 100 at once · 1 vCPU / 2 GB · 200,000 sessions of 1 min a month Both fit short code runs; Modal ranks 19th against E2B's 37th, while E2B adds memory pause and wake on request. | 37th cheapest of 345 $421 a month | 19th cheapest of 345 $181 a month | 186th 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 Both fit sandboxes for your users; E2B can wake a paused one on the next request, and bochka ranks 1st with stops that keep the disk. | 23rd cheapest of 361 $2,354 a month | 11th cheapest of 361 $811 a month | Cheapest 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 and Modal 5th: both are built for many short rollouts, and E2B can fork a running sandbox with its memory. | 2nd cheapest of 360 $9,384 a month | 5th cheapest of 360 $19,038 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 | 59th cheapest of 364 $1,244 a month | 10th cheapest of 364 $200 a month |
| CI runners 40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month E2B runs Docker in every sandbox while Modal needs its VM runtime, but neither has nested virtualization for Android or VM builds; bochka ranks 4th. | 337th of 377, with limits $1,429 a month | 126th cheapest of 377 $1,793 a month | 4th cheapest of 377 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB Neither keeps a dev box running all month, and Modal also resets the root disk when a sandbox ends; bochka ranks 18th. | 192nd of 368, with limits $358 a month | 138th of 368, with limits $23 a month | 18th 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 only has a VNC example you set up yourself; bochka ranks 6th with a 60fps desktop. | 32nd cheapest of 369 $1,342 a month | 98th of 369, with limits $183 a month | 6th 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 | 177th of 367, with limits $136 a month | 7th 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 | 267th of 346, with limits $394 a month | 6th 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 | 223rd of 338, with limits $8,795 a month | 71st 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 | 11th cheapest of 360 $1,043 a month | Can't run it | 2nd cheapest of 360 $200 a month |
| GPU eval jobs 10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month Modal has GPUs from T4 to B300 and neither E2B nor bochka has any, so Modal is the pick here. | Can't run it | 19th cheapest of 98 $1,187 a month | Can't run it |
| macOS agents 5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month | Can't run it | Can't run it | Can't run it |
Key features
| Feature | E2B | Modal | bochka |
|---|---|---|---|
| Isolation | Firecracker microVM with its own kernel | gVisor user-space kernel by default; VM runtime with its own kernel available | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| CPU benchmark (4 vCPU / 8 GB) | 12.61 runs/s | 12.79 runs/s (default sandbox) | 26.69 runs/s |
| Docker inside | Yes | Only with the VM runtime | Yes, in every sandbox |
| Nested virtualization | Not supported | VM runtime only, Team and Enterprise plans, on request | Yes, /dev/kvm for Android emulators and VMs |
| Longest session | 1 hour on Hobby, 24 hours on Pro; pausing resets the clock | 24 hours (default 5 minutes) | No cap on paid plans; you set the time to live |
| Pause and resume | Pauses with memory and disk; resumes in about a second with processes running | No paused state; a finished sandbox is gone, only Volumes keep files | Disk saved every minute and on stop; a stopped sandbox costs nothing and boots again |
| Wake on request | Yes, a paused sandbox resumes on the next HTTP request or SDK call | No | No, a stopped sandbox is started by API |
| Fork | Fork a running sandbox with its memory, up to 20 copies per call | Snapshot the filesystem into an image and boot new sandboxes from it | Fork a running sandbox with its disk, without stopping it |
| GPUs | None | T4 to B300; 10 at once on Starter, 50 on Team | None |
| Desktop and computer use | Linux desktop for computer use | Not offered; an example shows how to set up VNC yourself | 60fps desktop, Chromium and computer-use API built in |
| Inbound access | HTTPS URL per port, public by default unless you turn on a token | Encrypted and raw TCP tunnels, connect tokens, inbound IP allowlist | HTTPS URLs for up to 50 ports, token-protected by default, plus raw TCP and a dedicated IP |
| Keeping API keys out of the sandbox | Secrets injected into outbound HTTPS headers (private beta) | Secrets are environment variables, or you run your own proxy in a sidecar | Credentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out |
| Regions | US by default; EU and APAC on Pro and above, enabled by support | US, EU and Asia-Pacific plus narrower regions; pinning costs 1.15x to 1.75x | EU only (Germany, Finland, France) |
| Self-hosting | Open-source runtime, plus bring your own cloud on Enterprise | No | No |
Every feature Battleships tracks (43)
| Feature | E2B | Modal | bochka |
|---|---|---|---|
| Full VM (own kernel) | Yes | No | Yes |
| Docker inside | Yes | No | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Yes | Yes | Yes |
| Desktop GUI | Yes | No | Yes |
| Browser | Yes | No | Yes |
| Computer-use API | Yes | No | Yes |
| SSH | Yes | Yes | Yes |
| Persistent disk | Yes | Yes | Yes |
| Pause/resume | Yes | No | Yes |
| Automatic snapshots | Yes | No | Yes |
| Fork/clone | Yes | Yes | Yes |
| Live fork (no pause) | Yes | No | Yes |
| Memory fork | Yes | Yes | No |
| Custom image (Docker or snapshot) | Yes | Yes | Yes |
| ≥24 h sessions | Yes | Yes | Yes |
| Idle auto-stop | Yes | Yes | No |
| Wake on request | Yes | No | No |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | No | Yes | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | Yes | Yes | No |
| Secret proxy | Yes | No | Yes |
| Secret proxy for any API | Yes | No | Yes |
| Preinstalled agents | Yes | No | Yes |
| Agent harness API | No | No | Yes |
| MCP server | Yes | No | No |
| GPU | No | Yes | No |
| Windows | No | No | No |
| Arm64 | No | No | No |
| Self-hosting | Yes | No | No |
| BYOC | Yes | No | No |
| Open source | Yes | No | No |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Yes | Not published | Yes |
| Usage per sandbox (API) | No | Not published | Yes |
| Audit logs | Not published | Yes | No |
| SSO | No | Yes | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | Yes | Yes | No |
| EU data residency | Yes | Yes | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
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. E2B did 12.61 runs per second and Modal's default gVisor sandbox 12.79, so the two are close. bochka did 26.69, about twice the CPU work of either.
Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Modal measured on: Sandbox (gVisor), request = size, any region.
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.
| Scenario | E2B, a month | Modal, a month | bochka, 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: Modal bills by the second for whichever is higher, the CPU and memory you request or what you use, until the sandbox is terminated. Starter is free with $30 of monthly credit, Team is $250 a month with $100 of credit, and egress above the free allowance costs $0.04 per GiB.
Modal: bochka plans start at $20 a month and the whole fee is usage credit. You pay per second while a sandbox runs, and a stopped sandbox costs nothing and keeps its disk.
Limits in those scenarios
Both E2B Pro and Modal cap a session at 24 hours, so neither fits the always-on agent. Modal also wipes the root disk when a sandbox ends and needs its VM runtime for Docker, which is why it misses the workday and 50-agent scenarios even though it costs less there. 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 that other tenants can slow down. bochka fits the first four scenarios but not that burst, because its start limits per hour and per day are too low.
| Scenario | E2B | Modal | bochka |
|---|---|---|---|
| One coding agent, workdays |
|
| None that bite |
| One agent that never stops |
|
| None that bite |
| 50 agents in parallel |
|
| None that bite |
| Sandboxes for your users |
| None that bite | None that bite |
| 1,000 short jobs at once |
|
|
|
Which one should you use?
Use E2B when
your agents run short jobs that pause between requests, need Docker in every sandbox, or you want an open-source runtime you can host.
- Memory pause and wake on request. For jobs that sleep between requests: a paused E2B sandbox comes back in about a second with its processes still running.
- Docker in the default sandbox. Every E2B sandbox is a microVM that runs Docker, while Modal needs its separate VM runtime for that.
- Open source and your own cloud. E2B's runtime is Apache-2.0, and Enterprise customers can run it in their own AWS, GCP or Azure account.
Use Modal when
your sandboxes need GPUs, sit next to models you already run on Modal, or come in huge bursts across many regions.
- GPUs on the same platform. If your agent trains or runs models, Modal rents GPUs from T4 to B300 next to its sandboxes.
- More regions to pick from. Modal runs in the US, EU and Asia-Pacific and lets you pin a sandbox to a region, for a higher rate.
- Very large bursts. Modal's Team plan runs up to 5,000 containers at once, which suits huge waves of short jobs.
Where bochka fits
E2B and Modal both shine at short jobs that start fast and end soon. If your agents work for hours or days, with installs, builds, Docker, emulators and a desktop, bochka gives each one a full, faster VM that keeps its disk and is never cut off.
No 24-hour cutoff
E2B Pro and Modal both end a session at 24 hours. On E2B your code has to pause and resume the sandbox; on Modal the root disk is gone, so files survive only if you wrote them to a Volume.
About twice the CPU work
On the same benchmark at 4 vCPU / 8 GB, bochka did 26.69 runs per second, E2B 12.61 and Modal's default sandbox 12.79. Every install, build and test waits about twice as long on either, and you pay for the wait.
A full machine with agents built in
Neither has /dev/kvm for Android emulators, Modal's default sandbox has no Docker, and on both you wire up the agent harness yourself. bochka ships Claude Code, Codex and others, a 60fps desktop, and a proxy that keeps real API keys out.
Use bochka when your agents work for hours or days: installs, builds, tests, Docker, emulators and a desktop, on a fast machine that keeps its disk and never cuts them off. Compare it one to one: bochka vs E2B and bochka vs Modal.
Questions people ask
Is E2B cheaper than Modal?
Usually not. One always-on agent costs $368 a month on E2B against $178 on Modal, and sandboxes for your users cost $1,395 against $792. For 1,000 short jobs at once E2B is cheaper, $2,797 against $3,193, and bochka costs less than E2B in every scenario and less than Modal in all but one agent on workdays.
Which is faster, E2B or Modal?
On the hpc-sandbox-benchmarks CPU test at 4 vCPU / 8 GB, E2B did 12.61 runs per second and Modal's default sandbox 12.79, so they are about even. bochka did 26.69 in the same run.
Can E2B and Modal run Docker?
E2B runs Docker inside its sandboxes. Modal's default gVisor sandbox does not document Docker; you need its VM runtime. Every bochka sandbox runs Docker, and also has /dev/kvm for emulators, which neither of the others offers by default.
How long can a sandbox run on E2B and Modal?
E2B allows 1 hour on Hobby and 24 hours on Pro, and pausing resets the clock. Modal's default timeout is 5 minutes and its maximum is 24 hours. bochka has no session cap on paid plans.
Does E2B or Modal have GPUs?
Modal does, from T4 up to B300, on its gVisor runtime. E2B is CPU only, and so is bochka.
Can I pause a sandbox and come back later?
E2B can pause a sandbox with its memory and resume it in about a second. Modal has no paused state, so only files in a Volume survive. bochka saves the disk every minute and on stop, and a stopped sandbox costs nothing.
Try bochka
Install the CLI, then run bochka new.
Product preview