Discover / Development
E2B
by e2b-devPython
Secure cloud sandbox infrastructure for running AI generated code safely.
Maturity: stable because 3y old, @e2b/cli@2.16.0 released 7d ago. Derived from release and commit history, not a rating.
- Stars
- 13k
- Forks
- 980
- Downloads / mo
- 5.6M
- Last commit
- 2026-08-01
- License
- Apache-2.0
- Open issues
- 49
Market and trust evidence
Edition not yet matchedNo exact skills.sh identity match is available for this repository. Repository adoption and freshness remain visible above; install momentum is not inferred.
Trust analysis is a screening signal, not a security warranty. Read the ranking and trust methodology.
In practice
Written by AI from this repository’s README · high confidenceRunning model generated code on your own machine or server is unsafe, and there is no isolated place to execute it.
Use it when
Use it when an agent needs to execute arbitrary code or shell commands in a sandbox you start and control from JavaScript or Python.
Not the right pick when
It expects an E2B API key and hosted sandboxes unless you take on the Terraform based self hosting path.
Capabilities
- start and control isolated sandboxes from code
- run shell commands inside a sandbox
- code execution with the Code Interpreter SDK
- JavaScript and Python SDKs
- self hosting on AWS or Google Cloud via Terraform
Requirements
- E2B API key set as E2B_API_KEY
- E2B account signup
Cost: Open source with a paid cloud option
Install
Derived from the published package name in the repository, not from a model.
Video walkthroughs
Running AI Agents in Secure Sandboxes with E2B & Docker MCP | Docker’s AI Guide to the Galaxy
How to build AI apps with code interpreting capabilities: Intro to E2B
Third-party YouTube uploads matched to this tool by title, channel and repository name on 2026-08-03. Not made, reviewed or endorsed by SkillPilot. View counts and publish months are as of the match date and the month is approximate. Nothing loads from YouTube until you press play.
What the repository ships
Detected from the actual files in the repository root.
Latest release @e2b/cli@2.16.0
Published 2026-07-27
Minor Changes
- 48e9249: Bump
@npmcli/package-jsonfrom^5.2.1to^7.0.5, clearing the lastnpm warn deprecated glob@10.5.0warning printed on every@e2b/cliinstall (@npmcli/package-json@5pinnedglob@10;7.0.4moved toglob@13). Together with thee2bglob bump, a freshnpm install @e2b/cliis now warning-free and drops from 183 to 145 packages.
@npmcli/package-json@7 requires Node ^20.17.0 || >=22.9.0, so the CLI's Node 22 floor moves from >=22 to >=22.9.0. Node 20 support is unchanged (>=20.18.1 <21). Only the PackageJson.load/create/update/save API used by e2b template init is touched, and it is unchanged across the bump.
Patch Changes
- Updated dependencies [178e267]
- Updated dependencies [b511953]
- Updated dependencies [b511953]
- e2b@2.36.1
Tags
README
<p align="center">
<img src="/readme-assets/logo-black.png#gh-light-mode-only" alt="E2B Logo" width="200">
<img src="/readme-assets/logo-white.png#gh-dark-mode-only" alt="E2B Logo" width="200">
</p>
<h4 align="center">
<a href="https://pypi.org/project/e2b/">
<img alt="Last 1 month downloads for the Python SDK" loading="lazy" decoding="async" style="color:transparent;width:170px;height:18px" src="https://static.pepy.tech/personalized-badge/e2b?period=monthly&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=PyPi%20Monthly%20Downloads">
</a>
<a href="https://www.npmjs.com/package/e2b">
<img alt="Last 1 month downloads for the JavaScript SDK" loading="lazy" width="200" height="30" decoding="async" data-nimg="1"
style="color:transparent;width:170px;height:18px" src="https://img.shields.io/npm/dm/e2b?label=NPM%20Monthly%20Downloads">
</a>
</h4>
<!---
<img width="100%" src="/readme-assets/preview.png" alt="Cover image">
--->
What is E2B?
E2B is an open-source infrastructure that allows you to run AI-generated code in secure isolated sandboxes in the cloud. To start and control sandboxes, use our JavaScript SDK or Python SDK.
Run your first Sandbox
1. Install SDK
JavaScript / TypeScript
npm i e2b
Python
pip install e2b
2. Get your E2B API key
E2B_API_KEY=e2b_***
3. Start a sandbox and run commands
JavaScript / TypeScript
import Sandbox from 'e2b'
const sandbox = await Sandbox.create()
const result = await sandbox.commands.run('echo "Hello from E2B!"')
console.log(result.stdout) // Hello from E2B!
Python
from e2b import Sandbox
with Sandbox.create() as sandbox:
result = sandbox.commands.run('echo "Hello from E2B!"')
print(result.stdout) # Hello from E2B!
4. Code execution with Code Interpreter
If you need to execute code with runCode()/run_code(), install the Code Interpreter SDK:
npm i @e2b/code-interpreter # JavaScript/TypeScript
pip install e2b-code-interpreter # Python
import { Sandbox } from '@e2b/code-interpreter'
const sandbox = await Sandbox.create()
const execution = await sandbox.runCode('x = 1; x += 1; x')
console.log(execution.text) // outputs 2
5. Check docs
Visit E2B documentation.
6. E2B cookbook
Visit our Cookbook to get inspired by examples with different LLMs and AI frameworks.
Self-hosting
Read the self-hosting guide to learn how to set up the E2B infrastructure on your own. The infrastructure is deployed using Terraform.
Supported cloud providers:
- 🟢 AWS
- 🟢 Google Cloud (GCP)
- [ ] Azure
- [ ] General Linux machine