---
title: "Create or start agents agentID retire"
method: POST
path: "/v1/agents/{agentID}/retire"
---

# Create or start agents agentID retire

`POST /v1/agents/{agentID}/retire`

## Request

- Base URL: `https://api.plori.ai`
- URL: `https://api.plori.ai/v1/agents/{agentID}/retire`
- Auth: HTTP bearer

Retires the agent, requests cancellation of nonterminal runs, and detaches memberships. Workspace, thread, and run history remain. An agent that is a Workspace's default manager is refused with 409 workspace_manager_in_use and the Workspaces in workspace_ids; select another manager for each first.

## Path parameters

- `agentID` string, uuid, required

## Response `202`

Agent lifecycle result.

- AgentRetire
  - `agent_id` string, uuid, required
  - `kind` string, required
  - `lifecycle_state` string, required
  - `runs` AgentRunStop[], required
    - `run_id` string, uuid, required
    - `state` 'cancelling' | 'finished' | 'input_cancelled', required
  - `detached_workspace_ids` string[], required

## Other responses

- `400`: Malformed request.
- `401`: Missing or invalid credential.
- `404`: No such resource.
- `409`: Conflict, active operation, or current-revision mismatch.

---

[API](https://skmtc.dev/plori/apis/plori-rest-api.md) · [All operations](https://skmtc.dev/plori/apis/plori-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/plori/apis/plori-rest-api/revisions/15c4f9260dff?raw)
