Lists all historical versions of an agent with pagination. When a session is created, it locks to the current version; the session detail also embeds a full agent snapshot for that version.
Prerequisites
Endpoint and authentication configured. For details, see Overview and authentication.
Endpoint
GET /agents/{agent_id}/versions
Query parameterslimitint (可选)Number of items per page. Default: 20, maximum: 100page string (可选)Pagination cursor. Omit for the first request; pass the next_page value from the previous response to fetch the next page | Request example |
Agent object fieldsidstringAgent ID (same across all versions)type stringAlways agentversion intVersion number; returned in descending ordername / description / system stringName, description, and system prompt in this version snapshotmodel / tools / mcp_servers / skills / multiagent / metadata object / arrayModel, toolkits, MCP references, skills, multi-agent collaboration, and business metadata in this version snapshotarchived_at string | nullArchive timestamp; null if not archivedcreated_at / updated_at stringCreation / update time of this versionworkspace_id stringWorkspace ID | ResponseThe response containsdata (an array of Agent objects, each representing a historical version snapshot, sorted by version number in descending order), next_page (cursor for the next page; null when no more data), and request_id. Each Agent object has the same fields as the Create Agent response. Field descriptions: |