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 ready desktop, outbound rules, more regions and higher concurrency, but stops one run at 24 hours on Pro. CodeSandbox SDK has no hard session cap, bigger machines and images from any Dockerfile, but Together now calls it its deprecated 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. Its runtime is open source, and E2B Embed runs it on your own infrastructure.
- Isolation
- Firecracker microVM per sandbox
- Open source and self-hosting
- Runtime under Apache-2.0; E2B Embed runs it with Docker Compose, Terraform or Kubernetes
- Bring your own cloud
- Enterprise data plane in your AWS, GCP or Azure account
- Compliance
- SOC 2 Type II; HIPAA BAA on request
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 call it the deprecated 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. “20th cheapest of 365” means 19 of the other 364 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 fit: CodeSandbox SDK ranks 32nd at $3,731 a month and E2B 20th at $4,143. E2B stops one run at 24 hours on Pro, and neither documents nested virtualization. boat ranks 5th at $634. | 20th cheapest of 365 $4,143 a month | 32nd cheapest of 365 $3,731 a month | 5th cheapest of 365 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB CodeSandbox SDK fits an assistant that lives on its machine all month (50th): it has no hard session cap. E2B is a compromise because one run stops at 24 hours on Pro. boat ranks 6th with auto-stop off. | 82nd of 361, with limits $5,348 a month | 50th cheapest of 361 $4,811 a month | 6th cheapest of 361 $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 that sleep with their memory and wake on the next request. E2B bills per second ($421 a month); CodeSandbox SDK bills per started minute ($642). | 43rd cheapest of 336 $421 a month | 54th cheapest of 336 $642 a month | 189th of 336, 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 sandboxes for your users on Pro+ at $1,395 a month. CodeSandbox SDK's Scale plan stops at 250 VMs, so it is a compromise. boat ranks 3rd at $209. | 33rd cheapest of 349 $2,354 a month | 140th of 349, with limits $1,707 a month | 3rd cheapest of 349 $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. E2B ranks 5th: up to 1,100 sandboxes at once self-serve fits large rollout batches. CodeSandbox SDK's Scale cap of 250 VMs makes it a compromise. | 5th cheapest of 349 $9,384 a month | 341st of 349, with limits $3,861 a month | 39th of 349, with limits $2,000 a month |
| Agent evals 250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month | 87th cheapest of 359 $1,975 a month | 77th cheapest of 359 $1,335 a month | 10th cheapest of 359 $200 a month |
| CI runners 40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month CodeSandbox SDK fits CI runners (96th); E2B is a compromise. CI jobs that build Android apps or VM images need /dev/kvm, which boat has and neither documents. boat ranks 2nd. | 338th of 374, with limits $1,429 a month | 96th cheapest of 374 $860 a month | 2nd cheapest of 374 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB Both are a compromise for a dev box that runs all month: E2B needs a daily pause past 24 hours, and CodeSandbox SDK documents no SSH. boat ranks 19th, with SSH; its IP changes at each resume. | 208th of 371, with limits $358 a month | 316th of 371, with limits $240 a month | 19th cheapest of 371 $26 a month |
| Computer-use agents 50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month Both fit. E2B ships a Linux desktop sandbox. On CodeSandbox SDK you add a VNC desktop to your own template. boat streams its desktop at 60 fps. | 34th cheapest of 367 $1,342 a month | 54th cheapest of 367 $1,236 a month | 7th cheapest of 367 $200 a month |
| Browser-use agents 50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month | 126th of 356, with limits $746 a month | 125th of 356, with limits $741 a month | 7th cheapest of 356 $200 a month |
| Scraping & bots (startup scale) 50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month | 62nd cheapest of 343 $554 a month | 119th cheapest of 343 $871 a month | 6th cheapest of 343 $90 a month |
| Mass scraping & bots (undetectable) 1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month | 226th of 327, with limits $9,223 a month | 194th of 327, with limits $7,390 a month | 73rd of 327, with limits $1,800 a month |
| Parallel red teaming 200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month | 17th cheapest of 351 $1,043 a month | 29th cheapest of 351 $505 a month | 3rd cheapest of 351 $200 a month |
| GPU eval jobs 10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month | Not ranked: misses a requirement | Not ranked: misses a requirement | Not ranked: misses a requirement |
| macOS agents 5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month | Not ranked: misses a requirement | Not ranked: misses a requirement | Not ranked: misses a requirement |
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 hosts dedicated to boat (AMD Ryzen 7 9700X and Ryzen 9 9950X); shared vCPUs |
| CPU benchmark (V8 Web Tooling, 4 vCPU / 8 GB, StarSling run of 3 October 2026) | 11.08 runs/s, rank 7 of 15 (shared) | Not in this run | 28.06 runs/s, second of 15 (shared rank 2), on a Ryzen 9 9950X host |
| 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; 20 GB disk | 16 vCPU / 32 GB / 251 GB disk on the $100 plan and above |
| Session length | One run: 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 once auto-stop is off on a paid plan; auto-stop defaults to 1 hour, up to 30 days |
| Pause and resume | Saves memory and disk; resumes in about 1 second with processes running | Hibernates with a memory snapshot; resumes with processes running in about 0.5 to 2 s, longer after the snapshot is archived | Disk saved every minute and at each stop, kept at least 14 days; resume boots the machine again, like a reboot |
| 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 from its last 1-minute disk snapshot |
| Concurrency | 100 on Pro, up to 1,100 self-serve on Pro++ | 250 VMs at once on Scale, more on Enterprise | 100 on $20, 300 on $100, up to 2,000 on $2,000; starts per minute, hour and day capped by plan |
| Nested virtualization | Docs list nested-virtualization runtimes as not supported | Not documented | Yes, /dev/kvm for Android emulators and VMs |
| Custom image | Templates built from a Docker image | Templates built from any Dockerfile | Start from boat's Ubuntu 24.04 image or a saved snapshot; you cannot boot your own Docker image |
| Inbound access | HTTPS URL per port, public by default unless you turn on a token; no public IP per sandbox | HTTPS host per port, public by default, signed tokens for private sandboxes; raw TCP and SSH not documented | Up to 50 HTTPS URLs, token-gated by default; SSH; public IPv6; raw ports over IPv6 on sandboxes with no IPv4 of their own |
| Desktop and browser | E2B Desktop sandbox with VNC streaming | Headless Chromium template; you add a VNC desktop to your own Dockerfile | 1920x1080, 60 fps desktop with Chrome 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; no credentials proxy documented | Optional AI credentials proxy ($1 a day while on, plus $1 per 1,000 requests) for supported model providers and HTTPS APIs you register |
| Outbound rules | Allow and deny lists by IP, CIDR or domain | No provider-side allowlist documented | Open internet; no provider-side allowlist, so you set firewall rules inside the VM |
| Regions and self-hosting | US by default, EU and APAC enabled by support; open-source runtime and your own cloud on Enterprise | Country hint steers scheduling, not guaranteed; no self-hosting | Germany, Finland and France; you cannot pick one; no US or Asia region; 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 documented way | No documented way | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Yes | Not published | Yes |
| Desktop GUI | Yes | With your own setup | Yes |
| Browser | Yes | With your own setup | Yes |
| Computer-use API | Yes | No documented way | Yes |
| SSH | Yes | No documented way | 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 documented way |
| Custom image (Docker or snapshot) | Yes | Yes | Yes |
| ≥24 h sessions | Yes | Yes | Yes |
| Idle auto-stop | Yes | Yes | No documented way |
| Wake on request | Yes | Yes | No documented way |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | No documented way | No documented way | Yes |
| Public IPv4 | No documented way | No documented way | No documented way |
| Egress allowlist | Yes | No documented way | No documented way |
| Secret proxy | Yes | No documented way | Yes |
| Secret proxy for any API | Yes | No documented way | Yes |
| Preinstalled agents | Yes | No documented way | Yes |
| Agent harness API | No documented way | No documented way | Yes |
| MCP server | Yes | No documented way | No documented way |
| GPU | No documented way | No documented way | No documented way |
| Windows | No documented way | No documented way | No documented way |
| Arm64 | No documented way | No documented way | No documented way |
| Self-hosting | Yes | No documented way | No documented way |
| BYOC | Yes | No documented way | No documented way |
| Open source | Yes | No documented way | No documented way |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Yes | Not published | Yes |
| Usage per sandbox (API) | No documented way | No documented way | Yes |
| Audit logs | Not published | Not published | No documented way |
| SSO | No documented way | Yes | No documented way |
| SOC 2 | Yes | Yes | No documented way |
| HIPAA | Yes | No documented way | No documented way |
| EU data residency | Yes | No documented way | No documented way |
| Zero data retention | Not published | Not published | Yes |
Performance
In StarSling's run of 3 October 2026 (run 37073680030), the V8 Web Tooling Benchmark at 4 vCPU / 8 GB, boat did 28.06 runs/s (second of 15) and E2B did 11.08 (rank 7, shared), about 2.5x. Every boat sandbox in this run ran on an AMD Ryzen 9 9950X host; boat also places sandboxes on Ryzen 7 9700X hosts, which this run did not measure. Providers ran on different hardware in different regions. CodeSandbox SDK is not in that run, so we cannot say how its CPU compares. For start time with 100 at once, at each provider's default size, ComputeSDK measured a median of 11.76 s for CodeSandbox SDK and 1.1 s for E2B (6 November 2026). boat is not in ComputeSDK.
V8 Web Tooling Benchmark at a 4 vCPU / 8 GB target, runs per second, higher is better. Source: StarSling's run of 3 October 2026 (run 37073680030), median of 5 sandboxes. Providers ran on different hardware in different regions. StarSling gives a shared rank when the run cannot separate two providers. Every boat sandbox in this run ran on an AMD Ryzen 9 9950X host. boat also places some sandboxes on AMD Ryzen 7 9700X hosts, which this run did not measure. CodeSandbox SDK is not in the public benchmarks we use, so we cannot say which is faster.
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. Start limits, per-start fees and plan minimums are in the price, boat's included.
| 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 | $8,800 · $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: $0.33 an hour for 4 vCPU / 8 GiB. A paused sandbox costs nothing. Hobby costs $0 with a one-time $100 credit. Pro costs $150 a month for higher limits, with no usage credit. Pro+ ($650) and Pro++ ($1,150) raise concurrency to 600 and 1,100 sandboxes.
CodeSandbox SDK: CodeSandbox SDK sells VM credits at $0.01486 each, and each size burns a fixed number per hour: 20 for 4 vCPU / 8 GB, about $0.30. Billing is per started minute while the VM runs, including idle time before it hibernates. A hibernated VM costs nothing. Scale adds a $170 monthly platform fee that is not usage credit. These prices are as checked on 28 September 2026.
CodeSandbox SDK: Plans cost $20, $100, $500 or $2,000 a month, and the whole plan price comes back as VM time for that month. Included time does not carry over. A 4 vCPU / 8 GB sandbox costs $0.036 an hour, billed per second while it runs, busy or idle. A stopped sandbox has no compute charge, and boat keeps its disk for at least 14 days. Saved snapshots above the included count and the optional AI credentials proxy still charge while sandboxes are stopped. The $20 plan includes 200 starts a day; extra starts cost $0.03 to $0.07. A card is required, also for the 7-day trial.
Limits in those scenarios
E2B caps one run at 24 hours on Pro, so the always-on scenario needs a daily pause and is marked as not fitting as-is; CodeSandbox SDK fits it. CodeSandbox SDK's Scale plan stops at 250 VMs at once, so 300 user sandboxes and 1,000 short jobs need Enterprise; E2B covers both on Pro+ and Pro++. Both include about 20 GB of disk with no published price for more, and neither publishes an egress price. boat does not fit the 1,000-job burst as-is: the $2,000 plan includes 2,400 starts a day, charges for starts above 90 a minute and refuses them above 270 with 429. boat never queues a start.
| Scenario | E2B | CodeSandbox SDK | boat |
|---|---|---|---|
| One coding agent, workdays |
|
| None for this scenario |
| One agent that never stops |
|
| None for this scenario |
| 50 agents in parallel |
|
| None for this scenario |
| Sandboxes for your users |
|
| None for this scenario |
| 1,000 short jobs at once |
|
|
|
Which one should you use?
Use E2B when
you run many short jobs at high concurrency, need a ready desktop for computer use, outbound rules, US or APAC regions, or your own cloud.
- Ready desktop and outbound rules. For computer-use agents or locked-down jobs, E2B ships a Linux desktop sandbox 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, start from your own Dockerfile, and you accept that Together calls it deprecated.
- No hard session cap. For sandboxes that stay busy for days, CodeSandbox SDK only hibernates on idle and does not cut 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 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 VM with SSH, agents installed and no session cap once auto-stop is off. A boat resume is like a reboot, so memory does not survive a stop.
Emulators and VMs can start
Neither E2B nor CodeSandbox SDK documents nested virtualization, so Android emulators and VM-based tests are not a supported path there. boat exposes /dev/kvm, with systemd, root, Docker and SSH.
CPU speed in one public run
In StarSling's run of 3 October 2026, boat did 28.06 V8 Web Tooling runs/s on a Ryzen 9 9950X host and E2B did 11.08, about 2.5x. boat also uses Ryzen 7 9700X hosts, which the run did not measure. CodeSandbox SDK is not in that run.
Agents, desktop and keys built in
On CodeSandbox SDK you install the agent and a VNC desktop in your template, and keys sit in environment variables; E2B's key injection is in private beta. boat ships seven agents, a 60 fps desktop and an optional credentials proxy ($1 a day plus $1 per 1,000 requests).
Use boat when your agents do hours of installs, builds, Docker, emulators and a browser on a full VM with SSH, agents installed and no session cap once auto-stop is off. Compare it one to one: boat vs E2B and boat vs CodeSandbox SDK.
boat's own limits
- Plans start at $20 a month. The plan price comes back as VM time for that month. Unused time does not carry over. Source
- Starts (create, fork, resume): the $20 plan includes 12 a minute, 60 an hour and 200 a day. The $2,000 plan includes 90 a minute, 600 an hour and 2,400 a day. Extra starts cost $0.03 to $0.07. A start fails with 429 above 3 times the included starts per minute, or 6 times per hour or per day. Source
- A stopped sandbox has no compute charge. boat keeps its disk for at least 14 days. A saved snapshot keeps it longer; extra saved snapshots and the AI credentials proxy are paid. Source
- Auto-stop defaults to 1 hour. You can turn it off on a paid plan. The trial allows 2 hours at most. Source
- boat saves the disk every minute and at each stop. Memory, running programs and /tmp are not saved: a resume is like a reboot. A machine failure loses writes after the last good snapshot. Source
- Machines run in Germany, Finland and France only. Snapshot copies can be stored outside the EU. Source
- Public IPv6 and outbound IPv4. No dedicated IPv4. The IP changes at each resume. Source
- Hosts are AMD Ryzen 7 9700X and Ryzen 9 9950X. vCPUs are shared. No GPU. You cannot boot your own Docker image. Source
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, and $2,500 against $2,773 for 50 agents in parallel. 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 four of the five scenarios, for example $20 for the workday agent; for 1,000 short jobs it needs paid extra starts ($8,800).
Which is faster, E2B or CodeSandbox SDK?
On CPU, only E2B has a result: 11.08 runs/s on the V8 Web Tooling Benchmark at 4 vCPU / 8 GB in StarSling's run of 3 October 2026. CodeSandbox SDK is not in that run. For start time with 100 at once, ComputeSDK measured 1.1 s for E2B and 11.76 s for CodeSandbox SDK. boat did 28.06 runs/s in the StarSling run.
Can E2B and CodeSandbox SDK run Docker?
Yes, both run Docker inside the sandbox and give you root. Neither documents nested virtualization, so Android emulators and VMs are not a supported path. boat exposes /dev/kvm for those.
How long can a sandbox run on each?
E2B stops one run after 1 hour on Hobby and 24 hours on Pro; 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 once auto-stop is off on a paid plan (the default is 1 hour).
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. The last SDK release was 2.4.2 in December 2025. Self-serve sign-up still runs through CodeSandbox.
Do E2B or CodeSandbox SDK have a desktop for computer use?
E2B ships a Linux desktop sandbox for computer-use agents. CodeSandbox SDK has a headless Chromium template, and you can add a VNC desktop to your own Dockerfile. boat streams a Linux desktop at 60 fps with Chrome and computer-use tools.
Try boat
Install the CLI, then run boat new.
7-day free trial