---
title: "E2B — The AI Agent Cloud"
description: "Secure, on-demand machines for AI agents, with lifecycle, networking, storage, and observability APIs."
url: "https://e2b.dev"
---

# E2B — The AI Agent Cloud

> E2B is the AI agent cloud. It gives each agent session an isolated Linux machine that boots from a snapshot and works with any model or agent framework.

## Set up E2B

1. If there's no E2B API key yet (no `E2B_API_KEY` in the environment or the project's `.env` file): sign up at https://console.e2b.dev/sign-up?signup_source=agent (a person completes this step in a browser), then create an API key at https://console.e2b.dev/?tab=keys. The key starts with `e2b_`; set it as `E2B_API_KEY`.
2. Install the SDK: `pip install e2b` (Python 3.10+) or `npm install e2b` (Node.js 20.18.1+ or 22+).
3. Create a sandbox with `Sandbox.create()` and run a command in it. Step-by-step setup for agents: https://e2b.dev/SKILL.md
4. Build a custom template so every sandbox starts with the project's dependencies installed: https://docs.e2b.dev/template/quickstart.md
5. Hobby includes a one-time $100 in usage credits, 20 concurrent sandboxes, and up to 1 hour of continuous runtime per sandbox. Pro ($150 a month plus usage) raises this to 100 concurrent sandboxes and 24 hours of continuous runtime.

## What E2B provides

An E2B Sandbox is a full Linux microVM with its own kernel. Applications create and control sandboxes through the Python or JavaScript SDK, while the agent uses the machine's shell, filesystem, network, and optional desktop.

- **Execution:** Run commands, stream output, attach a PTY, or execute Python and JavaScript with rich results such as charts, tables, and images.
- **Lifecycle and state:** Pause and resume a sandbox with a full snapshot (filesystem and memory) or a filesystem-only snapshot, and fork up to 100 copies from a saved state.
- **Network and identity:** Expose sandbox ports through HTTPS, control egress by CIDR or hostname, and keep secrets in a vault that injects them at the egress proxy, so the value never enters the sandbox.
- **Storage:** Use an isolated POSIX filesystem, Git, persistent volumes, or mounted S3, GCS, and R2 buckets.
- **Observability:** Read live CPU, memory, and disk metrics; collect logs; use a browser terminal; and receive signed lifecycle webhooks.

## Common use cases

- Coding agents that edit repositories, run tests, and build applications.
- Code interpreters for data analysis, visualization, and generated code.
- Computer-use and browser agents that need a graphical Linux desktop.
- Deep-research and knowledge-work agents that use files, tools, and the internet.
- Parallel environments for reinforcement learning, evaluations, and benchmarks.

## Deployment and security

Every session receives a hardware-isolated Firecracker microVM rather than a shared-kernel container. E2B Cloud is managed across US, EU, and APAC regions. Enterprise teams can run the data plane in their own AWS, GCP, or Azure account through BYOC. A private cloud deployment with the control plane inside the customer boundary is in development. [E2B Embed](https://github.com/e2b-dev/runtime/tree/main/embed#readme) is available as an Apache-2.0 single-node package, with Docker Compose, Terraform on AWS or GCP, and Kubernetes installs. It runs the control plane, Firecracker sandboxes, and storage on a single Linux x86-64 machine with KVM, self-hosted, embedded inside a product, or deployed into a customer's tenancy.

E2B Cloud is SOC 2 Type II compliant.

## Product model

Bring your own model, prompts, agent harness, and orchestration framework. E2B supplies the machine where the agent acts. It works with providers and frameworks including Anthropic, OpenAI, open-weight models, OpenAI Agents SDK, and LangChain.

## Start building

- [Quickstart](https://docs.e2b.dev/quickstart): Create your first sandbox with the Python or JavaScript SDK.
- [E2B Console](https://console.e2b.dev/sign-up?signup_source=agent): Create an account.
- [API keys](https://console.e2b.dev/?tab=keys): Create an API key.
- [Documentation](https://docs.e2b.dev): SDK, CLI, sandbox, template, desktop, and API references.
- [Cookbook](https://e2b.dev/cookbook.md): Ready-to-run examples for common models and frameworks.
- [Pricing](https://e2b.dev/pricing.md): Plans, usage rates, concurrency, and the cost estimator.
- [Enterprise](https://e2b.dev/enterprise.md): BYOC, security, scale, and deployment options.
- [Open source](https://e2b.dev/open-source.md): Runtime, SDK, CLI, and example repositories.

## Machine-readable resources

- [Agent skill](https://e2b.dev/SKILL.md): Step-by-step setup and usage instructions for AI agents.
- [Website index](https://e2b.dev/llms.txt)
- [Full website index](https://e2b.dev/llms-full.txt)
- [Content sitemap](https://e2b.dev/sitemap.md)
- [Documentation index](https://docs.e2b.dev/llms.txt)
- [OpenAPI specification](https://docs.e2b.dev/openapi-public.yaml)
