← All REST endpoints

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/compartmentsstable

List compartments

Parameters
NameInTypeRequiredDefaultAllowedDescription
agent_idquerystringrequired——The agent's agent_key (path segment).

Lists the agent's access compartments, ordered by slug.

Response

FieldTypeAllowedDescription
compartments——Array of compartments.
compartments[].idstring—Compartment UUID.
compartments[].slugstring—Compartment slug used by memory filters.
compartments[].classificationstringopen, restricted, sealedCompartment classification.
compartments[].settings——Compartment settings map.

Example

bash
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.