← Back to all projects

E2B
Sandboxed cloud runtime for agent-generated code
OfficialApache-2.0
What is E2B?
Starts an isolated micro-VM in well under a second, which is what makes per-task sandboxing practical rather than theoretical. If an agent executes code it wrote itself, something like this is a requirement, not a nicety. Self-hosting is possible but meaningfully more work than the hosted path.
What can you do with E2B?
- Run agent-written code in isolation — Sandbox.create() from the e2b Python or JavaScript SDK starts a cloud sandbox, and sandbox.commands.run() executes a shell command inside it and returns stdout.
- Evaluate code and read the result — Installing the Code Interpreter SDK (e2b-code-interpreter or @e2b/code-interpreter) adds run_code() / runCode(), which evaluates a snippet and hands back the value as execution.text.
- Self-host on AWS or GCP — The e2b-dev/infra repository ships a Terraform deployment covering AWS and Google Cloud; Azure and a plain Linux machine are listed as not yet supported.
- Start from a working integration — The e2b-cookbook repository collects end-to-end examples pairing sandboxes with different LLMs and agent frameworks, so the first sandbox does not have to be wired from scratch.
Star history
15 Aug to 30 Oct · +1.2k
13.4k14.6k
Frequently asked questions
Is E2B free for commercial use?
E2B is released under the Apache-2.0 licence — OSI-approved open source, which permits commercial use.
How can E2B be deployed?
E2B is available as Self-hosted / Managed cloud.