e2b
VerifiedOpen-source platform for running AI code in secure cloud sandboxes.
What is e2b?
E2B is open-source infrastructure that spins up secure, isolated sandboxes in the cloud so AI systems can run code without risking the host environment. Users interact with sandboxes through lightweight SDKs available for Python and JavaScript.
Sandboxes are created on demand, commands or code snippets are executed inside them, and results are returned to the caller. The platform also offers an optional code-interpreter package for richer execution tracking.
It targets AI engineers and developers who need reliable, auditable code execution for agents, data analysis tools, or automated workflows while retaining the option to self-host the entire stack.
What you can build with e2b
Agent Code Execution
Let AI agents write and immediately test Python or shell scripts inside isolated sandboxes before using the output.
Data Analysis Workflows
Run generated data-processing code with the code-interpreter SDK and retrieve structured results or plots.
Self-Hosted AI Infrastructure
Deploy the full E2B stack on AWS or GCP using Terraform for private, controlled sandbox environments.
Install e2b
pip install e2bpip install e2b- 1Sign up at e2b.dev and obtain an API key.
- 2Install the SDK with npm i e2b or pip install e2b.
- 3Export your E2B_API_KEY environment variable.
- 4Create a sandbox instance and run commands or code inside it.
- 5Review the documentation and cookbook examples for LLM integrations.
e2b: pros & cons
Pros
- +Open-source with self-hosting support on major clouds
- +Simple SDKs for both Python and JavaScript
- +Strong isolation guarantees for untrusted AI code
- +Optional code-interpreter package for richer execution feedback
Cons
- –Azure support still missing
- –Requires an account and API key even for local testing
- –Self-hosting setup involves Terraform and cloud resources
Frequently asked questions
Yes, sign-up at e2b.dev is required to obtain an API key for creating sandboxes.
User reviews
Verified reviews from the community shape this listing's rating.
Loading reviews…