Skip to content

Commit d9148d3

Browse files
Claude agents rename (#234)
* Rename managed agents docs for Claude
1 parent 1332b96 commit d9148d3

2 files changed

Lines changed: 38 additions & 23 deletions

File tree

docs.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
{
5555
"group": "Agents in sandbox",
5656
"pages": [
57-
"docs/agents/anthropic-managed-agents",
5857
"docs/agents/amp",
5958
"docs/agents/claude-code",
59+
"docs/agents/claude-managed-agents",
6060
"docs/agents/codex",
6161
"docs/agents/devin",
6262
"docs/agents/openai-agents-sdk",
@@ -3727,6 +3727,11 @@
37273727
}
37283728
},
37293729
"redirects": [
3730+
{
3731+
"source": "/docs/agents/anthropic-managed-agents",
3732+
"destination": "/docs/agents/claude-managed-agents",
3733+
"permanent": true
3734+
},
37303735
{
37313736
"source": "/docs/troubleshooting/pip-install-error",
37323737
"destination": "/docs/faq/pip-install-error",
Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
---
2-
title: "Anthropic Managed Agents"
3-
description: "Use E2B as the sandbox runtime for Anthropic Managed Agents self-hosted environments."
2+
title: "Claude Managed Agents"
3+
description: "Use E2B as the sandbox runtime for Claude Managed Agents self-hosted environments."
44
icon: "/images/icons/claude-code.svg"
55
---
66

7-
[Anthropic Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview) can use a self-hosted environment when you want to run tool calls in your own infrastructure. E2B provides a reusable `E2B/claude-managed-agents-webhooks` template that receives Anthropic webhooks and routes each Managed Agents session to a persistent E2B worker sandbox.
7+
[Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview) can use a self-hosted environment when you want tool calls to run in your own infrastructure. Claude runs the agentic loop and reasoning process; E2B provides isolated sandbox infrastructure for the environment where tool calls execute. The reusable `E2B/claude-managed-agents-webhooks` template receives webhooks and routes each Claude Managed Agents session to a persistent E2B worker sandbox.
88

99
<Info>
10-
For the full source, local setup scripts, and app-owned routing examples, see the [Anthropic Managed Agents cookbook](https://github.com/e2b-dev/e2b-cookbook/tree/main/examples/anthropic-managed-agents).
10+
This separation is intentional for security: Claude decides what work to do, while the sandbox contains the execution environment, filesystem, tools, network access, and runtime logs.
11+
</Info>
12+
13+
<Info>
14+
For the full source, local setup scripts, and app-owned routing examples, see the [Claude Managed Agents cookbook](https://github.com/e2b-dev/e2b-cookbook/tree/main/examples/anthropic-managed-agents).
1115
</Info>
1216

1317
## Install dependencies
@@ -28,20 +32,20 @@ Export the values you will pass to the webhook sandbox:
2832
# E2B dashboard API keys: https://e2b.dev/dashboard?tab=keys
2933
export E2B_API_KEY="..."
3034

31-
# Anthropic Console API keys: https://console.anthropic.com/settings/keys
35+
# Claude Console API keys: https://console.anthropic.com/settings/keys
3236
export ANTHROPIC_API_KEY="..."
3337

34-
# Anthropic Console environments: https://platform.claude.com/workspaces/default/environments
38+
# Claude Console environments: https://platform.claude.com/workspaces/default/environments
3539
export ANTHROPIC_ENVIRONMENT_ID="..."
3640

37-
# Open the self-hosted environment in the Anthropic Console and click Generate environment key.
41+
# Open the self-hosted environment in the Claude Console and click Generate environment key.
3842
export ANTHROPIC_ENVIRONMENT_KEY="..."
3943
```
4044

4145
## Start the webhook sandbox
4246

4347
Start the public template with auto-resume enabled. The template starts a webhook server on port `8000`.
44-
Because Anthropic only shows the webhook signing key after you register an endpoint, write the router config now and add the signing key to the same sandbox after registration.
48+
Because the signing key only appears after you register a webhook endpoint, write the router config now and add the signing key to the same sandbox after registration.
4549

4650
<CodeGroup>
4751
```typescript JavaScript & TypeScript
@@ -109,7 +113,7 @@ At this point `/health` returns `200`, but `/webhook` returns `503` until the si
109113

110114
## Register the webhook
111115

112-
In the [Anthropic Console webhooks settings](https://platform.claude.com/settings/workspaces/default/webhooks), create a webhook endpoint using the printed URL:
116+
In the [Claude Console webhooks settings](https://platform.claude.com/settings/workspaces/default/webhooks), create a webhook endpoint using the printed URL:
113117

114118
```text
115119
https://<sandbox-host>/webhook
@@ -143,25 +147,25 @@ sandbox.files.write(
143147
```
144148
</CodeGroup>
145149

146-
## Send work to the agent
150+
## Run an end-to-end smoke test
147151

148-
Create or select a Managed Agents agent in the [Anthropic Console](https://platform.claude.com/workspaces/default/agents), then create a session with that agent and the same `ANTHROPIC_ENVIRONMENT_ID` you wrote into the webhook sandbox. Creating the session does not start work; the `user.message` event does.
152+
Create or select a Claude Managed Agents agent in the [Claude Console](https://platform.claude.com/workspaces/default/agents), then create a session with that agent and the same `ANTHROPIC_ENVIRONMENT_ID` you wrote into the webhook sandbox. Creating the session does not start work; the `user.message` event does.
149153

150154
```bash
151155
export ANTHROPIC_AGENT_ID="agent_..."
152156
```
153157

154-
Use a small sandbox task for the first smoke test:
158+
Use a small shell task for the first smoke test:
155159

156160
```text
157161
Use bash to echo webhook-smoke-ok. Answer only with that text.
158162
```
159163

160164
<CodeGroup>
161165
```typescript JavaScript & TypeScript
162-
import Anthropic from '@anthropic-ai/sdk'
166+
import Claude from '@anthropic-ai/sdk'
163167

164-
const client = new Anthropic({
168+
const client = new Claude({
165169
apiKey: process.env.ANTHROPIC_API_KEY,
166170
})
167171

@@ -190,9 +194,9 @@ console.log(`Session ID: ${session.id}`)
190194

191195
```python Python
192196
import os
193-
import anthropic
197+
from anthropic import Anthropic as Claude
194198

195-
client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])
199+
client = Claude(api_key=os.environ["ANTHROPIC_API_KEY"])
196200

197201
session = client.beta.sessions.create(
198202
agent=os.environ["ANTHROPIC_AGENT_ID"],
@@ -219,6 +223,12 @@ print(f"Session ID: {session.id}")
219223
```
220224
</CodeGroup>
221225

226+
Claude should answer:
227+
228+
```text
229+
webhook-smoke-ok
230+
```
231+
222232
Then check the webhook sandbox:
223233

224234
<CodeGroup>
@@ -261,30 +271,30 @@ A healthy run has:
261271
- `/health` returning `ok: true`.
262272
- Router logs showing `routing work` and `assigned session`.
263273
- A session-to-sandbox assignment in the router's assignment store.
264-
- The assigned worker sandbox's `worker.log` showing claimed work, tool execution, and successful results posted back to Anthropic.
265-
- The Anthropic session returning to `session.status_idle`.
274+
- The assigned worker sandbox's `worker.log` showing the shell tool execution and successful results posted back to Claude.
275+
- The Claude Managed Agents session returning to `session.status_idle`.
266276

267277
The assignment store records the worker sandbox ID for each routed session. Connect to that sandbox and check `/opt/anthropic-managed-agents-js/worker.log` when you need the tool execution logs.
268278

269279
If the session stays at `requires_action`, check `/opt/anthropic-managed-agents-js/webhook.log` in the router sandbox first, then check `/opt/anthropic-managed-agents-js/worker.log` in the assigned worker sandbox. Stale environment keys, missing signing keys, archived sessions, and failed tool-result posts show up there.
270280

271281
## Runtime behavior
272282

273-
The worker runs with `/mnt/session` as its workdir. File tools are constrained to that workdir, skills are downloaded under `/mnt/session/skills/<name>/`, and generated artifacts should be written under `/mnt/session/outputs`.
283+
The worker sandbox runs tool calls with `/mnt/session` as its workdir. File tools are constrained to that workdir, skills are downloaded under `/mnt/session/skills/<name>/`, and generated artifacts should be written under `/mnt/session/outputs`.
274284

275285
The webhook sandbox is the router. It keeps a session-to-sandbox assignment store and starts worker sandboxes with E2B auto-resume and pause-on-timeout settings.
276286

277287
## Session-scoped sandboxes
278288

279-
By default, the public webhook template gives each Managed Agents session its own E2B worker sandbox. Follow-up turns for the same session reconnect to the same worker and reuse its `/mnt/session` filesystem.
289+
By default, the public webhook template gives each Claude Managed Agents session its own E2B worker sandbox. Follow-up turns for the same session reconnect to the same worker and reuse its `/mnt/session` filesystem. The sandbox is the isolated execution environment, not the place where Claude's reasoning loop runs.
280290

281291
Use [cloud buckets](/docs/storage/cloud-buckets), [Archil](/docs/storage/archil), or [volumes](/docs/volumes) when files need to outlive a sandbox or be shared across many sandboxes.
282292

283-
If you want to run that router in your own service instead of in E2B, use the cookbook's [`app-webhooks/` example](https://github.com/e2b-dev/e2b-cookbook/tree/main/examples/anthropic-managed-agents/javascript/app-webhooks). It receives Anthropic webhooks in your app, claims work there, and routes each session to its own E2B sandbox by default.
293+
If you want to run that router in your own service instead of in E2B, use the cookbook's [`app-webhooks/` example](https://github.com/e2b-dev/e2b-cookbook/tree/main/examples/anthropic-managed-agents/javascript/app-webhooks). It receives webhooks in your app, claims work there, and routes each session to its own E2B sandbox by default.
284294

285295
## Clean up
286296

287-
Remove the webhook endpoint in the Anthropic Console before deleting the router sandbox. Then kill the router sandbox and any assigned worker sandboxes you no longer need.
297+
Remove the webhook endpoint in the Claude Console before deleting the router sandbox. Then kill the router sandbox and any assigned worker sandboxes you no longer need.
288298

289299
## Related guides
290300

0 commit comments

Comments
 (0)