POST /api/v1/memory/agents/:agent_id/recall/preview
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.
/api/v1/memory/agents/:agent_id/recall/previewstablePreview a recall
| Name | In | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|---|
agent_id | query | string | required | — | — | The agent's agent_key (path segment). |
query | body | string | optional | — | — | Free-text query. At least one of query, mood or structured context is required. |
mood | body | — | optional | — | — | Target emotional state steering the emotional path — object with valence (-1.0–1.0), arousal and dominance (0–1). |
image | body | string | optional | — | — | Image reference for multimodal recall. |
limit | body | integer | optional | — | — | Maximum results. |
overrides | body | — | optional | — | — | Recall policy overrides, as accepted by the recall engine. |
with | body | — | optional | — | — | Collaborators, flat or nested under context. |
where | body | — | optional | — | — | Place labels, flat or nested under context. |
when | body | — | optional | — | — | Time labels, flat or nested under context. |
task | body | string | optional | — | — | The job the memory was part of; a known persona name (companion, analyst, planner, code reviewer) is also read as persona. |
persona | body | string | optional | — | — | Who is doing the remembering — re-weights digest paths without touching fusion. |
artifact | body | — | optional | — | — | Artifact the memory was about. |
embodiment | body | — | optional | — | — | Embodiment context. |
agent_location | body | — | optional | — | — | Where the agent was. |
human_location | body | — | optional | — | — | Where the human was. |
compartments | body | — | optional | — | — | Compartments to search, flat or nested under context. |
Side-effect-free ranked recall: semantic, emotional and relational paths are each scored, fused (reciprocal-rank fusion), and returned with per-source contributions and the curation policy's verdict per candidate. Never reinforces.
Response
| Field | Type | Allowed | Description |
|---|---|---|---|
results | — | — | Ranked candidates, including ones the digest rejected. |
results[].memory | — | — | The candidate memory (node shape). |
results[].score | number | — | Fused recall score. |
results[].contributions | — | — | Per-source RRF contributions: source, rank, score. |
results[].digest | — | — | The curation policy's verdict: verdict, score, reasons, dimensions, persona — or null. |
policy | — | — | The curation policy the verdicts came from: thresholds, dimension weights, personas. |
duration_ms | integer | — | Recall wall time. |
Example
curl -X POST https://therobot.is/api/v1/memory/agents/project-aria/recall/preview \
-H "Authorization: Bearer trm_api_EXAMPLE" \
-H "Content-Type: application/json" \
-d '{"query": "what happened on the dock with Hank"}'Errors
401{ "error": "Authentication required" }A well-formed but unknown or revoked trm_ bearer. The response does not say which.
400{ "error": "at least one of query, mood or structured context is required" }An empty recall request.
404{ "error": "not found" }Unknown or foreign agent key — at the agent level the two are deliberately the same answer, so no existence leaks.
422{ "error": "message" }Malformed scope/org parameters in the request.