edit_memory
Correct a memory's content, source_ref, title, or tags while preserving the previous version in edit history. Use append mode to add a fact without rewriting the body.
Instructions
Correct a memory's content or its source reference, keeping the previous version.
Corrections are common in append-only memory stores that only support delete, not edit; this preserves the old content instead of losing it. Each field is settable on its own; passing none of new_content, source_ref, title, tags and goal is an error rather than a silent no-op.
Refuses to rewrite a diagram's content: that is generated from the
graph, so a hand-written replacement would be silently overwritten by
the next structural change -- edit the flow through
diagram_node/diagram_edge. Its source_ref is ordinary metadata and is
editable here like any other memory's. A task's content is generated
from its goal and items the same way: rewrite its goal with goal,
and its items through task_item().
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | the memory. | |
| goal | No | a task's new goal, held to the rules task() states; the previous goal stays in the edit history. Refused on any other type. | |
| mode | No | 'replace' or 'append'. 'append' adds `new_content` as a new line at the end instead of replacing the body. Use it when a memory gains a fact rather than turning out to be wrong: the alternative is reading the whole thing, restating it and sending it back, which pays for the body twice and stakes the existing text on it being copied faithfully. Append what THIS memory gained. A fact about a further subject is a new memory plus an edge, not a line at the bottom -- appended text is ranked as part of the body it lands in and comes back with it. | replace |
| note | No | why it changed, kept with the previous version in the edit history. | |
| tags | No | REPLACES the tag set, comma-separated: pass the whole set that should survive, not the one being added. Indexed, so this is how an untagged memory becomes findable by the words its body never uses. Empty leaves the stored tags alone -- clearing them, like clearing a source_ref, is a dashboard edit. | |
| title | No | renames the memory: the one line a list shows it by, and the field weighing most in search, at most 120 characters. A diagram is renamed through its graph instead -- its title is part of what generates the body, so a rename here would be overwritten by the next structural change. | |
| source_ref | No | points the memory at what its claim came from -- the field note() takes at write time, and the one a later pass checks the claim against. Settable with no `new_content`, for the common case of a body that is right and a reference that is missing or has moved; empty leaves the stored one alone, and clearing one is a dashboard edit. | |
| new_content | No | the corrected body, or with mode='append' the line to add. |