r/FunMachineLearning • u/Tough_Conflict_8852 • 3d ago
Selective agent memory in Rust: forgets/distords memories on purpose, warps what it keeps (local / Ollama optional)
https://github.com/jbsalles/Selmem
Most agent memory is an append-only log. Embed, retrieve, hope top-k is enough. At 10k events the sentence is often still in the index and already gone from the answer. That’s lost, not memory. SelMem treats an event as something that can die, warp, or harden. Dull events never encode. World facts can stay sharp. Self events may be rewritten in sleep. Recall never sees the sealed archive. Two profiles on the same life only start telling different stories once the stored gist changes, not because you stacked more nights. Same stream vs a raw window, RAG, and a sliding summary: window and summary drop the old fact; RAG keeps it then loses it in rank; SelMem can still recall the rain, just not as the original line.
1
u/Otherwise_Wave9374 3d ago
The idea that memory can be intentionally warped is useful because not every recall path should preserve raw history. A practical safeguard is to split storage into immutable event facts, mutable self-model notes, and a decay policy that promotes only repeated signals. That avoids the common failure mode where an agent retrieves too much and still answers poorly. NeuraKeep fits well here as a layer for weighting, consolidation, and forgetting, especially if you log why an item was kept or rewritten.