Sharing a memory system I’ve been researching to give Agent a human-like forgetting mechanism! What makes the ideal memory system for Agent? As Andrej Karpathy pointed out a few days ago, current Agent memory systems have a flaw: they tend to treat 2-month-old information as if they just learned it. On the flip side, there are way too many cases where they completely forget what was discussed in the previous session and just ask, “What were we working on?” This made me realize that memories that aren’t retrieved should gradually fade away, just like in the human brain. We shouldn’t let stale memories stick around to degrade the Agent’s response quality or waste precious context windows. Conversely, associated memories should get a “boost” score. It’s like if you previously remembered, “Chungju apples are delicious,” and then later visit Chungju city, your memory gets reinforced: “Oh right, Chungju apples were great!” So, I put a lot of effort into modeling this mathematically. I optimized it based on the LongMemEval benchmark, hitting an 81% accuracy rate, and it also showed solid performance on LoCoMo and other benchmarks. Importance-based decay: The lower the importance of the info, the faster it gets forgotten. Highly important information fades much more slowly. Fact vs. Episode: Hard facts are retained for a long time, while everyday chit-chat (episodic memory) disappears rapidly. The reason I went with a mathematical model is that I wanted to design a system where the decay of a single memory is totally predictable. I haven’t field-tested it extensively in the wild yet, so there might still be some hiccups. If you’re interested, contributions and GitHub stars are highly appreciated! :) (P.S. Memory sharing is possible between both Claude Code and Openclaw!) Memory Backend: https://github.com/memory-decay/memory-decay-core Adapter for Openclaw: https://github.com/memory-decay/openclaw-memory-decay Adapter for Claude Code: https://github.com/memory-decay/claude-code-memory-decay submitted by /u/HolidayRadio8477
Originally posted by u/HolidayRadio8477 on r/ClaudeCode
