E2B Documentation
Here you'll find all the guides, concepts, and SDK references for developing with E2B.
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.
Uploading & downloading files
A quick guide on how to upload and download files to and from the Sandbox.
Code interpreting with AI
Learn the core concepts
Sandbox lifecycle
Learn about how to start the sandbox, manage its lifecycle, and interact with it.
Sandbox persistence
Learn how to achieve data persistence by pausing and resuming sandboxes.
Filesystem
Sandbox has an isolated filesystem that you can use to create, read, write, and delete files.
Commands
Run terminal commands inside the Sandbox and start any process inside the Sandbox.