GET /api/v1/memory/agents/:agent_id/memories
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/memoriesstableBrowse memories
| Name | In | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|---|
agent_id | query | string | required | — | — | The agent's agent_key (path segment). |
q | query | string | optional | — | — | Trigram search over content, summary, context, title and interpretation. |
content_type | query | string | optional | — | episodic, semantic, procedural | Filter by memory type. |
state | query | string | optional | — | active, consolidating, archived, quarantined, pruned | Filter by lifecycle state. Absent: everything but pruned. |
compartment | query | string | optional | — | — | Filter by compartment slug. |
domain | query | string | optional | — | — | Filter by domain label. |
pinned | query | boolean | optional | — | — | Filter to pinned (or unpinned) rows. |
occurred_after | query | string | optional | — | — | ISO-8601 lower bound on occurred_at. |
occurred_before | query | string | optional | — | — | ISO-8601 upper bound on occurred_at. |
record_class | query | string | optional | — | original, summary, inferred, reconstructed, user_supplied, system_generated, contested | Filter by provenance class. |
disputed | query | boolean | optional | — | — | Filter to disputed (or undisputed) rows. |
sort | query | string | optional | occurred_at | occurred_at, salience, last_recalled_at | Sort column. Every ordering carries an id tiebreaker, so pages never skip or repeat rows. |
order | query | string | optional | desc | desc, asc | Sort direction. |
limit | query | integer | optional | 50 | — | Page size, capped at 200. |
cursor | query | string | optional | — | — | Opaque keyset cursor from next_cursor. An unparseable cursor yields an empty page rather than restarting. |
include_org | query | boolean | optional | true | — | Pass false to see only this agent's own rows. |
org | query | string | optional | — | — | Name a specific organization for the org arm (membership-checked, never trusted). |
repo | query | string | optional | — | — | Narrow the org arm to one repo slug. |
Owner-scoped, filterable, keyset-paginated memory list. Without an explicit state, pruned tombstones are excluded and every other state (including archived) is returned; by default the agent's org's open memories are included too.
Response
| Field | Type | Allowed | Description |
|---|---|---|---|
memories | — | — | Array of memory nodes for this page. |
memories[].id | string | — | Memory UUID. |
memories[].title | string | — | Human-readable label (empty for a sealed memory whose title was stripped). |
memories[].sealed | boolean | — | True when the row is sealed and its contents withheld. |
memories[].summary | string | — | Generated or authored summary (may be empty). |
memories[].record_class | string | original, summary, inferred, reconstructed, user_supplied, system_generated, contested | Provenance class of the record. |
memories[].disputed | boolean | — | Whether the record is under dispute. |
memories[].content_type | string | episodic, semantic, procedural | Memory type. |
memories[].state | string | active, consolidating, archived, quarantined, pruned | Lifecycle state. |
memories[].compartment | string | — | Access compartment slug (default: default). |
memories[].salience | number | — | Current salience, 0–1. |
memories[].decay_weight | number | — | Decay weight, clamped 0.05–1.0. |
memories[].pinned | boolean | — | Pinned memories resist decay. |
memories[].valence | number | — | Emotional valence at capture, -1.0–1.0. |
memories[].arousal | number | — | Emotional arousal at capture, 0–1. |
memories[].recall_count | integer | — | Times recalled. |
memories[].occurred_at | string | — | When the memory is about (ISO-8601), or null. |
next_cursor | string | — | Opaque cursor for the next page; null means the last page. |
Example
curl "https://therobot.is/api/v1/memory/agents/project-aria/memories?state=archived&limit=50" \
-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.