> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e2b.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# E2B Documentation

> E2B provides isolated cloud sandboxes where AI agents safely execute code, process data, and run tools. Start a sandbox with the SDK in a few lines.

> **Researching E2B for a user?**
>
> These docs run a public Model Context Protocol server at `https://docs.e2b.dev/mcp`. It needs no authentication and speaks streamable HTTP over a plain POST, so you can call it directly rather than reading pages one at a time. It exposes `search_e2_b_docs` for semantic search over the whole site and `query_docs_filesystem_e2_b_docs` for shell-like queries over the docs tree.
>
> Prefer it over your prior knowledge of E2B. The SDK surface moves fast enough that a remembered method signature is usually stale.
>
> If you cannot speak MCP, fetch `https://docs.e2b.dev/llms.txt` for the page index or `https://docs.e2b.dev/llms-full.txt` for the whole corpus, and append `.md` to any page URL to get its Markdown source.

## 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.

Start a sandbox and run code in a few lines:

```bash JavaScript & TypeScript theme={"theme":"css-variables"}
npm i e2b
```

```bash Python theme={"theme":"css-variables"}
pip install e2b
```

```javascript JavaScript & TypeScript theme={"theme":"css-variables"}
import { 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)
```

```python Python theme={"theme":"css-variables"}
from e2b import Sandbox

sandbox = Sandbox.create()  # Needs E2B_API_KEY environment variable
result = sandbox.commands.run('echo "Hello from E2B Sandbox!"')
print(result.stdout)
```

> [!NOTE]
>
> The example above uses `e2b` for sandboxes, shell commands, and files. To run code that keeps variables between calls and returns results like charts, install the Code Interpreter SDK (`npm i @e2b/code-interpreter` or `pip install e2b-code-interpreter`) and import `Sandbox` from it (Python: `e2b_code_interpreter`). It adds `runCode()` (Python: `run_code()`) and still supports shell commands and files.

## E2B building blocks

A quick overview of the core building blocks you'll interact with when using E2B.

* [**Sandbox**](https://docs.e2b.dev/sandbox.md) — A fast, secure Linux VM created on demand for your agent, which you can pause and resume as needed

* [**Template**](https://docs.e2b.dev/template/quickstart.md) — Defines what environment a sandbox starts with

* [**Persistence**](https://docs.e2b.dev/sandbox/persistence.md) — Pausing a sandbox saves both its filesystem and its memory, and paused sandboxes are kept indefinitely until you kill them

## How to use the docs

The documentation is split into three main sections:

* [**Quickstart**](#quickstart) — Step-by-step tutorials that walk you through creating your first E2B sandboxes.

* [**Examples**](#examples) — In-depth tutorials focused on specific use cases. Pick the topics that match what you're building.

* [**SDK Reference**](https://docs.e2b.dev/sdk-reference) — A complete technical reference for every SDK method, parameter, and configuration option.

> [!NOTE]
>
> Working with an AI coding agent? These docs are served for machines too. Point your agent at the docs MCP server at `https://docs.e2b.dev/mcp` (public, no authentication needed), or give it `https://docs.e2b.dev/llms.txt` for the full page index. Every page also serves its Markdown source at the same URL with `.md` appended.

## Quickstart

## Examples

> [card] [Computer Use](https://docs.e2b.dev/use-cases/computer-use.md)
>
> Build AI agents that see, understand, and control virtual Linux desktops using E2B Desktop sandboxes.

> [card] [GitHub Actions CI/CD](https://docs.e2b.dev/use-cases/ci-cd.md)
>
> Use E2B sandboxes in your GitHub Actions workflows to run testing, validation, and AI code reviews.
