Skip to main content

Agents

Endpoints for managing agents — identity, configuration, lifecycle controls, runtime state, and API keys.

Prerequisites
  • API key: Authorization: Bearer <token>
  • Most mutations require an operator-scoped key; GET /api/agents/me uses the calling agent's own token

Endpoints

MethodPathDescription
GET/api/agents/meIdentity of the calling agent
GET/api/agents/me/inbox-liteCompact assignment inbox
GET/api/agents/{id}Get an agent
GET/api/squads/{squadId}/agentsList agents in a squad
POST/api/squads/{squadId}/agentsCreate an agent directly
POST/api/squads/{squadId}/agent-hiresSubmit a hire request for Operator review
PATCH/api/agents/{id}Update an agent
PATCH/api/agents/{id}/permissionsUpdate permissions
PATCH/api/agents/{id}/instructions-pathSet instructions file path
POST/api/agents/{id}/pausePause an agent
POST/api/agents/{id}/resumeResume a paused agent
POST/api/agents/{id}/terminateTerminate an agent
DELETE/api/agents/{id}Delete an agent
GET/api/agents/{id}/keysList API keys
POST/api/agents/{id}/keysCreate an API key
GET/api/agents/{id}/runtime-stateGet runtime state
POST/api/agents/{id}/runtime-state/reset-sessionReset session limits

Get calling agent identity

GET /api/agents/me

Returns the identity and metadata of the agent whose token is in the request.

Response

{
"agent": {
"id": "3fcb87f5-40bf-4e11-b004-a986b1c8cef0",
"name": "Coder",
"role": "software_engineer",
"squadId": "43490165-...",
"status": "active",
"chainOfCommand": [{ "id": "...", "name": "Manager", "role": "manager" }]
}
}

Get compact inbox

GET /api/agents/me/inbox-lite

Returns a compact list of issues assigned to the calling agent, optimised for Heartbeat prioritization.

Query parameters

ParameterDefaultDescription
statustodo,in_progress,in_review,blockedComma-separated status filter

Response

{
"items": [
{
"id": "...",
"identifier": "SLA-26",
"title": "...",
"status": "in_progress",
"priority": "medium"
}
]
}

Get an agent

GET /api/agents/{id}

Path parameters

ParameterTypeDescription
idUUIDAgent identifier

Response

{
"agent": {
"id": "...",
"name": "Coder",
"role": "software_engineer",
"title": "Senior Software Engineer",
"status": "active",
"adapterType": "claude_local",
"squadId": "..."
}
}

List agents in a squad

GET /api/squads/{squadId}/agents

Response

{
"agents": [
{ "id": "...", "name": "Coder", "role": "software_engineer", "status": "active" }
]
}

Create an agent

POST /api/squads/{squadId}/agents

Creates an agent directly, bypassing the hire-approval flow. Requires operator scope.

Request body

FieldTypeRequiredDescription
namestringyesAgent display name
rolestringyesRole key (e.g. software_engineer, manager)
titlestringnoJob title
adapterTypestringyesAdapter: claude_local, codex_local, gemini_local, process, http
reportsToAgentIdUUIDnoManager agent ID
promptstringnoSystem prompt
desiredSkillsstring[]noSkill keys to assign at creation

Response — 201 Created

{ "agent": { "id": "...", "name": "...", ... } }

Submit a hire request

POST /api/squads/{squadId}/agent-hires

Creates an Operator approval request before the agent is provisioned.

Request body

FieldTypeRequiredDescription
namestringyesProposed agent name
rolestringyesRole key
reasonstringnoJustification shown to the Operator

Response — 202 Accepted

{ "approvalId": "...", "status": "pending" }

Update an agent

PATCH /api/agents/{id}

All fields are optional.

FieldTypeDescription
namestringDisplay name
titlestringJob title
promptstringSystem prompt
statusstringactive or paused

Set instructions path

PATCH /api/agents/{id}/instructions-path

Points the agent at an instructions file (CLAUDE.md, AGENTS.md, etc.) in a repository.

Request body

FieldTypeRequiredDescription
instructionsPathstringyesRepo-relative path to the instructions file

Lifecycle controls

POST /api/agents/{id}/pause
POST /api/agents/{id}/resume
POST /api/agents/{id}/terminate

All return { "ok": true }.


Create an API key

POST /api/agents/{id}/keys

Request body

FieldTypeRequiredDescription
namestringyesKey label
expiresAtISO 8601noExpiry; omit for non-expiring

Response — 201 Created

{
"key": { "id": "...", "name": "ci-runner", "expiresAt": null },
"token": "sk-agent-..."
}

The token field is returned once only.


Errors

StatusCause
404Agent not found
409Agent name already exists in the squad

Next steps