E2B
Open-source, secure cloud sandboxes for AI agents: an isolated machine per agent to run code, browse and use tools.
Tags
Agent access
Related
- Daytona: Secure and elastic infrastructure (sandboxes) for running AI-generated code.
- Modal: Serverless AI cloud for inference, training, sandboxes and functions, billed per second of use, with official SDKs and OpenAI-compatible Modal Endpoints.
Guides & comparisons
- Self-host a code-execution API for agents with Piston or Judge0 (Guide): Run Piston or Judge0 on your own server to give an agent a stateless run_code tool for many languages: what each one isolates, the host requirements that decide between them, the limits to set, and a tested tool wrapper.
- Run agent-generated code safely in a sandbox (Guide): A defense-in-depth recipe for executing LLM-written or user-supplied code: pick an isolation boundary, lock down egress, keep secrets out, cap time and resources, and treat the output as untrusted.
- Self-hosted sandboxes for agents compared (Comparison): Six ways to isolate agent-run code on hardware you control (OpenSandbox, AIO Sandbox, microsandbox, Kubernetes Agent Sandbox, Anthropic's sandbox-runtime and Docker Sandboxes' local mode) compared on isolation, where they run, agent interface, network and secret controls, maturity and license.
- Code sandboxes for AI agents (Comparison): E2B, Daytona, Modal, Vercel Sandbox, Cloudflare Sandboxes, Fly.io Sprites and microsandbox compared on isolation, pricing, free tier, lifetime, persistence, egress controls, SDKs, GPUs and self-hosting.
- Fully local, private agent (Stack): A local OpenAI-compatible model server, an optional LiteLLM router, Pi as the harness, Basic Memory for on-disk Markdown memory, and Anthropic's sandbox runtime — all on your machine, with no hosted model API and no cloud sandbox.
- Bookkeeping agent stack (Stack): An agent that reconciles Stripe or Paddle revenue against the books in Xero, reads receipts and statements, and prepares draft entries for an accountant. It runs on read-only credentials, and every write needs a human.
- Data analysis agent stack (Stack): An agent that answers questions from your data: it queries DuckDB files, a ClickHouse warehouse or Postgres through read-only MCP servers, runs heavier analysis in a sandbox, reads spreadsheets and PDFs, and is tested and traced so you can trust the numbers.
- Coding agent starter stack (Stack): A terminal coding agent plus current library docs, GitHub access, a real browser and a sandbox, connected over MCP, with the configuration choices that keep it safe.
- Research agent stack (Stack): An agent that searches the web and the scholarly record, reads full sources, runs analysis code in a sandbox and cites what it found, with tracing so you can audit how it got there.
Sources
Machine-readable
- JSON
- Markdown
- Source file on GitHub (edit via pull request)