E2B Documentation

Here you'll find all the guides, concepts, and API reference for developing with E2B.

Terminal
npm i @e2b/code-interpreter

What is E2B?

E2B is an open-source infrastructure that allows you run to AI-generated code in secure isolated sandboxes in the cloud. To start and control sandboxes, use our Python SDK or JavaScript SDK.

Some of the typical use cases for E2B are AI data analysis or visualization, running AI-generated code of various languages, playground for coding agents, environment for codegen evals, or running full AI-generated apps like in Fragments.

Under the hood

The E2B Sandbox is a small isolated VM the can be started very quickly (~150ms). You can think of it as a small computer for the AI model. You can run many sandboxes at once. Typically, you run separate sandbox for each LLM, user, or AI agent session in your app. For example, if you were building an AI data analysis chatbot, you would start the sandbox for every user session.

Quickstart

Running your first Sandbox

Learn how to start your first E2B Sandbox with our Python or JavaScript SDK.

Connecting LLMs to E2B

Connect your favorite LLM to E2B to run AI-generated code inside the Sandbox.

Uploading & downloading files

A quick guide on how to upload and download files to and from the Sandbox.

Install custom packages

Customize your Sandbox with third-party packages.

Code interpreting with AI

Analyze data with AI

Learn how to use E2B run AI-generated code to analyze yourdata.

Create charts & visualizations

Create interactive charts by running Python code in E2B.

Learn the core concepts

Sandbox lifecycle

Learn about how to start the sandbox, manage its lifecycle, and interact with it.

Filesystem

Each sandbox has its own isolated filesystem that you can use to create, read, write, and delete files.

Commands

You can run terminal commands inside the Sandbox. This allows you to start any process inside the Sandbox.