Cloud & Architecture · Freemium
E2B
E2B is a cloud service that gives AI agents their own short-lived Linux machines, called sandboxes, for running code, processing files and calling tools. Developers start and control sandboxes through its Python and JavaScript/TypeScript SDKs. The company behind it is FoundryLabs, Inc., which trades as E2B. Its open-source runtime, published on GitHub as e2b-dev/infra, runs one Firecracker microVM per sandbox, with its own cgroup, network namespace and per-sandbox egress firewall.
Who it is for: teams building coding agents, data-analysis agents, code interpreters and evaluation pipelines that need to run code a model wrote without letting it touch their own servers. It also suits products that keep one sandbox per end user and want the user's files and running processes to survive between visits.
Key features: - Pause and resume. A pause saves the sandbox's filesystem and memory, so running processes and loaded variables come back on resume. E2B's docs say paused sandboxes are kept indefinitely, with no automatic deletion, and that a resume takes about one second while a pause takes about four seconds per GiB of RAM. - A wall-clock timeout, five minutes by default when you connect, that can kill or auto-pause the sandbox when it runs out. - Continuous runtime caps of 1 hour on the free Hobby plan and 24 hours on Pro. Pausing and resuming resets the cap. - Filesystem-only snapshots, persistent snapshots and forks, for cases where you want a lighter save or a copy of a running sandbox.
Pricing type: usage-based, billed per second while a sandbox runs, plus a plan fee. As of November 26, 2026, E2B's pricing page lists $0.000014 per vCPU per second and $0.0000045 per GiB of memory per second, which works out to about $0.0504 per vCPU-hour and $0.0162 per GiB-hour. Hobby is free with a one-time $100 usage credit and 10 concurrent sandboxes. Pro costs $150 a month plus usage, with 100 concurrent sandboxes (more as paid add-ons). Enterprise is custom and starts at a $2,000 monthly commitment. Compute billing stops when a sandbox is paused or killed.
Limitations: the bill follows the reserved vCPU and memory for every running second, so a sandbox that sits idle while an agent waits on a model costs the same as a busy one. The answer is pausing, which needs code on your side. The pricing page and the billing docs give different default memory sizes (4 GiB and 512 MiB), so check what your template actually reserves.
Use it for per-user agent sandboxes that must keep memory and processes across long idle gaps. Look elsewhere if you want billing by active CPU only.
Alternatives: Daytona, Modal Sandboxes, Vercel Sandbox, AWS Lambda MicroVMs and Cloudflare Containers. Our AI agent sandbox comparison sets their billing units and pause behaviour side by side.
Official URL: https://e2b.dev
