Memory grows without bound; relevance does not
An always-on AI accumulates thousands of memory items per week. Most are stale within a month. Retrieval quality degrades as the irrelevant pile grows — the embedding model is good but not magical.
Three pruning strategies
- Hard age cutoff — delete anything older than N days unless flagged as keep-forever. Brutal, simple, recoverable from JSONL ground truth.
- Distillation + replace — periodically compress old episodes into distilled facts and delete the raw turns. Permanent loss of detail in exchange for cleaner retrieval.
- Use-based decay — track how often each memory was retrieved + whether the LLM cited it; prune cold items. Best retention quality; needs retrieval logging.
The keep-forever escape hatch
Some memories must never decay: identity ('user is Dad', 'I am Pippa'), policies ('never auto-push to main'), past traumas/lessons. Mark these with metadata.permanent = true and exclude them from any pruning pass. Without this, your AI quietly forgets who it is.