Why you'd want it
E2B gives agent tasks their own isolated sandbox in the cloud, started with Sandbox.create() from the JavaScript or Python SDK, where code can run shell commands and programs. The Code Interpreter SDK adds runCode/run_code for executing snippets, and the Desktop SDK adds mouse, keyboard, screenshot and desktop streaming APIs for computer-use agents. The runtime is open source and can be self-hosted with Terraform on AWS, Google Cloud, Azure or a general Linux machine.
Best for
- Running untrusted model-generated code
- Code interpreter and data analysis features
- Computer-use agents that need a desktop
Use it when
Your agent writes code or shell commands that must run somewhere isolated from your own machines and data.
Skip it if
You do not want to sign up for an E2B API key or operate the Terraform-based self-hosted runtime.