← All REST endpoints

POST /api/v1/memory/agents/:agent_id/explain-paths

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.

POST/api/v1/memory/agents/:agent_id/explain-pathsstable

Explain association paths

Parameters
NameInTypeRequiredDefaultAllowedDescription
agent_idquerystringrequired——The agent's agent_key (path segment).
frombodystringrequired——Source memory UUID (alias: from_id).
tobody—required——Non-empty list of target memory UUIDs (alias: to_ids).

For each target memory, the best graph path from the source memory as a hop chain — the recalled-because surface. Every hop names its edge type, weight and node.

Response

FieldTypeAllowedDescription
fromstring—Echoed source memory UUID.
paths——Map of target memory UUID to its hop chain: edge_type, weight, node_id.

Example

bash
curl -X POST https://therobot.is/api/v1/memory/agents/project-aria/explain-paths \
  -H "Authorization: Bearer trm_api_EXAMPLE" \
  -H "Content-Type: application/json" \
  -d '{"from": "6f1e2d3c-4b5a-4968-8776-65748392a1b0", "to": ["9a8b7c6d-5e4f-4a3b-2c1d-0f9e8d7c6b5a"]}'

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 id, an id owned by another agent, or an agent the principal cannot see.

  • 400{ "error": "from is required" }

    No source memory in the request body.

  • 400{ "error": "to must be a non-empty list of memory ids" }

    Missing or empty target list.