The whole hunk
from line 465, old and new numbered
/
lines
from line 465
465465
466466The preceding example supplies `version` from the create response, so the update only applies if nothing else has changed the agent since you read it. To apply an update unconditionally, omit `version` from the request:
467467
468<CodeGroup defaultLanguage="cURL">
468<CodeGroup>
469469 ```bash cURL
470470 updated_agent=$(curl -fsSL "https://api.anthropic.com/v1/agents/$AGENT_ID" \
471471 -H "x-api-key: $ANTHROPIC_API_KEY" \
from line 510
510510
511511Fetch the full version history to track how an agent has changed over time. Results are paginated, and the SDK examples fetch every page automatically.
512512
513<CodeGroup defaultLanguage="CLI">
513<CodeGroup>
514514 ```bash cURL
515515 curl -fsSL "https://api.anthropic.com/v1/agents/$AGENT_ID/versions" \
516516 -H "x-api-key: $ANTHROPIC_API_KEY" \
from line 576
576576
577577Archiving makes the agent read-only and cannot be undone. Existing sessions continue to run, but new sessions cannot reference the agent. The response sets `archived_at` to the archive timestamp.
578578
579<CodeGroup defaultLanguage="CLI">
579<CodeGroup>
580580 ```bash cURL
581581 archived=$(curl -fsSL -X POST "https://api.anthropic.com/v1/agents/$AGENT_ID/archive" \
582582 -H "x-api-key: $ANTHROPIC_API_KEY" \