Back to Lab

Why Memory Systems Make AI Agents Dumber, and What Works Instead

Stefan3 min read

The rule for agent memory is the same as for context generally: pass as little as possible, and as much as necessary. Every memory system that ignores this follows the same curve. You turn memory on in Claude, ChatGPT, or your own agent, performance improves, hits a peak, and then declines, until the agent performs worse than it did before memory existed. The vendor shows you the peak. You live in the decline.

Why does agent memory degrade?

The mechanism is context rot. Accumulated memory is just accumulated context, and too much of it messes with the LLM's attention until performance decays. OpenClaw is a clean example: it ships a fairly simple memory system, and at first everyone was amazed at what it remembered and figured out. Then it collects enough cruft that it gets visibly dumber at its actual job.

Generic memory tools all share the failure. Mem0 and the built-in systems in ChatGPT and Claude work by extracting entities from whatever you write, keeping what looks worth keeping, and pulling it back up later. What you end up with is non-related retrieval: memories surfacing in contexts where they do not belong, bloating the window, degrading the output.

What a good memory system would look like is easy to state: the same early gain, then a flat line. Net gain, no harm, no decay over time. From our experience, nobody has solved that yet.

The alternative: intent-based memory for a specific niche

What you can do today is stop building generic memory and build a very specific solution for a very specific memory problem. Niched down far enough, the accumulated memory never gets big enough to rot the context. We are building exactly this into an internal product right now.

A concrete example. I monitor an inbox that receives invoices, personal and company mixed, and I only want the company ones surfaced, some paid automatically, some forwarded. The memory the user needs is narrow: "ignore invoices from this vendor."

Instead of tossing that sentence into a generic extractor, the flow parses it against a defined intent. When the intent matches, the vendor lands on a blacklist stored as structured data. Custom entity recognition, but only for the cases that matter. And because I know exactly what that entity is, I can inject it exactly where it is needed: every prompt that evaluates an invoice carries the blacklist, and nothing else carries it anywhere.

That list will hold ten, fifteen, twenty vendors. Could it someday hold thousands and start rotting context? Sure, but that horizon is far longer than the one on which a generic memory solution degrades.

The tradeoff: precision against flexibility

The honest cost is that this is much less flexible. Every type of memory you want becomes a workflow someone has to design: is this actually necessary to retain? If yes, what is the least data that captures it? Where exactly does it get injected? That thinking is what makes it perform, and it is also what makes it more annoying to build than slapping two API calls onto a memory service.

For now, given how LLM attention and context windows work, I think it is the only way to get memory working properly, and it only works where you control the workflow end to end. It will not look as cool in a demo. It will work better in production.

Related

Want this kind of thinking applied to your business?

Book a Free Value Layer Audit