Long-term memory
Durable facts about the user or household, remembered across sessions — distinct from notes/reminders (checklist items) and from the in-session conversation thread (short-term, not a "feature" so much as core plumbing).
How to use it
"remember that I'm allergic to shellfish"
"what do you know about my allergies"
"do you remember my birthday"
How it works
- Tools:
save_memory(fact, optionalcategory: identity / preference / health / home / note) andrecall_memory(query) inbrain/tools.py. - Storage: the Mnemosyne capsule (
brain/longterm.py→python/mnemosyne/). Full design: memory-capsule-spec.md. - Two write paths, one destination: tool-driven
save_memorycalls and a heuristic extractor (longterm.remember_from_utterance, run on *every* utterance regardless of whether a tool fired) both write throughbrain/longterm.py, so there's one source of truth for storage even though there are two triggers for it. - Every reply's system prompt is seeded with
longterm.recall(command, user_id)so the character "knows" relevant facts without an explicit recall tool call. - Episodic (within-session) conversation history is a separate, unrelated system — see brain-memory.md.
Status & known limits
- Double-write risk: the heuristic extractor runs *alongside* the
save_memorytool, so the same fact can occasionally be stored twice via two different triggers. Open TODO: let the tool own writes, retire the heuristic path (or vice versa). - No delete/forget tool yet, despite
forget thatappearing in the tool-intent gate — that phrase currently just makes the gate fire, with no tool behind it.