← All REST endpoints

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.

PATCH/api/v1/memory/agents/:agent_id/memories/:memory_idstable

Update a memory

Parameters
NameInTypeRequiredDefaultAllowedDescription
agent_idquerystringrequired——The agent's agent_key (path segment).
memory_idquerystringrequired——Memory UUID (path segment).
decay_weightbodynumberoptional——Clamped 0.05–1.0.
pinnedbodybooleanoptional——Pinned memories resist decay.
titlebodystringoptional——Human-readable label (truncated at 200 characters).
interpretationbodystringoptional——The durable reading of the memory.
interpretation_authorbodystringoptional—agent, operator, joint, inheritedWho authored the interpretation.
record_classbodystringoptional—original, summary, inferred, reconstructed, user_supplied, system_generated, contestedProvenance class. Unknown classes are rejected, never coerced.
visibilitybodystringoptional—normal, hidden, redactedRecord visibility.
disputedbodybooleanoptional——Mark or unmark the record as disputed.
disputebody—optional——Dispute details object.
linksbody—optional——Related references.
taskbodystringoptional——The job the memory was part of.
artifactbodystringoptional——The artifact it was about.
embodimentbodystringoptional——Embodiment context.
agent_locationbodystringoptional——Where the agent was.
human_locationbodystringoptional——Where the human was.
contradicts_idbodystringoptional——Memory UUID this record contradicts.
placebody—optional——Where labels (single string or list; alias: where).
when_labelsbody—optional——When labels (single string or list; alias: when).
scopebodystringoptional—agent, orgRe-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_idbodystringoptional——Target organization UUID for scope=org (alias: org).
repobodystringoptional——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

FieldTypeAllowedDescription
memory——The updated memory (full detail view).

Example

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