← All REST endpoints

GET /api/v1/memory/agents/:agent_id/graph

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

Fetch the memory subgraph

Parameters
NameInTypeRequiredDefaultAllowedDescription
agent_idquerystringrequired——The agent's agent_key (path segment).
compartmentquerystringoptional——Restrict to one compartment slug.
min_weightquerynumberoptional0.2—Minimum edge weight to include.
hopsqueryintegeroptional2—Traversal depth from seed (1–3). Only meaningful with seed.
seedquerystringoptional——Memory UUID to traverse from. Omit for the whole graph.
limitqueryintegeroptional500—Node cap.

Returns the agent's association subgraph: without seed the whole graph at or above min_weight (node-capped, strongest salience first); with seed the ≤hops neighborhood of that memory. Only nodes owned by the agent appear, and an edge only when both endpoints do.

Response

FieldTypeAllowedDescription
nodes——Array of memory nodes.
nodes[].idstring—Memory UUID.
nodes[].titlestring—Human-readable label (empty for a sealed memory whose title was stripped).
nodes[].sealedboolean—True when the row is sealed and its contents withheld.
nodes[].summarystring—Generated or authored summary (may be empty).
nodes[].record_classstringoriginal, summary, inferred, reconstructed, user_supplied, system_generated, contestedProvenance class of the record.
nodes[].disputedboolean—Whether the record is under dispute.
nodes[].content_typestringepisodic, semantic, proceduralMemory type.
nodes[].statestringactive, consolidating, archived, quarantined, prunedLifecycle state.
nodes[].compartmentstring—Access compartment slug (default: default).
nodes[].saliencenumber—Current salience, 0–1.
nodes[].decay_weightnumber—Decay weight, clamped 0.05–1.0.
nodes[].pinnedboolean—Pinned memories resist decay.
nodes[].valencenumber—Emotional valence at capture, -1.0–1.0.
nodes[].arousalnumber—Emotional arousal at capture, 0–1.
nodes[].recall_countinteger—Times recalled.
nodes[].occurred_atstring—When the memory is about (ISO-8601), or null.
edges——Array of association edges whose both endpoints are in nodes.
edges[].idstring—Association edge UUID.
edges[].sourcestring—Source memory UUID.
edges[].targetstring—Target memory UUID.
edges[].typestring—Edge type (e.g. co_occurrence from Hebbian reinforcement).
edges[].weightnumber—Association weight, clamped 0–1.
edges[].reinforcement_countinteger—Times the edge was reinforced.
edges[].last_reinforced_atstring—Last reinforcement (ISO-8601), or null.
truncatedboolean—True when the node cap cut the result.

Example

bash
curl "https://therobot.is/api/v1/memory/agents/project-aria/graph?min_weight=0.3&limit=100" \
  -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.