E2B
Free
E2B provides a cloud-isolated sandbox runtime that allows AI Agents to safely execute code, file operations, and automated tasks.
E2B
Core parameters and statistics of E2B
Specific technical parameters (such as model size, context length, supported file formats, etc.) are subject to the official product page.
E2B users and market recognition
E2B's market recognition comes from three verifiable dimensions: public endorsement from leading customers, activity in the open source community, and integration cases from large AI companies.
Enterprise-level customers: The case wall on the official website publicly shows that companies such as Manus (general AI Agent), Hugging Face (Open R1 reinforcement learning training), Groq (composite AI system), Lindy (automated workflow), GenSpark (Agentic Workspace), Rogo (enterprise search), etc. have used E2B in production. The CTO of Manus clearly mentioned in the case that "Manus uses 27 different tools and requires E2B to provide a complete virtual computer to work like a real person" - this shows that E2B is a core execution infrastructure rather than a replaceable component in a complex Agent system.
Community size: GitHub public data shows about 13k stars, 967 forks, 72 contributors and 542 published versions, and the monthly downloads of Python SDK on PyPI continue to grow. The project is licensed under the Apache-2.0 license, and files such as CLAUDE.md and AGENTS.md indicate that the team is actively working to optimize the experience for AI collaborative development.
Financing Signal: The public information of $21M Series A conveys the capital market’s recognition of the AI execution infrastructure track, but the specific valuation, investor lineup and fund use have not been fully disclosed.
B-side landing verification: 94% of Fortune 100 companies are covered by E2B (official caliber), but this number may include trial or PoC levels. Enterprises should still verify the execution success rate, recovery time and concurrency bottlenecks in their own scenarios through PoC before purchasing.
E2B’s cost advantage: three-tier cost structure and hidden cost dismantling
E2B's charging model is a two-tier structure of "subscription fee + per-second usage", which is significantly different from the self-built sandbox solution in the TCO dimension.
C-side/individual developer
- Hobby (Free): Get $100 in credit when you sign up, no credit card required. The maximum time limit for a single sandbox is 1 hour, and the maximum concurrency is 20. For personal prototyping and small-scale experimentation, the $100 free credit typically covers hundreds of short-lived sandbox executions.
- Billing by second: Using vCPU as the unit price, 1 vCPU is $0.000014/s (approximately $0.0504/h), 2 vCPU is $0.000028/s (approximately $0.1008/h), and 4 vCPU is $0.000056/s (approximately $0.2016/h). Billing by seconds instead of minutes is beneficial for short tasks in milliseconds, but the cost will accumulate linearly in long session scenarios.
Developer/API Integration
- Pro ($150/mo): Adds 24h longest session, up to 100 concurrency, customizable CPU/RAM configuration, and additional concurrency up to 1,100 for purchase on Hobby. Fixed subscription fee of $150/month + per-second usage, suitable for Agent products with medium to high frequency execution.
- Hidden costs: SDK integration initial debugging, sandbox template image management, dependency caching and cold start optimization, and waste of retry resources after execution failure. These are not directly reflected in the bill, but will affect the actual effective execution cost.
Enterprise / Private Deployment
- Enterprise (customized quotation): Supports BYOC (bring your own cloud account), VPC isolation, self-hosting (Terraform deployed to AWS/GCP/Azure), SSO, audit logs and other enterprise needs. Pricing requires business confirmation.
- Comparison of Alternatives: Building a self-built Firecracker cluster requires the operation and maintenance team to invest in engineering manpower such as infrastructure construction, kernel tuning, security hardening, and fault recovery. The annual maintenance cost for a team of 2-3 people is estimated to be $200k-$400k (including manpower and cloud resources). The pricing of E2B Enterprise is competitive in this context. But be aware of the lock-in risk - after deeply binding the E2B SDK, switching to other sandbox solutions requires refactoring the Agent execution layer code.
| Cost dimension | Self-built sandbox cluster | E2B SaaS | E2B Enterprise / BYOC |
|---|---|---|---|
| Initial investment | Several months to build + operation and maintenance manpower | Zero deployment, ready to use after registration | Terraform initialization required |
| Unit execution cost | Fixed resource pool, idle waste | Billing by second, no idle | Billing by second, resource controllable |
| Hidden engineering costs | Kernel isolation, security audit, fault recovery | SDK integrated debugging | BYOC operation and maintenance integration |
| Auto-scaling | Requires pre-configured resources | Automatic elasticity | Automatic elasticity |
| Data sovereignty | Complete self-control | Data via E2B cloud | Data in own VPC |
| Switching cost | Low (self-built without binding) | SDK binding | SDK binding + infrastructure dependency |
Main functions of E2B
The core of E2B's public capabilities is a sandbox abstraction layer designed around the three dimensions of "security execution + contextual control + observability".
Core functions
- Isolated code execution: Execute arbitrary code in an isolated sandbox through
sandbox.commands.run()orsandbox.runCode(), supporting Python, JavaScript, Ruby, C++ and any Linux-runnable language. The execution results are returned in the form of standard output/error codes, which are suitable for Agent analysis and use. - File system operations: Upload, download, list, and delete files in the sandbox through the
sandbox.filesinterface. Agent can dynamically inject data files or extract execution products without pre-image customization. - Terminal and Command Execution: Launch interactive terminal sessions or one-time commands through the
sandbox.commandsinterface, supporting background processes, pipeline operations and long-running tasks. - Network Access: The sandbox has outbound network capabilities by default, and the Agent can perform operations such as API calls, web page crawling, and data downloading in the sandbox. Network policies can be restricted through enterprise-level configuration.
- Long session support: Hobby plan up to 1h, Pro plan up to 24h. Long sessions are suitable for multi-step inference tasks - the agent steps through the code, checks the results, and corrects errors in the same sandbox without repeatedly initializing the context.
- Customized Sandbox Template: Pre-install dependencies, libraries and system packages through the Dockerfile or E2B Template system to create dedicated sandbox images for specific tasks. Support version management and team sharing.
Expert View: Functional Synergy
The value of E2B is not the superposition of individual functions, but the execution results formed by these capabilities in the Agent workflow:
Agent decision → sandbox.runCode() → Result parsing → Fix retry → sandbox.files.upload() → sandbox.commands.run() → Loop
This feature turns "AI generated code" from a one-time gamble to an iterative verification: the agent tries and makes errors in the sandbox, checks the execution results, corrects the code and runs again until the goal is achieved. Each execution is in an isolated environment, and even if there are serious errors in the code, it will not affect the host system.
Key Insight: The most valuable ability of E2B is not "the ability to run code", but "the ability to cleanly recycle if it runs incorrectly" - the temporary files, process residues, and network connections generated by the Agent in the sandbox will be automatically cleaned up when the sandbox is destroyed, and there is no need for the Agent to handle the blown runtime by itself.
E2B model and version evolution
E2B's version evolution is released at SDK granularity. Python SDK (e2b-code-interpreter) and JavaScript SDK (@e2b/code-interpreter) have independent version numbers and release rhythms.
Current version context
E2B version changes are mainly concentrated in three categories, arranged in order of priority:
- Sandbox underlying capabilities: Firecracker microVM version upgrade, kernel tuning, resource scheduling algorithm optimization. This directly affects execution stability and resource oversubscription ratio.
- SDK interface compatibility: New features are introduced (such as sandbox fork, file streaming upload, multi-region routing) and old interfaces are abandoned. SDK changes have the greatest impact on existing Agent code.
- Quota and billing strategy: Adjustment of concurrency upper limit, session duration, and resource specifications. Directly affects cost and availability.
Public version milestones
| Version node | Time | Core changes |
|---|---|---|
| Initial public version | Undisclosed | Sandbox execution basic capabilities based on Firecracker |
| Python SDK 2.x series | 2025-2026 (continuous) | Code Interpreter integration, long session, file operation Terminal |
| JS SDK Evolution | 2025-2026 (ongoing) | Parallel npm version iterations, feature alignment with Python SDK |
| @e2b/[email protected] | 2026-07 (latest) | Continuous optimization of stability and developer experience |
| E2B 1.1 | ~2026-06 | Platform capability expansion, specific changes are subject to the official update log |
E2B has a fast version iteration rhythm (GitHub shows 542 released versions). It is recommended to produce a large version of the fixed SDK and then conduct a seal evaluation, and then upgrade after staging to verify the compatibility of the new version.
Technical advantages of E2B: hard isolation + standardized execution interface
E2B's technical route chooses Firecracker microVM as the isolation foundation, which determines its trade-off between security and resource density.
Architecture link
LLM/Agent Framework
↓ (decides what code to run)
E2B SDK (Python/JS)
↓ (API call: create sandbox, execute code, manage files)
E2B Cloud API/Self-hosted Infrastructure
↓ (orchestrate Firecracker microVM)
Firecracker microVM (per-sandbox)
↓ (runs code inside isolated guest kernel)
Code Execution (Python/JS/etc.)
↓ (returns stdout, stderr, files, exit code)
E2B SDK → LLM / Agent (interprets result, decides next step)
Control flow: LLM/Agent initiates sandbox creation and code execution requests through the E2B SDK. The E2B cloud or self-hosted infrastructure allocates an independent Firecracker microVM for each request, and the execution results are returned to the caller through the SDK.
Data reflow: The standard output, file changes, and error information generated by the execution are returned to the Agent through the SDK, and the Agent decides whether to correct the code and try again or advance to the next step.
Why Firecracker instead of containers
- Security Boundary: Firecracker provides hardware-assisted virtualization (KVM-based microVM). Each sandbox runs in an independent lightweight virtual machine and has its own kernel. This makes it impossible to penetrate the host or other sandboxes even if a kernel privilege escalation attack is performed within the sandbox. Docker containers share the host kernel and have completely different isolation strengths.
- Density and Speed: Firecracker's startup time is at the millisecond level (officially <200ms), close to container-level speed, but provides virtual machine-level isolation. The trade-off is a slightly higher memory footprint than containers (each microVM requires independent kernel memory).
- Recycling efficiency: All resources are released when the sandbox is destroyed, and kernel and process residues are completely cleaned up. There is no risk of container escape or kernel state residues.
Open list of tools for AI Agent
The core Tool behaviors exposed by the E2B SDK (that is, the sandbox operations that the Agent can call through the SDK):
| Tool name | Parameters | Function description |
|---|---|---|
sandbox.commands.run() |
command: string, timeout,: number |
Execute a command in the sandbox terminal and return stdout/stderr/exit_code |
sandbox.runCode() |
code: string, language, : string |
Execute the code fragment in the sandbox (automatically select the interpreter) and return the execution result |
sandbox.files.list() |
path: string |
List the files in the specified directory in the sandbox |
sandbox.files.read() |
path: string |
Read the contents of files in the sandbox |
sandbox.files.write() |
path: string, content: bytes/string |
Write files into the sandbox |
sandbox.close() |
— | Destroy the sandbox and release all isolated resources |
Through these Tools, the Agent completes a typical interaction: creating a sandbox → analyzing tasks → executing code/commands → reading results/files → correcting and retrying → finally closing the sandbox.
Engineering Pitfall Guide
1. Deadly loop and Token inflation control
The code generated by the Agent may contain infinite loops or extremely long execution tasks. Without an upper limit on the execution time, a sandbox with an infinite loop will continue to generate output and consumption costs.
Solution:
- Set the
timeoutparameter (in milliseconds) every time you callcommands.run()orrunCode()to avoid infinite blocking in a single execution. - Allocate a step budget (for example
max_steps=20) to the sandbox operation in the Agent directive, and force the sandbox to close and roll back if exceeded. - Use
sandbox.close()to explicitly destroy the sandbox after the Agent task is completed to prevent the session from remaining.
2. Sandbox context overload and OOM
When the sandbox runs complex calculations (such as large data processing, memory-intensive model inference), it may exhaust the allocated RAM and trigger the OOM killer, causing the Agent to receive an unparsable exception.
Solution:
- Select appropriate CPU/RAM specs based on task type in the Pro plan to avoid default configurations for memory-intensive tasks.
- For big data tasks, design a block execution strategy instead of loading the entire data into the sandbox at a time.
- Monitor the
OOM,Killed,Exit Code 137and other signals in the sandbox execution failure log, automatically retry and downgrade the specifications.
3. Network strategy and data leakage risk
The sandbox has outbound network capabilities by default. Agents may upload sensitive data to external services in the sandbox, forming a data leakage channel.
Solution:
- Enable VPC isolation and network policies during enterprise deployment (E2B Enterprise/BYOC support) to limit the sandbox outbound target IP/domain name.
- For highly sensitive scenarios, use self-hosted deployment to limit the sandbox network to the internal network and not open access to the public network.
- Enable audit logs to record all network requests and execution commands in the sandbox to facilitate subsequent tracing.
How to use E2B
E2B provides multiple access points, and the core path is to embed sandbox capabilities into the Agent system through the SDK.
Get started quickly in 3 minutes
Prerequisites: Register an E2B account to obtain an API Key (you will get $100 credit upon registration).
Python SDK Example:
from e2b_code_interpreter import Sandbox
# Create a sandbox (automatically obtain the E2B_API_KEY contextual variable)
sbx = Sandbox.create()
#Execute Python code
execution = sbx.run_code("print('hello world')")
print(execution.logs) # {"stdout": ["hello world"], "stderr": []}
#Run the command in the terminal
result = sbx.commands.run("echo 'Hello from E2B!'")
print(result.stdout) # Hello from E2B!
# Manipulate files
sbx.files.write("/tmp/data.txt", "some content")
content = sbx.files.read("/tmp/data.txt")
# Close the sandbox
sbx.close()
JavaScript/TypeScript SDK Example:
import { Sandbox } from '@e2b/code-interpreter'
const sbx = await Sandbox.create()
const execution = await sbx.runCode('print("hello world")')
console.log(execution.logs)
const files = await sbx.files.list('/')
console.log(files)
await sbx.close()
Compare each entrance
| How to use | Suitable scenarios | Prerequisites | Cost |
|---|---|---|---|
| Hobby (free) | Prototype verification, personal experiments, low-frequency execution | Register account + API Key | $100 free quota |
| Pro ($150/month) | Medium and high-frequency Agent product 7×24 execution requirements | Paid subscription | $150/month + per-second usage |
| Enterprise | Enterprise-level compliance, high concurrency, privatized deployment | Business negotiation | Customized quotation |
| Self-hosted (open source) | High data sovereignty requirements and complete self-control | Own cloud resources + Terraform deployment | Infrastructure + operation and maintenance costs |
| BYOC | Data is in its own VPC, but the control plane is managed by E2B | Business negotiation | Per-second usage + own cloud resources |
Phased implementation recommendations
- Pilot (1-2 weeks): Use the Hobby solution to connect to a high-risk code execution process (such as sandbox verification before AI-generated SQL is submitted) to verify the sandbox startup speed, execution success rate, and exception recovery mechanism.
- Contrast (2-4 weeks): Run sandbox execution in parallel with an existing execution solution (such as a local Docker execution) and compare manual intervention rates, failure recovery time, and unit execution cost.
- Extension (January-March): After confirming that E2B meets the standards in terms of isolation strength and execution stability, gradually migrate more Agent execution tasks to E2B, and at the same time establish a sandbox template management and cost monitoring system.
Product Pricing for E2B
Public pricing structure
The E2B pricing page exposes the complete hierarchy and per-second billing rules:
| Plan | Monthly Fee | Core Limitations | Applicable Scenarios |
|---|---|---|---|
| Hobby | $0 (including $100 credit) | Maximum 1h session, maximum 20 concurrency | Personal verification, low-frequency prototype |
| Pro | $150/month | Maximum 24h session, maximum 100 concurrency, can be purchased up to 1,100 concurrency | Medium to high frequency Agent product |
| Enterprise | Custom Quotes | BYOC, VPC, SSO, Auditing, Self-Hosting | Enterprise-Grade Compliance and Scaling |
Price per second (applicable to all plans):
| Number of vCPUs | Price per second | Equivalent price per hour |
|---|---|---|
| 1 vCPU | $0.000014/s | ~$0.0504/h |
| 2 vCPU (default) | $0.000028/s | ~$0.1008/h |
| 4 vCPU | $0.000056/s | ~$0.2016/h |
| 6 vCPU | $0.000084/s | ~$0.3024/h |
| 8 vCPU | $0.000112/s | ~$0.4032/h |
Cost deduction: comparison of typical scenarios
| Scenario | Time taken for each execution | Average number of daily executions | Average daily estimated cost |
|---|---|---|---|
| AI Code Review | 5-15s | 1,000 | ~$0.14-$0.42 |
| Data Analysis Agent | 30-120s | 200 | ~$0.17-$0.67 |
| Reinforcement Learning Training Evaluation | 60-300s | 10,000 | ~$16.80-$84.00 |
| 24h long session Agent | Continuously running | 1 session | ~$2.42/day (2 vCPU) |
The above is a per-second usage estimate, and the actual cost is subject to the Pro $150/month subscription fee (if using the Pro plan). Enterprises should simulate according to their own parameters through the pricing calculator (pricing.e2b.dev) before purchasing.
E2B application scenarios
- Personal Creation: Quickly generate or process content to improve daily work efficiency.
- Team collaboration: Unify workflow and reduce repetitive manpower investment.
- Enterprise-grade deployment: Embed capabilities into on-premises systems via API or private deployment.
Applicable people for E2B
- AI Agent Product Team: Need to provide a safe and scalable code execution environment for Agent. E2B abstracts the isolation infrastructure into an SDK interface, eliminating the need for teams to build their own sandbox clusters. Prerequisites: The team has Python/JS development capabilities, and the Agent workflow has clearly defined execution nodes.
- AI Platform Infrastructure Team: Responsible for the construction of the trusted execution layer of the company's internal AI platform. The E2B Enterprise/BYOC solution deploys the sandbox within your own VPC to meet data sovereignty and compliance requirements. Prerequisites: Experience with Terraform and cloud infrastructure management.
- AI Research and Evaluation Team: Need to run model tests or reinforcement learning evaluations in massive parallelism. E2B's high-concurrency sandbox allocation capabilities and short startup times are suitable for this type of workload. Prerequisite: The execution content of the evaluation task does not involve GPU-intensive calculations (GPU support needs to be confirmed separately).
- Independent Developers/Open Source Projects: Use the $100 free credit of the Hobby plan to quickly verify the sandbox execution concept. Good for early prototyping stages of AI tools.
Dissuade the Crowd: Pure LLM chat application development teams with no code execution requirements; scenarios that require GPU-intensive inference and E2B has not publicly supported GPUs; real-time systems that are extremely sensitive to execution delays and cannot accept <200ms sandbox creation overhead.
Summary and Outlook of E2B
E2B's core competitiveness lies in upgrading the code execution layer of AI Agent from "uncertain black box" to "observable, isolable and recyclable infrastructure". Firecracker microVM's hard isolation model, per-second billing elastic cost structure, and Python/JS SDK's native adaptation of Agent workflows position it clearly in the current AI execution infrastructure track.
Current Limitations and Uncertainties:
- The status of GPU support is not clear on the public page, and the adaptation boundaries for AI training and inference scenarios require business confirmation.
- Operation and maintenance complexity of self-hosting: BYOC/self-hosting requires the team to have experience in Terraform and cloud infrastructure management, and is not a zero-operation and maintenance solution.
- Switching costs caused by strong SDK binding: After deeply integrating the E2B SDK, switching to alternative sandbox solutions requires reconstructing the Agent execution layer.
- The product direction and pricing strategy after Series A may be adjusted with the pace of financing. Enterprise procurement is recommended to lock in price terms for a certain period in the contract.
Procurement/Adoption Risk Assessment: It is recommended to proceed along the path of "Hobby Pilot → Pro Verification → Enterprise Contract". First use the $100 free credit to verify the execution success rate and recovery time on 1-2 high-value processes, and then enter enterprise-level contract negotiations after confirming that the isolation strength and stability of E2B in its own scenario meet the standards. Key points to confirm before signing: the data residence area (VPC deployment), the granularity of the audit log and the recovery time (RTO/RPO) in the retention period SLA, as well as the compatibility commitment of future version changes to the existing SDK interface.
Related tools: Cursor
How to use E2B
- Web client: You can use it by visiting the official website and registering an account. Most functions do not require installation.
- API Access: Provides RESTful API, developers can obtain the API Key and integrate it into their own applications.
Version Info
- E2B 1.1 :Continuously optimize stability and developer experience. Specific capabilities are subject to official real-time release.
- first public release :The early version information has not been fully disclosed. It is recommended to refer to the official update log.
User Reviews