What is E2B?
E2B rents out small, short-lived Linux computers for AI agents. Each sandbox is a Firecracker microVM with its own kernel, started from the Python or JavaScript SDK, where an agent can run code and shell commands, edit files and serve a web app. Sandboxes can be paused with their memory and disk intact and resumed later. The company says more than 2 billion sandboxes have been started.
Billing is per second: $0.000014 per vCPU and $0.0000045 per GiB of RAM, about $0.17 an hour for the default machine of 2 vCPUs and 4 GiB. Hobby is free with a one-time $100 credit and 1-hour sessions; Pro is $150 a month for 24-hour sessions and 100 sandboxes at once; Enterprise starts at a $2,000 monthly commitment and adds deployment in your own cloud. The runtime is open source under Apache-2.0 at e2b-dev/runtime, formerly e2b-dev/infra.
How much does E2B cost?
| Plan | Price | What you get |
|---|---|---|
| Hobby | $0 + usage | $100 one-time credit, 1-hour sessions, 20 concurrent sandboxes |
| Pro | $150/month + usage | 24-hour sessions, 100 concurrent, +$500/month per 500 more, up to 1,100 |
| Enterprise | From $2,000/month commit | 500 concurrent included, BYOC, HIPAA BAA |
Hobby $0 + usage ($100 one-time credit, 1-hour sessions, 20 concurrent sandboxes); Pro $150/month + usage (24-hour sessions, 100 concurrent, +$500/month per 500 more, up to 1,100); Enterprise from a $2,000/month commit (500 concurrent included). Per second: $0.000014 per vCPU and $0.0000045 per GiB of RAM, about $0.17/hour for the default 2 vCPU, 4 GiB sandbox.
Is E2B worth it?
Letting an AI agent run the code it writes is the whole point of an agent, and also the part that can go badly wrong. A script that deletes files, leaks a key or loops forever should hit a wall, not your server.
E2B gives each agent session its own small Linux computer in the cloud. Every sandbox is a Firecracker microVM, a lightweight virtual machine with its own kernel, so one user's code cannot see another's. You start one with a couple of lines of Python or JavaScript, run commands, read and write files, and throw it away. Pausing saves the memory and the disk, and the docs say a paused sandbox is kept until you delete it.
The meter is cheap. You pay $0.000014 a second per vCPU and $0.0000045 per GiB of memory, so the default sandbox of 2 vCPUs and 4 GiB costs about $0.17 an hour, and storage is free. The pricing calculator puts 1,000 sandbox hours at $166, roughly 12,000 five-minute agent sessions. Hobby is free with a one-time $100 credit, about 600 hours of the default sandbox, but each sandbox can run for only 1 hour before it must pause. Pro costs $150 a month with no included credit, allows 24-hour runs and 100 sandboxes at once, and each extra 500 costs $500 a month, up to 1,100.
The paperwork is in order. E2B says it holds a SOC 2 Type II report, available under NDA from its trust centre, signs HIPAA agreements only on Enterprise, and runs its managed sandboxes on Google Cloud. Enterprise starts at a $2,000 monthly commitment with 500 concurrent sandboxes and can run inside your own AWS, Google Cloud or Azure account. The runtime itself is open source under Apache-2.0, and a single-machine version called Embed runs on any Linux host with KVM.
The catch: the defaults favour convenience over safety. Every sandbox has outbound internet access, and its public URLs answer anyone who has the link unless you restrict them; the docs warn that this includes the Code Interpreter server, which runs whatever code it is sent. There are no GPUs, sandboxes top out at 8 vCPUs and 8 GiB unless you ask support, and Hobby lets you create only 1 new sandbox a second, Pro 5.
Our take: E2B is the sandbox you bolt onto an agent you already have, while Modal is a cloud you move your whole Python stack onto. For untrusted code billed by the minute, E2B's per-second rates and pause-and-resume make the simpler bill. When the agent also needs a GPU, Modal does both under one account, though it charges three times its normal rate for sandboxes.
Where it earns its place
A three-person startup building a data-analysis chat assistant
Run the Python the model writes on users' uploaded spreadsheets without risking our servers
Each chat gets a Code Interpreter sandbox that keeps variables between calls. 50,000 five-minute sessions a month is about 4,170 sandbox hours, roughly $690 at the default size plus the $150 Pro fee; restrict public URLs before launch.
A research team at an AI lab running reinforcement-learning experiments
Launch hundreds of sandboxes at once to score code a model writes
Pro+ raises the cap to 600 concurrent sandboxes for $650 a month in plan fees. A 1 vCPU, 1 GiB sandbox costs about $0.067 an hour, so 5,000 sandbox hours of grading comes to about $333. E2B's homepage quotes a team that did this for Open R1.
The head of platform at a 2,000-person bank
Let internal coding agents run code without data leaving our cloud account
Enterprise BYOC puts the sandboxes in the bank's own AWS, Google Cloud or Azure VPC, with only anonymised CPU and memory metrics sent to E2B. Budget from the $2,000 monthly commitment, and note that E2B's SOC 2 report covers its software and control plane, not your account.
Before you commit
- Setup
- pip install e2b or npm i e2b, set E2B_API_KEY, and Sandbox.create() returns a running sandbox; custom environments are built as templates from a base image with the CLI or SDK.
- Integrations
- Python and JavaScript/TypeScript SDKs, a CLI and a REST API; documented guides for Claude Code, Codex, Amp, Devin, Google ADK, CrewAI and Mastra, plus volumes, snapshots, forking, SSH and a Desktop template for computer-use agents.
- Data and privacy
- SOC 2 Type II, report under NDA; HIPAA BAA and BYOC only on Enterprise; managed sandboxes run on Google Cloud with encryption at rest and TLS, and are destroyed on timeout unless paused. The security page does not address training use.
- Cost at scale
- 100 default sandboxes running around the clock is about 73,000 hours, roughly $12,100 a month plus the $150 Pro fee; at that size the $2,000 Enterprise commitment with 500 concurrent included is worth pricing.
- Limits
- Hobby: 1-hour runs, 20 concurrent, 1 new sandbox a second. Pro: 24-hour runs, 100 to 1,100 concurrent, 5 a second. List endpoints allow 10 to 20 requests a second, and a pause can be refused with a 503 while a previous snapshot finishes.
What’s good
- A Firecracker microVM with its own kernel for every sandbox
- About $0.17 an hour for the default sandbox, billed per second
- Pause keeps memory and disk, with no expiry
- Apache-2.0 runtime you can run yourself on a KVM host
What’s not
- Public URLs and outbound internet are open by default
- Hobby sessions stop after 1 hour, and the $100 credit is one-time
- No GPUs; 8 vCPUs and 8 GiB unless you ask support
- HIPAA and your-own-cloud deployment only on Enterprise, from $2,000 a month
Best for
Teams building AI agents that need to run model-written or user-submitted code in an isolated machine, billed by the second.
E2B alternatives
E2B: common questions
- Is E2B worth it?
- E2B gives every agent its own throwaway computer for pennies an hour, but you have to lock the doors yourself. We rate it 4.4 out of 5.
- How much does E2B cost?
- Hobby $0 + usage ($100 one-time credit, 1-hour sessions, 20 concurrent sandboxes); Pro $150/month + usage (24-hour sessions, 100 concurrent, +$500/month per 500 more, up to 1,100); Enterprise from a $2,000/month commit (500 concurrent included). Per second: $0.000014 per vCPU and $0.0000045 per GiB of RAM, about $0.17/hour for the default 2 vCPU, 4 GiB sandbox.
- What are the downsides of E2B?
- Public URLs and outbound internet are open by default; hobby sessions stop after 1 hour, and the $100 credit is one-time; no GPUs; 8 vCPUs and 8 GiB unless you ask support; hIPAA and your-own-cloud deployment only on Enterprise, from $2,000 a month.
- Who is E2B best for?
- Teams building AI agents that need to run model-written or user-submitted code in an isolated machine, billed by the second.
- How much does E2B cost for a team or in production?
- 100 default sandboxes running around the clock is about 73,000 hours, roughly $12,100 a month plus the $150 Pro fee; at that size the $2,000 Enterprise commitment with 500 concurrent included is worth pricing.
- Is E2B safe for company data?
- SOC 2 Type II, report under NDA; HIPAA BAA and BYOC only on Enterprise; managed sandboxes run on Google Cloud with encryption at rest and TLS, and are destroyed on timeout unless paused. The security page does not address training use.
- What are the best E2B alternatives?
- The closest alternatives we have reviewed are Modal.
Answers checked Nov 1, 2026.
