E2B is infrastructure for running AI-generated code in isolated cloud sandboxes. An agent or application starts a sandbox through the JavaScript or Python SDK, runs shell commands or code inside it, and reads back the output, keeping untrusted execution off the host.
The base SDK exposes sandbox creation and command execution (sandbox.commands.run). A separate Code Interpreter SDK adds runCode() / run_code() for executing code and returning results, with a cookbook of examples covering different LLMs and agent frameworks. The infrastructure is open source and can be self-hosted with Terraform; AWS and Google Cloud are supported, with Azure and general Linux hosts not yet available.
Features
- Isolated sandboxes: each run executes inside its own cloud sandbox
- SDKs: JavaScript/TypeScript (e2b) and Python (e2b) packages for starting and controlling sandboxes
- Command execution: run shell commands and capture stdout from the sandbox
- Code interpreter: @e2b/code-interpreter and e2b-code-interpreter add runCode for stateful code execution
- Self-hosting: Terraform-based deployment of the infrastructure on AWS or Google Cloud
- Cookbook: example integrations with various LLMs and AI frameworks
Built with this
Integrated by
Forkd
Agent sandboxes need VM-grade isolation without booting a fresh VM every time.
Omnigent
Open-source meta-harness that orchestrates Claude Code, Codex, Cursor, and custom agents behind one interface with policies and sandboxing
Smolagents
Hugging Face library for agents that write their actions as Python code, with sandboxed execution
Synapse
Self-hosted AI workspace with shareable AI teammates, shared memory and governed access to MCP tools and local devices.
