GET /api/v1/memory/agents/:agent_id/compartments
Auth: Memory API token (Authorization: Bearer trm_api_… or trm_mk_…) or the agent owner's/admin's JWT. The principal must be able to see the agent: its owner, a global admin, or a credential bound to it. Unknown and foreign agents are the same 404.
GET
/api/v1/memory/agents/:agent_id/compartmentsstableList compartments
| Name | In | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|---|
agent_id | query | string | required | — | — | The agent's agent_key (path segment). |
Lists the agent's access compartments, ordered by slug.
Response
| Field | Type | Allowed | Description |
|---|---|---|---|
compartments | — | — | Array of compartments. |
compartments[].id | string | — | Compartment UUID. |
compartments[].slug | string | — | Compartment slug used by memory filters. |
compartments[].classification | string | open, restricted, sealed | Compartment classification. |
compartments[].settings | — | — | Compartment settings map. |
Example
curl https://therobot.is/api/v1/memory/agents/project-aria/compartments \
-H "Authorization: Bearer trm_api_EXAMPLE"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.