# E2B for AI agents: a desktop sandbox for every bot

[E2B](https://e2b.dev) is an open source cloud for running AI agents in isolated sandboxes. Each sandbox is a small Linux machine in E2B's cloud, so agent code and commands never run on your own server.

[SFCrew](https://sfcrewai.com/) is an open source app for AI teammates that do real work. You talk to each bot in chat, and each one gets its own computer with a desktop, browser, terminal and files that you can watch and take over. E2B can be the place those computers live when you host SFCrew yourself. E2B supplies the sandbox. SFCrew puts each bot's screen on it, saves its work, and pauses it when nobody is using it.

Updated November 4, 2026.

## What is E2B?

[E2B](https://e2b.dev) runs sandboxes for AI agents as a hosted service. Each sandbox is a Firecracker microVM, a lightweight virtual machine with its own kernel, so what an agent does inside it stays inside it. The code is open source under the Apache-2.0 license.

E2B also publishes a desktop sandbox with a graphical Linux desktop, which is what SFCrew builds on. Sandboxes can be paused and resumed later with their files intact.

## What your bots can do on an E2B computer

On E2B, each SFCrew bot works on a real Linux desktop. You see its screen in the chat and can take the mouse and keyboard at any time.

- Browse the web in Chromium, with its own screen and browser profile. Signed-in sessions stay between runs.
- Run shell commands, read and write files, and open a terminal you can type in yourself.
- Share one computer. Bots in a workspace share a team computer by default, and each one gets its own screen on it.
- Come back to the same machine. An idle computer pauses instead of being deleted, and resumes with its files the next time a bot needs it.
- Survive a lost sandbox. SFCrew keeps its own copy of each bot's workspace, so the E2B disk is a cache. If a sandbox disappears, a new one starts from the saved work.

## When to choose E2B

Choose E2B when you self-host SFCrew for other people, such as a team or a public instance, and you don't want bots running on the same server as SFCrew. SFCrew's own setup docs suggest it for that case, and SFCrew's live computer acceptance test runs on E2B.

[Boat](https://sfcrewai.com/sandboxes/boat/) is what SFCrew Cloud runs on: long-lived VMs that keep their disk when stopped. [Novita](https://sfcrewai.com/sandboxes/novita/) uses a similar sandbox model and keeps open programs in memory when it pauses. [Daytona](https://sfcrewai.com/sandboxes/daytona/) suits teams already on it. For no cloud account at all, use [Docker](https://sfcrewai.com/sandboxes/docker/) on your own machine, or [Kubernetes](https://sfcrewai.com/sandboxes/kubernetes/) on a cluster you run. The [sandbox comparison](https://sfcrewai.com/sandboxes/) has them all side by side.

## Limits

- SFCrew doesn't expose a region choice, a custom image, or E2B's own snapshots, volumes or network rules.
- Computers use the `sfcrew-computer` template at 2 vCPU and 4 GB once you build it. Before that, they use E2B's stock desktop, which reserves 8 vCPU and 8 GB each.
- An existing computer keeps the size it was created with until it is replaced.
- Like other hosted providers that bill while running, a computer is paused after two hours of continuous uptime by default unless a bot is still working on it or you are in control.

## How to set it up

These steps are for the admin of a [self-hosted SFCrew](https://sfcrewai.com/self-hosted-ai-agent/). SFCrew Cloud users don't need an E2B account.

1. Create an account at [e2b.dev](https://e2b.dev) and copy an API key.
2. Either set `SANDBOX_PROVIDER=e2b` and `E2B_API_KEY` on the SFCrew API and worker, or sign in as an admin and choose E2B under Settings → Computer, then paste the key.
3. Build the smaller template once with `E2B_API_KEY=<your key> pnpm sandbox:e2b-template`, in the E2B team that owns the key. Run it again when SFCrew's template definition changes.
4. Open a bot's computer in SFCrew to check that the desktop comes up.

## FAQ

### Is E2B open source?

Yes. E2B's code is on [GitHub](https://github.com/e2b-dev/E2B) under the Apache-2.0 license. SFCrew uses E2B's hosted service through its API key.

### Can AI agents use a browser in E2B?

Yes. SFCrew runs a Linux desktop with Chromium in each E2B sandbox. Every bot gets its own screen and browser profile, and you can watch it or take over.

### E2B vs Daytona for AI agents?

Both run SFCrew bot computers with a desktop, terminal and files. E2B starts from a desktop template, and idle computers pause and resume as the same machine. On [Daytona](https://sfcrewai.com/sandboxes/daytona/), the first start installs the desktop, and waking an archived computer can take several minutes. E2B is open source; Daytona's public repository is archived.

### What happens when a bot's E2B computer is idle?

It pauses after 10 minutes without use by default. The next time the bot needs it, the same computer resumes. Removing the computer deletes it.

### Do I need E2B to run SFCrew?

No. [Docker](https://sfcrewai.com/sandboxes/docker/) is the default when you self-host and needs no cloud account. E2B is one optional place to run bot computers.

## More sandboxes for AI agents

- [Compare all sandboxes](https://sfcrewai.com/sandboxes/)
- [Boat](https://sfcrewai.com/sandboxes/boat/): Many bots with separate logins
- [Daytona](https://sfcrewai.com/sandboxes/daytona/): Teams already on Daytona
- [Novita](https://sfcrewai.com/sandboxes/novita/): Bots that pick up where they left off
- [Railway](https://sfcrewai.com/sandboxes/railway/): Running everything in one Railway account
- [Wuying](https://sfcrewai.com/sandboxes/wuying/): Windows apps, Alibaba Cloud and mainland China
- [Docker](https://sfcrewai.com/sandboxes/docker/): Self-hosting with no cloud account
- [Kubernetes](https://sfcrewai.com/sandboxes/kubernetes/): Teams that already run Kubernetes
- [Your computer](https://sfcrewai.com/sandboxes/your-computer/): Bots that need your real apps and logins

## Sources

- [E2B](https://e2b.dev)
- [E2B on GitHub](https://github.com/e2b-dev/E2B)
- [SFCrew, computer providers](https://github.com/Isuhail29/sfcrew-ai/blob/main/docs/self-host-sandbox-providers.md)
- [SFCrew, computer runtime and isolation](https://github.com/Isuhail29/sfcrew-ai/blob/main/docs/computer-runtime.md)
