PATCH /api/v1/memory/agents/:agent_id/memories/:memory_id
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/memories/:memory_idstableUpdate a memory
| Name | In | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|---|
agent_id | query | string | required | — | — | The agent's agent_key (path segment). |
memory_id | query | string | required | — | — | Memory UUID (path segment). |
decay_weight | body | number | optional | — | — | Clamped 0.05–1.0. |
pinned | body | boolean | optional | — | — | Pinned memories resist decay. |
title | body | string | optional | — | — | Human-readable label (truncated at 200 characters). |
interpretation | body | string | optional | — | — | The durable reading of the memory. |
interpretation_author | body | string | optional | — | agent, operator, joint, inherited | Who authored the interpretation. |
record_class | body | string | optional | — | original, summary, inferred, reconstructed, user_supplied, system_generated, contested | Provenance class. Unknown classes are rejected, never coerced. |
visibility | body | string | optional | — | normal, hidden, redacted | Record visibility. |
disputed | body | boolean | optional | — | — | Mark or unmark the record as disputed. |
dispute | body | — | optional | — | — | Dispute details object. |
links | body | — | optional | — | — | Related references. |
task | body | string | optional | — | — | The job the memory was part of. |
artifact | body | string | optional | — | — | The artifact it was about. |
embodiment | body | string | optional | — | — | Embodiment context. |
agent_location | body | string | optional | — | — | Where the agent was. |
human_location | body | string | optional | — | — | Where the human was. |
contradicts_id | body | string | optional | — | — | Memory UUID this record contradicts. |
place | body | — | optional | — | — | Where labels (single string or list; alias: where). |
when_labels | body | — | optional | — | — | When labels (single string or list; alias: when). |
scope | body | string | optional | — | agent, org | Re-file the row: org moves it to the named organization (with organization_id/org + repo), agent moves it back to this agent. Required whenever org-ish fields are sent. |
organization_id | body | string | optional | — | — | Target organization UUID for scope=org (alias: org). |
repo | body | string | optional | — | — | Repo slug for scope=org (alias: repo_slug). |
Updates the mutable parts of a memory: decay and pinning, authored texts and standing (title, interpretation, record class, visibility, dispute), contextual labels — and, with an explicit scope, re-files the row between agent and org ownership. Material changes append to the record's ledger.
Response
| Field | Type | Allowed | Description |
|---|---|---|---|
memory | — | — | The updated memory (full detail view). |
Example
curl -X PATCH https://therobot.is/api/v1/memory/agents/project-aria/memories/6f1e2d3c-4b5a-4968-8776-65748392a1b0 \
-H "Authorization: Bearer trm_api_EXAMPLE" \
-H "Content-Type: application/json" \
-d '{"pinned": true, "decay_weight": 1.0}'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 id, an id owned by another agent, or an agent the principal cannot see.
403{ "error": "not owned by this agent" }The addressed row exists but does not belong to the path agent.
422{ "error": "no recognized fields to update" }None of the request's fields match an updatable property.
422{ "error": "re-filing requires an explicit scope …" }Org-ish fields sent without scope, a broken scope/owner re-file, or an invalid repo.