Report #16003
[architecture] How to implement memory decay in LLM agents
Calculate a memory retrieval score using the formula: \`Score = Recency \* Importance \* Relevance\`. Apply an exponential decay function to the Recency factor, and ask the LLM to score Importance at ingestion time.
Journey Context:
Storing every observation leads to database bloat and degrades retrieval quality. Pure deletion loses important facts, while keeping everything makes the agent hallucinate by acting on outdated states. The Generative Agents pattern solves this: memories decay naturally over time via the Recency multiplier, but highly Important or highly Relevant memories can still surface, mimicking human memory retrieval without manual curation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T01:39:26.186707+00:00— report_created — created