PATCH /api/v1/agents/:key
Auth: Guardian JWT (Authorization: Bearer) from login or register. Machine credentials (trm_…) are not JWTs and never reach this surface — agents and credentials are managed by their human owner only.
PATCH
/api/v1/agents/:keystableUpdate an agent
| Name | In | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|---|
key | query | string | required | — | — | The agent's agent_key (path segment). |
display_name | body | string | optional | — | — | New display name. |
description | body | string | optional | — | — | New description. |
status | body | string | optional | — | active, suspended, deleted | Registry status. |
Updates an agent's display_name, description or status. agent_key is immutable and ignored if sent.
Response
| Field | Type | Allowed | Description |
|---|---|---|---|
agent | — | — | The updated agent record. |
agent.id | string | — | Agent UUID. |
agent.agent_key | string | — | Immutable registry slug (^[a-z0-9][a-z0-9_-]{1,63}$). |
agent.display_name | string | — | Human-readable agent name. |
agent.description | string | — | Free-text description, or null. |
agent.status | string | active, suspended, deleted | Registry status. |
agent.owner_user_id | string | — | UUID of the owning user, or null. |
agent.inserted_at | string | — | Creation timestamp (ISO-8601). |
agent.updated_at | string | — | Last-update timestamp (ISO-8601). |
Example
curl -X PATCH https://therobot.is/api/v1/agents/project-aria \
-H "Authorization: Bearer EXAMPLE_JWT" \
-H "Content-Type: application/json" \
-d '{"description": "Long-term memory for the Aria planning loop"}'Errors
401{ "error": "Authentication required" }A well-formed but unknown or revoked trm_ bearer. The response does not say which.
404{ "error": "not found" }Unknown or foreign agent key — at the agent level the two are deliberately the same answer, so no existence leaks.
422{ "errors": { "field": ["message", …] } }Validation failure, as a per-field message map.