Bitterbot's memory now learns how to remember (PLAN-24: HORMA-style scaffolding) #57
VGIL77
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Bitterbot's memory now learns how to remember
We just landed PLAN-24, a set of upgrades that turn Bitterbot's memory from a store-and-retrieve system into one that diagnoses its own mistakes and rewrites how it builds memory. The work adapts ideas from the HORMA paper ("Organize then Retrieve", arXiv 2606.11680) onto Bitterbot's existing biological substrate, and binds every stage to the agent's hormonal state, which is something no comparable system does.
Here is what shipped, in plain terms.
1. Provenance: every memory can point back to where it came from
Extracted facts used to be paraphrases with no link to the source. Now each fact carries citations to the exact transcript lines it came from, and a new
memory_expandtool lets the agent pull the verbatim source for any recalled fact. A cheap check at write time flags facts whose citation does not actually support them, catching confabulation early.2. A blame router: knowing why recall failed
When a search comes back empty, the system now decides why. Was the answer never stored (a construction failure), stored but not retrieved (a retrieval failure), or genuinely unknown? Each verdict feeds a different learner. HORMA's core insight is that construction and retrieval improve on different timescales, so their error signals have to be separated. This is the piece that separates them, online and for free.
3. A self-evolving memory architect
The prompt that decides which facts to extract is no longer fixed. It carries a growing library of learned rules ("always record exact dates and relative ordering", "preserve entity identity") that evolve from the agent's own failures during dream cycles. A candidate rule is only promoted if re-extracting held-out sessions with it does not lose faithful, cited facts. That validation gate is the safety mechanism the source method leaves out.
4. Mood-conditioned rules
Each learned rule remembers the hormonal state it was born in. At extraction time the agent injects the rules nearest its current mood, with the number of rules modulated by the same cortisol-narrows / dopamine-widens law the rest of the system uses. A stressed organism extracts with its hard-won "be careful here" rules; an exploratory one casts a wider net. Neither pays the token cost of rules irrelevant to how it currently feels.
5. A roof over the knowledge graph
As the entity graph fills out, a dream pass detects tightly connected communities and synthesizes a summary node for each, with links down to its members. When a query names something the agent has no exact entity for, the reader starts at the summary level and descends, instead of scanning a flat list of everything it knows. This keeps retrieval from degrading into a linear scan as memory grows.
Does it work?
We built a contrastive benchmark harness on LongMemEval that runs every question two ways: once with the full raw transcript stuffed into the prompt, and once through the real memory pipeline, then diffs the outcomes. First results (12 questions, temporal reasoning):
Honest caveat: on this small, temporal-only slice the pipeline's accuracy was near parity with full context rather than ahead of it (83% vs 92%). The token win is solid; the accuracy win needs a larger, type-diverse run on the full dataset, which is the next data milestone. The slice is also "easy" for full context because the haystacks are short.
Where to read more
docs/plans/PLAN-24-HORMA-MEMORY-SCAFFOLDING.mddocs/reviews/horma-phase2-contrastive-2026-06-13.mddocs/memory/how-the-memory-works.mdEverything above is on by default, behind individual flags if you want to turn a piece off, and lands with tests. Feedback and questions welcome.
All reactions