E2B vs CodeSandbox SDK
Both give each sandbox its own Firecracker microVM that can sleep with its memory and wake on the next request. E2B adds a desktop, outbound rules, more regions and higher concurrency but stops a session at 24 hours, while CodeSandbox SDK has no hard session cap and bigger machines but is now Together's legacy SDK.
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
CodeSandbox SDK
CodeSandbox SDK is an API from CodeSandbox, now a Together AI company, that starts sandboxed development VMs on the same infrastructure as the CodeSandbox editor.
Each sandbox is a Firecracker microVM built from a template or any Dockerfile. When it goes idle it hibernates with a memory snapshot, and it resumes or forks from that snapshot in seconds. You drive it from a TypeScript SDK through terminals, commands, files and HTTPS hosts. Together's docs now call it the legacy offering and point new users to its successor, the together-sandbox SDK.
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 | CodeSandbox SDK: price rank | boat: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month Both run Docker, but E2B stops a session at 24 hours and neither offers nested virtualization; boat has no session cap and runs builds about twice as fast as E2B on the CPU benchmark. | 16th cheapest of 367 $4,143 a month | 178th of 367, with limits $1,939 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 E2B's 24-hour cap, while CodeSandbox SDK has no hard cap; boat keeps running with its agent and browser built in. | 51st of 366, with limits $5,348 a month | 215th of 366, with limits $2,478 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 suit short code runs that sleep with their memory and wake on the next request; E2B bills per second, CodeSandbox SDK per started minute. | 37th cheapest of 345 $421 a month | 46th cheapest of 345 $642 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 E2B fits 300 users at once on Pro+, while CodeSandbox SDK's Scale plan stops at 250 VMs; boat adds raw TCP, SSH and a desktop for each user. | 23rd cheapest of 361 $2,354 a month | 140th of 361, with limits $1,707 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 Both fork running sandboxes with their memory, but E2B's concurrency up to 1,100 slots self-serve fits large rollout batches that CodeSandbox SDK's 250-VM Scale cap does not. | 2nd cheapest of 360 $9,384 a month | 348th of 360, with limits $3,861 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 | 64th cheapest of 364 $1,335 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 CodeSandbox SDK fully fits CI runners while E2B is a compromise here; CI jobs that build Android apps or VM images need /dev/kvm, which only boat has. | 337th of 377, with limits $1,429 a month | 92nd cheapest of 377 $860 a month | 4th cheapest of 377 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB A dev box that runs all month hits E2B's 24-hour cap and neither has a dedicated IP; boat has no session cap and a dedicated IPv4 or IPv6. | 192nd of 368, with limits $358 a month | 310th of 368, with limits $240 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 CodeSandbox SDK has none; boat streams its desktop at 60fps. | 32nd cheapest of 369 $1,342 a month | 206th of 369, with limits $691 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 | 251st of 367, with limits $443 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 | 281st of 346, with limits $508 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 | 193rd of 338, with limits $7,390 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 | 240th of 360, with limits $326 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 | CodeSandbox SDK | boat |
|---|---|---|---|
| Isolation | Firecracker microVM with its own kernel | Firecracker microVM with its own kernel | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| CPU benchmark (4 vCPU / 8 GB) | 12.61 runs/s | Not measured | 26.69 runs/s |
| Biggest machine | Up to 8 vCPU / 8 GiB self-serve, more on request | Up to 16 cores / 32 GB on Scale, 64 cores / 128 GB on Enterprise | Up to 16 vCPU / 32 GB on the $100 plan and above |
| Session length | Up to 1 hour on Hobby, 24 hours on Pro; pausing resets the clock | No hard cap; hibernates after an idle timeout of up to one day | No cap on paid plans; you set the time to live |
| Pause and resume | Saves memory and disk; resumes in about 1 second with processes running | Hibernates with a memory snapshot; resumes with processes running | Disk is saved every minute and on stop; resume boots the machine again |
| Fork | Fork a running sandbox with its memory, up to 20 copies per call | Fork a hibernated sandbox from its snapshot, or a running one sharing its memory | Fork a running sandbox with its disk |
| Concurrency | 100 on Pro, up to 1,100 self-serve with add-ons | 250 VMs at once on Scale, more on Enterprise | No concurrency cap at these sizes; start limits apply on bursts |
| Nested virtualization | Not supported | Not documented | Yes, /dev/kvm for Android emulators and VMs |
| Shell access | SSH supported, plus commands and files through the SDK | Terminals, commands and files through the SDK; no SSH | SSH, plus exec and files over the API |
| Inbound access | HTTPS URL per port, public by default unless you turn on a token; no raw TCP | HTTPS host per port, public by default, signed tokens for private hosts; no raw TCP | HTTPS URLs for up to 50 ports, token-protected by default; raw TCP; dedicated IPv4 or IPv6 |
| Desktop and browser | Linux desktop for computer use | No desktop; a headless Chromium template | Linux desktop streamed at 60fps, Chromium and computer-use tools |
| Keeping API keys out of the sandbox | Secrets injected into outbound HTTPS headers (private beta) | Secrets passed in as environment variables | Credentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out |
| Outbound rules | Allow and deny lists by IP, CIDR or domain | No provider-side allowlist | Open internet, no provider-side allowlist |
| Regions and self-hosting | US, EU and APAC; open-source runtime and bring your own cloud on Enterprise | Country hint steers scheduling, not guaranteed; no self-hosting | EU only (Germany, Finland, France); no self-hosting |
Every feature Battleships tracks (43)
| Feature | E2B | CodeSandbox SDK | boat |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Yes | Yes | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Yes | Not published | Yes |
| Desktop GUI | Yes | No | Yes |
| Browser | Yes | No | Yes |
| Computer-use API | Yes | No | Yes |
| SSH | Yes | No | Yes |
| Persistent disk | Yes | Yes | Yes |
| Pause/resume | Yes | Yes | Yes |
| Automatic snapshots | Yes | Yes | 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 | Yes | No |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | No | No | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | Yes | No | 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 | No | Yes |
| Audit logs | Not published | Not published | No |
| SSO | No | Yes | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | Yes | No | No |
| EU data residency | Yes | No | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
E2B and boat were measured in the same StarSling hpc-sandbox-benchmarks run, a Node.js build-and-test loop at 4 vCPU / 8 GB: E2B did 12.61 runs per second and boat did 26.69, about twice as much CPU work. CodeSandbox SDK has no comparable CPU measurement, so we cannot say how it compares. 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. CodeSandbox SDK has no published run in this suite yet, so there is no like-for-like number to compare.
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 | CodeSandbox SDK, 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 | $193 · Scale | $20 · $20/mo |
| One agent that never stops 4 vCPU / 8 GB, 50 GB disk, running 24/7 all month | $368 · Pro · with limits | $341 · Scale | $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,500 · Scale | $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) | $815 · Scale · with limits | $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) | $1,632 · Scale · 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 each extra 500 concurrent slots costs $500 a month.
CodeSandbox SDK: CodeSandbox SDK sells VM credits, and each size burns a fixed number per hour, billed per started minute while the VM runs, including the idle time before it hibernates. Scale adds a $170 monthly platform fee that is not usage credit, and a hibernated VM costs nothing.
CodeSandbox SDK: 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
E2B caps a session at 24 hours on Pro, so it does not fit the always-on scenario, where CodeSandbox SDK does. CodeSandbox SDK's Scale plan stops at 250 VMs at once, so it does not fit 300 user sandboxes or 1,000 short jobs, which E2B covers on Pro+ and Pro++. Both include about 20 GB of disk with no published price for more, and neither publishes an egress price. boat has no session cap, but at 1,000 short jobs its start limits queue the burst.
| Scenario | E2B | CodeSandbox SDK | 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 |
| 1,000 short jobs at once |
|
|
|
Which one should you use?
Use E2B when
you run many short jobs at high concurrency, need a desktop for computer use, outbound rules, US or APAC regions, or your own cloud.
- Desktop and outbound rules. For computer-use agents or locked-down jobs, E2B has a Linux desktop and can limit which hosts a sandbox reaches.
- More concurrency and regions. For large fleets, E2B goes up to 1,100 sandboxes at once self-serve and runs in the US, EU and APAC.
- 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 CodeSandbox SDK when
sandboxes stay busy for longer than a day or need machines bigger than 8 GiB, wake on HTTP requests, and you are fine building on what Together now calls its legacy SDK.
- No hard session cap. For sandboxes that stay busy for days, CodeSandbox SDK only hibernates on idle and never cuts a working session at 24 hours.
- Bigger single machines. For heavy builds, Scale goes up to 16 cores and 32 GB, and Enterprise up to 64 cores and 128 GB.
- Wake on an HTTP request. For previews used in short bursts, a request to a host wakes a hibernated VM with its processes still running.
Where boat fits
E2B and CodeSandbox SDK are both built around small Firecracker VMs that sleep with their memory between short bursts of work. If your agents instead work for hours on installs, builds, Docker, emulators and a browser, boat gives each one a full, faster VM with no session cap, the agent and its keys already set up.
Emulators and VMs can start
Neither E2B nor CodeSandbox SDK offers nested virtualization, so Android emulators and VM-based tests cannot run there at all. boat exposes /dev/kvm, with systemd, root, Docker and SSH.
Builds finish sooner
On the same Node.js build loop E2B did 12.61 runs per second and boat 26.69, so every install and test wait takes about twice as long on E2B. CodeSandbox SDK has no comparable measurement.
Agents, desktop and keys built in
On CodeSandbox SDK you build the agent harness and browser yourself and keys sit in environment variables; E2B's key injection is in private beta. boat ships preinstalled agents, a 60fps desktop and a credentials proxy for any HTTPS API.
Use boat when your agents do real work for hours: installs, builds, Docker, emulators and a browser, on a fast full VM with no session cap and the agent and its keys already set up. Compare it one to one: boat vs E2B and boat vs CodeSandbox SDK.
Questions people ask
Is E2B cheaper than CodeSandbox SDK?
In the scenarios on this page CodeSandbox SDK comes out a little cheaper, for example $193 against $202 a month for one coding agent on workdays. But its 250-VM cap means it does not fit 300 user sandboxes or 1,000 short jobs, which E2B does. boat costs less than both in every scenario, for example $20 a month for the workday agent.
Which is faster, E2B or CodeSandbox SDK?
Only E2B has a comparable CPU measurement: 12.61 runs per second on the hpc-sandbox-benchmarks Node.js loop at 4 vCPU / 8 GB. CodeSandbox SDK was not part of that run. boat did 26.69 runs per second in the same run.
Can E2B and CodeSandbox SDK run Docker?
Yes, both run Docker inside the sandbox and give you root. Neither offers nested virtualization, so Android emulators and VMs cannot run; boat exposes /dev/kvm for those.
How long can a sandbox run on each?
E2B stops a session after 1 hour on Hobby and 24 hours on Pro, though pausing and resuming resets the clock. CodeSandbox SDK has no hard cap and only hibernates after an idle timeout of up to one day. boat has no session cap on paid plans.
Is CodeSandbox SDK still maintained?
CodeSandbox is now part of Together AI. Together's docs call the CodeSandbox-based SDK deprecated and name together-sandbox as its successor, while self-serve sign-up still runs through CodeSandbox.
Do E2B or CodeSandbox SDK have a desktop for computer use?
E2B has a Linux desktop for computer-use agents. CodeSandbox SDK has no desktop, only a headless Chromium template. boat streams a Linux desktop at 60fps with Chromium and computer-use tools.
Try boat
Install the CLI, then run boat new.
7-day free trial