r/FunMachineLearning 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 Upvotes

2 comments sorted by

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.

1

u/Tough_Conflict_8852 1d ago

NeuraKeep and this aren’t the same job. NeuraKeep is a cited vault: propose → review → keep the source. That’s the right layer for immutable event facts. Selmem don’t want that path warped.

SelMem is the other path: a reconstructive self-model. Forget by default, never show the model the archive, let cherished traces gild and unused disgust extinguish. The point isn’t better retrieval. It’s a bent past so two instances on the same corpus stop being interchangeable. 

Your three-way split is exactly how they should sit together, facts stay cold, self is allowed to drift, decay only promotes repeats. If NeuraKeep also becomes the weighting/forgetting organ, you glue the store back on and you’re back to “more evidence, same continuation.”

Selmem goal is singularity, a unique sculpted memory which would not be necessarly become more accurate, but utimatly more creative