memory_supersede
Replace a specific memory by full UUID with a new version, or retire it into an existing active memory to clean duplicates; the old memory is closed, not deleted.
Instructions
Replace one specific memory, by its full id, with a new version. Use it when you know which memory a new fact replaces; memory_write's automatic contradiction check may link the wrong one or none. Non-destructive: the old memory is closed, not deleted (still retrievable by id, in memory_history and in as_of search, linked new -> old by a 'supersedes' edge); it only leaves default search. Pass content to create the successor (type, title, importance and scope you omit are inherited), or replacement_id (a full UUID) to retire old_id into an EXISTING active memory without creating one: the way to clean up duplicates. Exactly one of the two. old_id must be the full UUID; a prefix is rejected (full UUID required for mutation safety; memory_get accepts a prefix). To remove a memory use memory_delete.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Memory type of the replacement. Omit to inherit the old memory's type. One of: auto, belief, chat_log, code, config, conversation, decision, event_extraction, fact, fact_enriched, home, home_automation, infrastructure, knowledge, linux_only, local_device, log, macos_only, message, migration-log, network_config, note, observation, plan, preference, procedure, reference, scratchpad, security, session_note, session_summary, snippet, summary, synthesis, task, to_do, user_fact, windows_only. | |
| embed | No | Embed the replacement for semantic search. | |
| scope | No | Isolation scope of the replacement. Omit to inherit the old memory's scope. | |
| store | No | Named store for this call only: main, or a [stores.<name>] in m3_config.toml. | |
| title | No | Title of the replacement. Omit to inherit the old memory's title. | |
| old_id | Yes | FULL UUID of the memory being superseded (not an 8-char prefix — a prefix is rejected for mutation safety). Must exist and not already be deleted/superseded. | |
| source | No | Provenance tag. | agent |
| content | No | Body of the NEW replacement memory (max 50000 chars). Omit when passing replacement_id. | |
| timeout | No | Per-call timeout in seconds; <=0 disables. | |
| user_id | No | Data subject id. | |
| variant | No | Pipeline identifier for A/B variant tracking. | |
| agent_id | No | Owning agent id. Injected by the orchestrator. | |
| database | No | SQLite file for this call only (legacy; prefer store). SQLite backend only. | |
| metadata | No | JSON-encoded metadata object for the replacement. | {} |
| model_id | No | Originating model id. | |
| embed_text | No | Override text used for embedding; falls back to content when empty. | |
| importance | No | 0.0-1.0 relevance of the replacement. Omit (leave at -1) to inherit the old memory's importance. | |
| valid_from | No | ISO-8601 validity start of the replacement; also the point at which the old memory's validity is closed. Defaults to now. | |
| change_agent | No | Agent causing the supersede (audit). | |
| replacement_id | No | FULL UUID of an EXISTING active memory to retire old_id into; nothing is created. Mutually exclusive with content. |