quickstart changedmanaged-agents/quickstart
Nearest release: v2.1.304, published under an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+44added
Lines−62removed
From line
13
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits35to this page, all time
The whole hunk
from line 13, old and new numbered
/
from line 13
1313This guide walks you through creating an agent, setting up an environment, starting a session, and streaming agent responses.
1414
1515<Tip>
16 **Prefer an interactive walkthrough?** Run `/claude-api managed-agents-onboard` in the latest version of [Claude Code](https://claude.com/product/claude-code) for a guided setup and interactive question-answering.
16 **Prefer an interactive walkthrough?** The latest version of [Claude Code](https://claude.com/product/claude-code) can guide you through the setup and answer your questions:
17
18 Let Claude Code set up your agent for you
19
20 ```text
21 /claude-api managed-agents-onboard
22 ```
1723</Tip>
1824
1925## Core concepts
from line 144
138144 <CodeGroup defaultLanguage="CLI">
139145 <CodeGroupItem>
140146 ```bash cURL
141 set -euo pipefail
142
143 agent=$(
144 curl -sS --fail-with-body https://api.anthropic.com/v1/agents \
145 -H "x-api-key: $ANTHROPIC_API_KEY" \
146 -H "anthropic-version: 2023-06-01" \
147 -H "anthropic-beta: managed-agents-2026-04-01" \
148 -H "content-type: application/json" \
149 -d '{
150 "name": "Coding Assistant",
151 "model": "claude-opus-5-5",
152 "system": "You are a helpful coding assistant. Write clean, well-documented code.",
153 "tools": [
154 {"type": "agent_toolset_20260401"}
155 ]
156 }'
157 )
158
159 AGENT_ID=$(jq -er '.id' <<<"$agent")
160 AGENT_VERSION=$(jq -er '.version' <<<"$agent")
161
162 echo "Agent ID: $AGENT_ID, version: $AGENT_VERSION"
147 curl -sS --fail-with-body https://api.anthropic.com/v1/agents \
148 -H "x-api-key: $ANTHROPIC_API_KEY" \
149 -H "anthropic-version: 2023-06-01" \
150 -H "anthropic-beta: managed-agents-2026-04-01" \
151 -H "content-type: application/json" \
152 -d '{
153 "name": "Coding Assistant",
154 "model": "claude-opus-5-5",
155 "system": "You are a helpful coding assistant. Write clean, well-documented code.",
156 "tools": [
157 {"type": "agent_toolset_20260401"}
158 ]
159 }'
163160 ```
164161
165162 Save the returned `agent.id`. You'll reference it in every session you create.
from line 374
377374 <CodeGroup defaultLanguage="CLI">
378375 <CodeGroupItem>
379376 ```bash cURL
380 environment=$(
381 curl -sS --fail-with-body https://api.anthropic.com/v1/environments \
382 -H "x-api-key: $ANTHROPIC_API_KEY" \
383 -H "anthropic-version: 2023-06-01" \
384 -H "anthropic-beta: managed-agents-2026-04-01" \
385 -H "content-type: application/json" \
386 -d '{
387 "name": "quickstart-env",
388 "config": {
389 "type": "cloud",
390 "networking": {"type": "limited", "allow_package_managers": true}
391 }
392 }'
393 )
394
395 ENVIRONMENT_ID=$(jq -er '.id' <<<"$environment")
396
397 echo "Environment ID: $ENVIRONMENT_ID"
377 curl -sS --fail-with-body https://api.anthropic.com/v1/environments \
378 -H "x-api-key: $ANTHROPIC_API_KEY" \
379 -H "anthropic-version: 2023-06-01" \
380 -H "anthropic-beta: managed-agents-2026-04-01" \
381 -H "content-type: application/json" \
382 -d '{
383 "name": "quickstart-env",
384 "config": {
385 "type": "cloud",
386 "networking": {"type": "limited", "allow_package_managers": true}
387 }
388 }'
398389 ```
399390
400391 Save the returned `environment.id` too.
from line 549
558549
559550 <CodeGroup>
560551 ```bash cURL
561 session=$(
562 curl -sS --fail-with-body https://api.anthropic.com/v1/sessions \
563 -H "x-api-key: $ANTHROPIC_API_KEY" \
564 -H "anthropic-version: 2023-06-01" \
565 -H "anthropic-beta: managed-agents-2026-04-01" \
566 -H "content-type: application/json" \
567 -d '{
568 "agent": "'"$AGENT_ID"'",
569 "environment_id": "'"$ENVIRONMENT_ID"'",
570 "title": "Quickstart session"
571 }'
572 )
573
574 SESSION_ID=$(jq -er '.id' <<<"$session")
575
576 echo "Session ID: $SESSION_ID"
552 curl -sS --fail-with-body https://api.anthropic.com/v1/sessions \
553 -H "x-api-key: $ANTHROPIC_API_KEY" \
554 -H "anthropic-version: 2023-06-01" \
555 -H "anthropic-beta: managed-agents-2026-04-01" \
556 -H "content-type: application/json" \
557 -d '{
558 "agent": "'"$AGENT_ID"'",
559 "environment_id": "'"$ENVIRONMENT_ID"'",
560 "title": "Quickstart session"
561 }'
577562 ```
578563
579564 ```bash CLI
580 SESSION_ID=$(ant beta:sessions create \
565 ant beta:sessions create \
581566 --agent "$AGENT_ID" \
582567 --environment-id "$ENVIRONMENT_ID" \
583 --title "Quickstart session" \
584 --transform id --raw-output)
585
586 echo "Session ID: $SESSION_ID"
568 --title "Quickstart session"
587569 ```
588570
589571 ```python Python
No line in this hunk matches that.