POST /v1/agents/{agent_id}/archive
Archives the specified Agent. Archived Agents are hidden from the default list but remain retrievable by ID.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT> |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id | string | Yes | Agent unique identifier |
Request body
No request body.Example request
Example response
HTTP 200 OKResponse fields
Returns the full Agent object after archival.updated_at reflects the time of the archive operation.
| Field | Type | Description |
|---|---|---|
type | string | Always "agent" |
id | string | Agent unique identifier |
name | string | Agent name |
description | string | Agent description |
model | string | Model identifier |
system | string | System prompt |
tools | array of Agent tool | Tool configuration list |
mcp_servers | array of MCP server | MCP server configuration |
skills | array of Skill binding | Skill bindings |
metadata | Metadata object | Custom metadata |
version | integer | Current version |
archived | boolean | Whether archived |
archived_at | string|null | Archive time (ISO 8601), null when not archived |
created_at | string | Creation time (ISO 8601) |
updated_at | string | Last update time (ISO 8601), refreshed on archive |
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 401 | authentication_error | PAT invalid or expired |
| 403 | permission_error | Not authorized to archive this Agent |
| 404 | not_found_error | Agent with the given ID does not exist |
Notes
- Archive retains Agent data.
- Archived Agents are excluded from the default list returned by
GET /v1/agents. - Pass
include_archived=trueonGET /v1/agentsto include archived Agents in list results. - They remain retrievable via
GET /v1/agents/{agent_id}. - The operation is idempotent; archiving an already-archived Agent does not raise an error.
- Archiving does not increment the Agent
versionand does not create a version snapshot.
Related
Agent setup
Create a reusable, versioned agent configuration.