Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

github changedmanaged-agents/github

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+42added
Lines−36removed
From line 20 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits19to this page, all time

The whole hunk

from line 20, old and new numbered
/
lines
from line 20
2020 
2121<CodeGroup defaultLanguage="CLI">
2222 ```bash cURL
23 agent_id=$(curl -fsS https://api.anthropic.com/v1/agents \
23 curl -fsS https://api.anthropic.com/v1/agents \
2424 -H "x-api-key: $ANTHROPIC_API_KEY" \
2525 -H "anthropic-version: 2023-06-01" \
2626 -H "anthropic-beta: managed-agents-2026-04-01" \
2727 -H "content-type: application/json" \
28 --data '{
28 -d '{
2929 "name": "Code Reviewer",
3030 "model": "claude-opus-5-5",
3131 "system": "You are a code review assistant with access to GitHub.",
from line 43
4343 "mcp_server_name": "github"
4444 }
4545 ]
46 }' | jq -r '.id'
47 )
46 }'
4847 ```
4948 
5049 <CodeGroupItem>
from line 242
243242 
244243<CodeGroup>
245244 ```bash cURL
246 session_id=$(curl -fsS https://api.anthropic.com/v1/sessions \
245 curl -fsS https://api.anthropic.com/v1/sessions \
247246 -H "x-api-key: $ANTHROPIC_API_KEY" \
248247 -H "anthropic-version: 2023-06-01" \
249248 -H "anthropic-beta: managed-agents-2026-04-01" \
250249 -H "content-type: application/json" \
251 --data @- <<JSON | jq -r '.id'
250 -d @- <<JSON
252251 {
253252 "agent": "$agent_id",
254253 "environment_id": "$environment_id",
from line 261
262261 ]
263262 }
264263 JSON
265 )
266264 ```
267265 
268266 ```bash CLI
269 SESSION_ID=$(ant beta:sessions create \
267 ant beta:sessions create \
270268 --agent "$AGENT_ID" \
271 --environment-id "$ENVIRONMENT_ID" \
272 --transform id --raw-output <<'EOF'
269 --environment-id "$ENVIRONMENT_ID" <<'EOF'
273270 resources:
274271 - type: github_repository
275272 url: https://github.com/org/repo
from line 273
276273 mount_path: /workspace/repo
277274 authorization_token: ghp_your_github_token
278275 EOF
279 )
280276 ```
281277 
282278 ```python Python
from line 420
424420 
425421<CodeGroup>
426422 ```bash cURL
427 resources='[
428 {
429 "type": "github_repository",
430 "url": "https://github.com/org/frontend",
431 "mount_path": "/workspace/frontend",
432 "authorization_token": "ghp_your_github_token"
433 },
434 {
435 "type": "github_repository",
436 "url": "https://github.com/org/backend",
437 "mount_path": "/workspace/backend",
438 "authorization_token": "ghp_your_github_token"
439 }
440 ]'
423 curl -fsS https://api.anthropic.com/v1/sessions \
424 -H "x-api-key: $ANTHROPIC_API_KEY" \
425 -H "anthropic-version: 2023-06-01" \
426 -H "anthropic-beta: managed-agents-2026-04-01" \
427 -H "content-type: application/json" \
428 -d @- <<JSON
429 {
430 "agent": "$agent_id",
431 "environment_id": "$environment_id",
432 "resources": [
433 {
434 "type": "github_repository",
435 "url": "https://github.com/org/frontend",
436 "mount_path": "/workspace/frontend",
437 "authorization_token": "ghp_your_github_token"
438 },
439 {
440 "type": "github_repository",
441 "url": "https://github.com/org/backend",
442 "mount_path": "/workspace/backend",
443 "authorization_token": "ghp_your_github_token"
444 }
445 ]
446 }
447 JSON
441448 ```
442449 
443450 ```bash CLI
444 RESOURCES_BODY=$(cat <<'EOF'
451 ant beta:sessions create \
452 --agent "$AGENT_ID" \
453 --environment-id "$ENVIRONMENT_ID" <<'EOF'
445454 resources:
446455 - type: github_repository
447456 url: https://github.com/org/frontend
from line 461
452461 mount_path: /workspace/backend
453462 authorization_token: ghp_your_github_token
454463 EOF
455 )
456464 ```
457465 
458466 ```python Python
from line 596
588596<CodeGroup>
589597 ```bash cURL
590598 # List resources on the session
591 repo_resource_id=$(curl -fsS "https://api.anthropic.com/v1/sessions/$session_id/resources" \
599 curl -fsS "https://api.anthropic.com/v1/sessions/$session_id/resources" \
592600 -H "x-api-key: $ANTHROPIC_API_KEY" \
593601 -H "anthropic-version: 2023-06-01" \
594602 -H "anthropic-beta: managed-agents-2026-04-01" \
595 -H "content-type: application/json" | jq -r '.data[0].id')
596 echo "$repo_resource_id" # "sesrsc_01ABC..."
603 -H "content-type: application/json"
597604 
598605 # Rotate the authorization token
599 curl -fsS "https://api.anthropic.com/v1/sessions/$session_id/resources/$repo_resource_id" \
606 curl -fsS \
607 "https://api.anthropic.com/v1/sessions/$session_id/resources/$repo_resource_id" \
600608 # ...
601 -o /dev/null \
602 --data @- <<JSON
609 -d @- <<'JSON'
603610 {
604611 "authorization_token": "ghp_your_new_github_token"
605612 }
from line 743
736743 -H "anthropic-version: 2023-06-01" \
737744 -H "anthropic-beta: managed-agents-2026-04-01" \
738745 -H "content-type: application/json" \
739 -o /dev/null \
740 --data '{
746 -d '{
741747 "events": [
742748 {
743749 "type": "user.message",
from line 759
753759 ```
754760 
755761 ```bash CLI
756 ant beta:sessions:events send --session-id "$SESSION_ID" > /dev/null <<'EOF'
762 ant beta:sessions:events send --session-id "$SESSION_ID" <<'EOF'
757763 events:
758764 - type: user.message
759765 content:
Feedback