# E2B

CreateWithAI Hub page: https://createwithaihub.com/open-source/e2b
Latest version of this file: https://createwithaihub.com/open-source/e2b.md

- Type: Library · Category: Libraries & Open Source
- Publisher: E2B
- Pricing: Free · License: Apache-2.0
- Runs on: Linux, API (cloud)

Open-source sandboxes for AI agents: isolated Firecracker microVMs you start and control from a Python or JavaScript SDK.

E2B is open-source infrastructure for running AI-generated code in secure, isolated sandboxes. Each sandbox is a Firecracker microVM that boots from a template snapshot and can be paused, resumed, forked and snapshotted; agents drive it through the JavaScript/TypeScript or Python SDK, the CLI or the API. You can use the hosted E2B Cloud with an API key or run the Apache-2.0 E2B Runtime on your own AWS, Google Cloud, Azure or Linux machine. It is for developers building agents, code interpreters and computer-use apps that must not run untrusted code on their own servers.

Useful for: Giving an agent its own Linux machine where it can run the Python it writes, install packages and return results without touching your servers.

## Key features

- One Firecracker microVM per sandbox, with pause/resume, forks, snapshots and persistent volumes
- JavaScript/TypeScript and Python SDKs, plus Code Interpreter (run_code) and Desktop (computer use) SDKs
- Custom sandbox templates built from Docker images; outbound internet with allow/deny lists
- Self-host the E2B Runtime on AWS, GCP, Azure or a single Linux host (Embed)
- Hosted cloud: free Hobby plan with a one-time $100 usage credit; Pro $150/month plus per-second usage
- Public docs MCP server at https://docs.e2b.dev/mcp for coding assistants

## Connection

- Language: Python, TypeScript / JS, Go

## Before you start

- E2B API key (E2B_API_KEY) or a self-hosted E2B Runtime

## Install steps from the official documentation

JavaScript / TypeScript SDK:

```
npm i e2b
```

Python SDK:

```
pip install e2b
```

Code Interpreter SDK (JS / Python):

```
npm i @e2b/code-interpreter  # or: pip install e2b-code-interpreter
```

CLI (npm):

```
npm i -g @e2b/cli
```

CLI (Homebrew):

```
brew install e2b
```

## Limitations

- The hosted cloud bills compute per second; the Hobby plan caps sessions at 1 hour and 10 concurrent sandboxes
- Self-hosting needs Linux hosts with KVM and is set up with Terraform or the Embed package
- The SDKs need an E2B API key (or your own self-hosted deployment)

## Official links

- Website: https://e2b.dev
- Source repository: https://github.com/e2b-dev/E2B
- Documentation: https://docs.e2b.dev/
- Source: https://github.com/e2b-dev/E2B (SDK install commands, Code Interpreter and Desktop SDKs, self-hosting options; not archived; Apache-2.0)
- Source: https://raw.githubusercontent.com/e2b-dev/E2B/main/LICENSE (Apache License 2.0)
- Source: https://github.com/e2b-dev/runtime (Open-source Go runtime behind E2B Cloud: Firecracker microVMs, pause/resume, fork, templates, volumes, Embed single-host install; Apache-2.0)
- Source: https://e2b.dev/pricing (Hobby free with $100 one-time credit (1 h sessions, 10 concurrent), Pro $150/month + usage, Enterprise custom; per-second compute rates)
- Source: https://e2b.dev/docs (What E2B is, SDK quickstart, public docs MCP server at docs.e2b.dev/mcp)
- Source: https://e2b.dev/docs/cli (CLI install via Homebrew and npm)
