On this page
agents.delete
Delete (archive) an agent: it leaves the catalog and takes no new drafts, publications or runs; history is kept
Request
DELETE /api/v1/agents/{agent_id}
- MCP:
agents_delete - SDK:
client.agents.delete(SDK path arguments usepath; MCP usesparams). - Minimum API key role: member.
- Idempotency: natural.
Use the request schema below. Read IDs from earlier operation results.
Input schema
json
{
"parameters": [
{
"name": "agent_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
}
}
],
"requestBody": null
}
Responses
json
{
"200": {
"description": "Delete (archive) an agent: it leaves the catalog and takes no new drafts, publications or runs; history is kept",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentsDeleteResponse200"
}
}
}
},
"4XX": {
"description": "Typed error (ApiError)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"5XX": {
"description": "Typed error (ApiError)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}
Referenced schemas
json
{
"components": {
"schemas": {
"AgentsDeleteResponse200": {
"type": "object",
"properties": {
"agent": {
"type": "object",
"properties": {
"tenant_id": {
"type": "string",
"format": "uuid"
},
"kind": {
"type": "string",
"enum": [
"agent"
]
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
}
},
"required": [
"tenant_id",
"kind",
"id"
],
"additionalProperties": false
},
"deleted": {
"type": "boolean",
"enum": [
true
]
},
"archived_at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"agent",
"deleted",
"archived_at"
],
"additionalProperties": false
},
"ApiError": {
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"unauthenticated",
"forbidden",
"not_found",
"conflict",
"invalid_request",
"idempotency_conflict",
"policy_denied",
"capability_unavailable",
"provider_unavailable",
"knowledge_unavailable",
"publication_invalid",
"run_not_active",
"rate_limited",
"outcome_unknown",
"internal"
]
},
"message": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"outcome": {
"type": "string",
"enum": [
"none",
"unknown"
]
},
"details": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"code",
"message",
"retryable",
"outcome"
],
"additionalProperties": false
}
},
"required": [
"error"
],
"additionalProperties": false
}
}
}
}
Errors and recovery
See API error handling and Troubleshooting.
Related guides
Content version 7d7685e2Markdown source