Overview

Coding agents

Isolation — Generated code runs in its own VM and never touches your systems.
A complete dev box — Terminal, filesystem, git and package managers, like a fresh laptop.
Parallel by default — One sandbox per task, as many as your plan's concurrency allows.

The loop#

1
Boot a sandbox from an agent template

E2B ships pre-built templates — claude has Claude Code installed. Pass your model provider key in envs.

2
Give it the code

Clone the repository inside the sandbox — see Git in a sandbox.

3
Let it work headless

Run the agent non-interactively through commands.run(), streaming its output back to your app.

4
Take the result out

Read git diff, copy files with sandbox.files.read(), or push a branch. Then kill the sandbox — or pause it for the next task.

Supported agents#

Sandboxes can reach the internet by default. If an agent auto-approves its own tool calls and reads untrusted input, restrict where it can connect with egress rules.

Next#

Updated

Was this page helpful?