Last Updated: 3/7/2026
E2B Documentation
What is E2B?
E2B provides isolated sandboxes that let agents safely execute code, process data, and run tools. Our SDKs make it easy to start and manage these environments.
Quick Start
Start a sandbox and run code in a few lines:
npm i e2bimport { Sandbox } from 'e2b'
const sandbox = await Sandbox.create() // Needs E2B_API_KEY environment variable
const result = await sandbox.commands.run('echo "Hello from E2B Sandbox!"')
console.log(result.stdout)E2B Building Blocks
A quick overview of the core building blocks you’ll interact with when using E2B:
- Sandbox — A fast, secure Linux VM created on demand for your agent
- Template — Defines what environment a sandbox starts with
How to Use the Docs
The documentation is split into three main sections:
- Quickstart — Step-by-step tutorials that walk you through creating your first E2B sandboxes
- Examples — In-depth tutorials focused on specific use cases
- SDK Reference — A complete technical reference for every SDK method, parameter, and configuration option
Main Topics
Getting Started
- API key setup
- First sandbox
- Support resources
Use Cases
- Coding Agents
- Computer Use
- GitHub Actions CI/CD
Core Features
- Code Interpreting
- Sandbox Management
- Templates
- Filesystem Operations
- Commands
- MCP Gateway
- CLI Tools
Advanced Topics
- Deployment (BYOC)
- Migration Guides
- Troubleshooting