Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
{
"group": "Use cases",
"pages": [
"docs/use-cases/coding-agents",
"docs/use-cases/computer-use",
"docs/use-cases/ci-cd"
]
Expand Down
57 changes: 57 additions & 0 deletions docs/use-cases/coding-agents.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: "Coding Agents"
description: "Run AI coding agents like Claude Code, Codex, and AMP in secure E2B sandboxes with full terminal, filesystem, and git access."
icon: "robot"
---

Coding agents like [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview), [Codex](https://github.com/openai/codex), and [AMP](https://ampcode.com/) can write, debug, and refactor code autonomously. E2B sandboxes give each agent a full Linux environment with terminal, filesystem, and git — completely isolated from your infrastructure. Pre-built templates mean you can go from zero to a running agent in a single API call.

## Why Use a Sandbox

Running coding agents directly on your machine or servers means giving AI-generated code unrestricted access to your environment. E2B sandboxes solve this:

1. **Isolation** — agent-generated code runs in a secure sandbox, never touching your production systems or local machine
2. **Full dev environment** — terminal, filesystem, git, and package managers are all available out of the box, so agents work like a developer would
3. **Pre-built templates** — ready-made templates for popular agents get you started fast, and you can [build your own](/docs/template/quickstart) for any agent
4. **Scalability** — spin up many sandboxes in parallel, each running its own agent on a separate task

## How It Works

1. **Create a sandbox** — use a pre-built template or [build your own](/docs/template/quickstart) with any agent installed
2. **Agent gets a full environment** — terminal, filesystem, git access, and any tools installed in the template
3. **Agent works autonomously** — it reads the codebase, writes code, runs tests, and iterates until the task is done
4. **Extract results** — pull out the git diff, structured output, or modified files via the SDK
5. **Sandbox is cleaned up** — once the work is done, the sandbox is destroyed automatically. No lingering state or cleanup needed

## Agent Examples

Since each sandbox is a full Linux environment, you can run any coding agent — just install it in a [custom template](/docs/template/quickstart). E2B also provides pre-built templates for popular agents to get you started quickly.

<CardGroup cols={2}>
<Card title="Claude Code" icon="/images/icons/claude-code.svg" href="/docs/agents/claude-code">
Anthropic's autonomous coding agent with structured output and MCP tool support
</Card>
<Card title="Codex" icon="/images/icons/codex.svg" href="/docs/agents/codex">
OpenAI's coding agent with schema-validated output and image input
</Card>
<Card title="AMP" icon="/images/icons/amp.svg" href="/docs/agents/amp">
Sourcegraph's coding agent with streaming JSON and thread management
</Card>
<Card title="OpenCode" icon="/images/icons/opencode.svg" href="/docs/agents/opencode">
Open-source multi-provider agent with a built-in web UI
</Card>
</CardGroup>

## Related Guides

<CardGroup cols={3}>
<Card title="Git Integration" icon="code-branch" href="/docs/sandbox/git-integration">
Clone repos, manage branches, and push changes from sandboxes
</Card>
<Card title="Sandbox Persistence" icon="floppy-disk" href="/docs/sandbox/persistence">
Pause and resume sandboxes to preserve state across sessions
</Card>
<Card title="Custom Templates" icon="cube" href="/docs/template/quickstart">
Build your own sandbox templates with custom tools and dependencies
</Card>
</CardGroup>