CreateWithAIHub

Library E2B

E2B

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

Agent code sandboxFreeOpen source
Visit website ↗
Save

What it is

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.

What it's 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

How to use it

Before you start

  • E2B API key (E2B_API_KEY) or a self-hosted E2B Runtime
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

Commands are copied from the official documentation. Check the docs for the latest version before running them.

Limitations to know

  • 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)

MCP servers for this

Google Chrome team's MCP server and CLI that let coding agents control, debug and profile a live Chrome browser.

FreeOpen source

Docker Desktop's MCP Toolkit and Catalog that run MCP servers in containers and connect them to clients through one gateway.

Free plan + paidOpen source

GitHub's official MCP server that lets AI agents work with repositories, issues, pull requests and Actions.

Free plan + paidOpen source

Skills for this

Anthropic skill that guides Claude through designing, building and evaluating MCP servers in TypeScript or Python.

FreeOpen source

Vercel's collection of Agent Skills for React/Next.js performance, UI review, writing style and Vercel deploys.

FreeOpen source

Anthropic skill that has Claude test local web apps by writing Python Playwright scripts, with screenshots and browser logs.

FreeOpen source

Related resources

Cognition's autonomous software engineering agent that works in a cloud VM and opens pull requests.

Free plan + paid

Coding agent that runs each thread in a cloud sandbox, with a CLI, web, desktop and mobile apps.

Free plan + paid

Anthropic's agentic coding tool that works in your terminal, IDE, desktop app and on the web.

Paid

OpenAI's open-source coding agent that runs locally in your terminal, with IDE, desktop and cloud variants.

Free plan + paidOpen source

Type to search. Use ↑ ↓ and Enter.