E2B Sandbox is a secure sandboxed cloud environment made for AI agents and AI apps. Sandboxes allow AI agents and apps to have long running cloud secure environments. In these environments, large language models can use the same tools as humans do. For example:
- Cloud browsers
- GitHub repositories and CLIs
- Coding tools like linters, autocomplete, "go-to defintion"
- Running LLM generated code
- Audio & video editing
The E2B sandbox can be connected to any LLM and any AI agent or app.
We have built a dedicated SDK for building custom code interpreters in your AI apps. It's build on top of E2B and our core E2B SDK.
Please visit documentation to get started.
To create and control a sandbox, you use our SDK:
Python
- Install SDK
pip install e2b
- Start sandbox
from e2b import Sandbox
# Create sandbox
sandbox = Sandbox()
# Let an LLM use the sandbox here
# Visit https://e2b.dev/docs/sandbox/overview to learn more about sandboxes.
# Close sandbox once done
sandbox.close()
JavaScript & TypeScript
- Install SDK
npm install e2b
- Start sandbox
import { Sandbox } from "e2b";
// Create sandbox
const sandbox = await Sandbox.create();
// Let an LLM use the sandbox here
// Visit https://e2b.dev/docs/sandbox/overview to learn more about sandboxes.
// Close sandbox once done
await sandbox.close();
This repository is a monorepo containing: