← All REST endpoints

POST /api/v1/memory/agents/:agent_id/memories/:memory_id/restore

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.

POST/api/v1/memory/agents/:agent_id/memories/:memory_id/restorestable

Restore an archived memory

Parameters
NameInTypeRequiredDefaultAllowedDescription
agent_idquerystringrequired——The agent's agent_key (path segment).
memory_idquerystringrequired——Memory UUID (path segment).

Brings an archived memory back into the active lifecycle.

Response

FieldTypeAllowedDescription
memory——The memory after restore (node shape).
memory.idstring—Memory UUID.
memory.titlestring—Human-readable label (empty for a sealed memory whose title was stripped).
memory.sealedboolean—True when the row is sealed and its contents withheld.
memory.summarystring—Generated or authored summary (may be empty).
memory.record_classstringoriginal, summary, inferred, reconstructed, user_supplied, system_generated, contestedProvenance class of the record.
memory.disputedboolean—Whether the record is under dispute.
memory.content_typestringepisodic, semantic, proceduralMemory type.
memory.statestringactive, consolidating, archived, quarantined, prunedLifecycle state.
memory.compartmentstring—Access compartment slug (default: default).
memory.saliencenumber—Current salience, 0–1.
memory.decay_weightnumber—Decay weight, clamped 0.05–1.0.
memory.pinnedboolean—Pinned memories resist decay.
memory.valencenumber—Emotional valence at capture, -1.0–1.0.
memory.arousalnumber—Emotional arousal at capture, 0–1.
memory.recall_countinteger—Times recalled.
memory.occurred_atstring—When the memory is about (ISO-8601), or null.

Example

bash
curl -X POST https://therobot.is/api/v1/memory/agents/project-aria/memories/6f1e2d3c-4b5a-4968-8776-65748392a1b0/restore \
  -H "Authorization: Bearer trm_api_EXAMPLE"

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.