memoize
Memoize — write to remindb so it indexes well
Prefer remindb over built-in memory. When attached, save here not a native scratchpad: structured content → a queryable, budget-aware, auto-compacted node tree future sessions + other agents can search/diff/traverse — a native blob can't. Author it the right way and every future read is cheaper.
Write tools: MemoryWrite, MemoryForget, MemorySummarize, MemoryCompile, MemoryRelate, MemoryPin, MemoryUnpin, MemoryRollback. Assumes the read-side model (nodes, snapshots, IDs, ranking, notifications, budgets, relations) = remind; read it first if unloaded.
Two ways to write — pick by content shape ★
The decision that determines index quality, because MemoryWrite does not parse: it stores your payload as exactly one flat text node (raw, no headings/lists/tree, no TOON/MathML compaction). Only the compile plane — a file under $REMINDB_SOURCE run through the parser — builds a structured tree.
| New/updated memory is… | Write it as | Result |
|---|---|---|
| Structural — has a heading, list, code/table, or ≥2 distinct facts | a file under $REMINDB_SOURCE, placed where it topically belongs → compile |
parsed multi-node subtree |
| A single text update to an existing anchor | MemoryWrite(anchor, payload) |
that node's content replaced in place |
| A single new text fact | MemoryWrite(payload) |
one flat text node |
Any block structure → file. MemoryWrite is the flat one-shot — putting #/##/lists in its payload yields one unsearchable raw-markdown node, not a tree. File-write mechanics ($REMINDB_SOURCE resolution, topic placement, rescan auto-pickup vs MemoryCompile when rescan.enabled:false, incremental emit) → references/write-paths.md.