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.
- 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 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.
- Funding
- Over $466M raised
- Generally available
- 1 October 2026; early customers launched over 20 million VMs before that
- Session length
- Default 5 minutes, maximum 24 hours
- Compliance
- SOC 2 on every plan; HIPAA on Enterprise
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 VM Sandboxes: price rank | boat: 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; boat 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 it | 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 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 it | 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 E2B fits and wakes a paused user sandbox on the next request; boat 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 it | 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 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 it | 10th 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); boat 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 it | 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 VM Sandboxes do not; boat streams its desktop at 60fps with a computer-use API. | 32nd cheapest of 369 $1,342 a month | Can't run it | 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 | Can't run it | 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 | Can't run it | 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 | Can't run it | 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 E2B ranks 11th and Modal VM Sandboxes rank 294th; boat 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 it | Can't run it | 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 VM Sandboxes | boat |
|---|---|---|---|
| Isolation | Firecracker microVM with its own kernel | VM with its own Linux kernel on Cloud Hypervisor | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| CPU benchmark (4 vCPU / 8 GB) | 12.61 runs/s | 15.54 runs/s | 26.69 runs/s |
| Longest session | 1 hour on Hobby, 24 hours on Pro; pausing resets the clock | 24 hours (default 5 minutes); continue from a filesystem snapshot | No cap on paid plans; you set the time to live |
| Pause and resume | Saves memory and disk; resume takes about 1 second with processes still running | No paused state; a finished sandbox is gone, only Volumes and snapshots keep files | Stop for free, resume later with the whole disk; saved every minute |
| Wake on request | Yes; a paused sandbox can resume 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; memory snapshots are alpha and end the sandbox | Fork a running sandbox with its disk |
| Docker, systemd, root | Yes | Yes; start dockerd yourself as the entrypoint | Yes, in every sandbox |
| Nested virtualization | Not supported | Team and Enterprise plans only, on request | Yes, /dev/kvm on every plan |
| Desktop and computer use | Linux desktop for computer use | Not offered; an example shows how to set up Xvfb and 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; no raw TCP, no dedicated IP | Encrypted and raw TCP tunnels, connect tokens, inbound IP allowlist | HTTPS URLs for up to 50 ports, token-protected by default; raw TCP; dedicated IPv4 or IPv6 |
| Outbound rules | Allow and deny lists by IP, CIDR or domain | Block all, IP-range allowlist, domain allowlist (beta) | Open internet, no provider-side allowlist |
| Coding agents and API keys | Templates 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 sidecar | Seven agents preinstalled with a prompt, steer and events API; credentials proxy for model providers and any HTTPS API |
| 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 VM Sandboxes | boat |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Yes | Yes | Yes |
| Nested virtualization | No | Yes | 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 | Yes | 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 | No | 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. boat 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 boat 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.
| Scenario | E2B, a month | Modal VM Sandboxes, a month | boat, 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: boat 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; boat's start limits make that scenario a poor fit too.
| Scenario | E2B | Modal VM Sandboxes | boat |
|---|---|---|---|
| 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
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 boat 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, boat 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
boat 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 boat 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: boat vs E2B and boat 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 boat 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. boat 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. boat 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. boat 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 boat SOC 2 compliant?
SOC 2 is in progress. We're open about where we stand: live status at status.ascii.dev and our data retention policy at docs.boat.dev/data-retention.
Try boat
Install the CLI, then run boat new.
7-day free trial