← All REST endpoints

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.

POST/api/v1/memory/agents/:agent_id/recall/previewstable

Preview a recall

Parameters
NameInTypeRequiredDefaultAllowedDescription
agent_idquerystringrequired——The agent's agent_key (path segment).
querybodystringoptional——Free-text query. At least one of query, mood or structured context is required.
moodbody—optional——Target emotional state steering the emotional path — object with valence (-1.0–1.0), arousal and dominance (0–1).
imagebodystringoptional——Image reference for multimodal recall.
limitbodyintegeroptional——Maximum results.
overridesbody—optional——Recall policy overrides, as accepted by the recall engine.
withbody—optional——Collaborators, flat or nested under context.
wherebody—optional——Place labels, flat or nested under context.
whenbody—optional——Time labels, flat or nested under context.
taskbodystringoptional——The job the memory was part of; a known persona name (companion, analyst, planner, code reviewer) is also read as persona.
personabodystringoptional——Who is doing the remembering — re-weights digest paths without touching fusion.
artifactbody—optional——Artifact the memory was about.
embodimentbody—optional——Embodiment context.
agent_locationbody—optional——Where the agent was.
human_locationbody—optional——Where the human was.
compartmentsbody—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

FieldTypeAllowedDescription
results——Ranked candidates, including ones the digest rejected.
results[].memory——The candidate memory (node shape).
results[].scorenumber—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_msinteger—Recall wall time.

Example

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