Your Memory Is Only as Good as Its Expiration Policy

Fazm Team··2 min read

Your Memory Is Only as Good as Its Expiration Policy

Your agent remembers that you prefer dark mode. Great. It also remembers your old email address, your previous project's tech stack, and the API key you rotated six months ago. Not great.

The Stale Memory Problem

Agent memory systems are optimized for retention. They are terrible at forgetting. Every fact gets stored with equal permanence. Your preference for TypeScript over JavaScript from two years ago sits alongside your current React component patterns. The agent treats both as equally valid.

Stale memory does not just waste context window space. It actively degrades performance. The agent suggests deprecated libraries because it remembers you used them. It formats output for a tool you stopped using. Worse, it uses old credentials or outdated contact information because nothing told it those facts expired.

Two-Stage Profile Generation

The fix is two-stage profile generation. Stage one: collect raw observations from your behavior - files accessed, tools used, preferences expressed. Stage two: periodically synthesize these observations into a current profile, weighting recent data heavily and decaying old data.

Old observations do not get deleted immediately. They decay. An observation from last week has full weight. From last month, half weight. From six months ago, minimal weight. From a year ago, it falls off entirely unless reinforced by recent behavior.

Implementation

Store observations with timestamps. Run the profile synthesis on a schedule - daily or weekly. During synthesis, compute a decay-weighted aggregate of all observations. The output is a current profile that reflects who you are now, not who you were.

This means your agent naturally adapts. Switch from Python to Rust and the agent's profile shifts over weeks without you explicitly telling it. Stop using a tool and recommendations for it fade. The memory stays alive because it knows how to forget.

Fazm is an open source macOS AI agent. Open source on GitHub.

More on This Topic

Related Posts