Archive Agent
POST
/v1/agents/{agent_id}/archiveArchive an agent. Archived agents cannot be used to create new sessions, but existing sessions referencing the agent snapshot continue to run. Archiving is reversible only by support; treat it as a soft delete.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id | string | ✅ | The agent ID (agent_...) |
Request Examples
python
from anthropic import Anthropic
client = Anthropic(
api_key="sk-sb-YOUR_KEY",
base_url="https://api.sandbase.ai"
)
agent = client.beta.agents.archive(
agent_id="agent_01HqR2k7..."
)
print(agent.archived_at)bash
curl -X POST https://api.sandbase.ai/v1/agents/agent_01HqR2k7.../archive \
-H "Authorization: Bearer sk-sb-YOUR_KEY"Response
Returns the Agent object with archived_at set.
json
{
"id": "agent_01HqR2k7...",
"type": "agent",
"version": 1,
"name": "Research Assistant",
"description": "A general-purpose research agent.",
"model": { "id": "claude-sonnet-4", "speed": "standard" },
"system": "You are a research assistant...",
"tools": [],
"mcp_servers": [],
"metadata": {},
"archived_at": "2026-05-29T12:00:00Z",
"created_at": "2026-05-29T10:00:00Z",
"updated_at": "2026-05-29T12:00:00Z"
}Errors
| Status | Type | Description |
|---|---|---|
| 401 | authentication_error | Invalid or missing API key |
| 404 | not_found | Agent not found |

