POST /api/v1/memory/agents/:agent_id/memories
Auth: Memory API token (Authorization: Bearer trm_api_… or trm_mk_…) minted with writes_enabled=true, or the agent owner's/admin's JWT. A recall-only credential gets 403 writes are off for this credential.
/api/v1/memory/agents/:agent_id/memoriesstableCapture a memory
| Name | In | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|---|
agent_id | query | string | required | — | — | The agent's agent_key (path segment). |
content | body | string | required | — | — | The memory itself. |
title | body | string | optional | — | — | Human-readable label (truncated at 200 characters). |
summary | body | string | optional | — | — | Short summary text. |
context | body | string | optional | — | — | Where, when and who, as prose. |
reflection | body | string | optional | — | — | What the agent made of it at the time. |
tangent | body | string | optional | — | — | What it strayed to. |
interpretation | body | string | optional | — | — | The durable reading of the memory. |
content_type | body | string | optional | episodic | episodic, semantic, procedural | Memory type. |
compartment | body | string | optional | default | — | Access compartment slug. |
occurred_at | body | string | optional | — | — | When the memory is about (ISO-8601). |
mood | body | — | optional | — | — | Object with valence (-1.0–1.0), arousal, dominance (0–1). Missing components fall back to neutral. |
hormones | body | — | optional | — | — | Object with cortisol, dopamine, oxytocin, serotonin (0–1). Missing components fall back to baseline. |
with | body | — | optional | — | — | Collaborators (stored as collaborators). |
place | body | — | optional | — | — | Where labels (alias: where). |
when_labels | body | — | optional | — | — | When labels (alias: when). |
task | body | string | optional | — | — | The job the memory was part of. |
artifact | body | string | optional | — | — | The artifact it was about. |
scope | body | string | optional | agent | agent, org | scope=org files the memory under the caller's organization (membership-checked; open classification enforced). |
repo | body | string | optional | — | — | Repo slug for org-scoped memories (with scope=org). |
Captures a memory for the agent through the canonical write path (the same code the MCP remember tool runs). The owner is forced to the path agent; the Guardian may quarantine a write, which comes back 202 with memory: null, not a fake success.
Response
| Field | Type | Allowed | Description |
|---|---|---|---|
memory | — | — | The created memory (full detail view), or null when quarantined. |
status | string | — | ok, or quarantined when the Guardian holds the write. |
confidence | string | high, medium, low | Ingest confidence. |
Example
curl -X POST https://therobot.is/api/v1/memory/agents/project-aria/memories \
-H "Authorization: Bearer trm_api_EXAMPLE" \
-H "Content-Type: application/json" \
-d '{"content": "Hank moved the crate to the dry side of the dock before the rain", "title": "Hank docks crate", "mood": {"valence": 0.4, "arousal": 0.6}}'Errors
401{ "error": "Authentication required" }A well-formed but unknown or revoked trm_ bearer. The response does not say which.
403{ "error": "writes are off for this credential" }A credential without writes_enabled=true hit a write endpoint.
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{ "errors": { "field": ["message", …] } }Validation failure, as a per-field message map.