E2B provides secure, isolated cloud sandboxes for running AI-generated code through JavaScript and Python SDKs. The infrastructure is open-source and can be self-hosted on AWS or GCP, or accessed via the E2B Cloud API service.
Project overview
It offers a dedicated environment for executing untrusted, AI-generated code through isolated sandboxes controlled via SDKs.
Project type
AI Agent · Infrastructure
Use cases
Coding & Development
Deployment
Refer to project documentation
License
Apache-2.0
Best for
Developers and AI engineers who need to execute AI-generated code via JavaScript or Python SDKs.
Projects requiring an external data boundary for code execution via a managed cloud API or self-hosted Terraform infrastructure.
Key capabilities
Create secure, isolated cloud sandboxes and execute shell commands within them using JavaScript or Python SDKs.
Provides a specialized SDK to execute code blocks and return results using the Code Interpreter SDK.
Allows users to deploy the E2B sandbox infrastructure on their own cloud provider accounts using Terraform.
Limitations and risks
Self-hosting currently supports AWS and GCP. Azure and general Linux machines are not yet supported.
The default hosted workflow requires an external service, the E2B Cloud API, meaning the system is not local-only out of the box.
Getting started
Setup difficulty is medium. It requires installing the Python or JavaScript SDK, signing up to E2B to get an API key, setting the API key as an environment variable, and starting a sandbox to run commands.
Evidence and sources
GitHub project description: Open-source, secure environment with real-world tools for enterprise-grade agents.
README: [E2B](https://e2b.dev/...) is an open-source infrastructure that allows you to run AI-generated code in secure isolated sandboxes in the cloud.
README: 1. Sign up to E2B [here](https://e2b.dev/...). 2. Get your API key [here](https://e2b.dev/dashboard?tab=keys...). 3. Set environment variable with your API key ``` E2B_API_KEY=e2b…
README: const sandbox = await Sandbox.create() const result = await sandbox.commands.run('echo "Hello from E2B!"')