Map

Memory Decay in AI Agents

Wiki conceptai-agentsmemorydesign-patterns โ†ณ show in map Markdown
title
Memory Decay in AI Agents
type
concept
summary
Memory half-life, retrieval strengthening, and consolidation for AI agents
tags
ai-agents, memory, design-patterns
created
2026-04-07
updated
2026-04-25

The idea that AI agent memories should weaken over time unless actively reinforced, modeled after the Ebbinghaus forgetting curve from cognitive psychology. Without decay, agent memory accumulates indefinitely, becoming noisy and expensive to search. With decay, the system naturally surfaces recent and frequently-used knowledge while letting stale information fade.

How it works

Each memory gets a half-life โ€” a duration after which its strength drops by half. A memory with a 7-day half-life that hasn't been accessed in 14 days is at 25% strength. After enough time without retrieval, it drops below a threshold and becomes eligible for removal.

Retrieval strengthening is the counterpart: every time a memory is recalled, its half-life extends. This creates a natural feedback loop โ€” useful memories get stronger through use, irrelevant ones fade. Some implementations (like hippo-memory) also support explicit feedback: marking a recall as helpful extends half-life further, marking it as unhelpful accelerates decay.

Error stickiness gives memories tagged as errors or bugs a longer initial half-life. The reasoning: mistakes are expensive to repeat, so the system should hold onto lessons learned from failures longer than general observations.

Why it matters for agent systems

The naive approach to agent memory is append-only: save everything, search when needed. This works early but degrades over time:

  • Search results fill with outdated information that ranks alongside current facts
  • Token budgets get consumed by irrelevant context
  • Contradictions accumulate as the codebase evolves but old memories persist

Decay addresses all three by making freshness and usage part of the relevance signal, not just keyword or semantic match.

Consolidation

Biological memory consolidates during sleep โ€” short-term episodes get compressed into long-term patterns. The same idea works for agents: periodically scan episodic memories, find clusters of 3+ related entries, and merge them into a single stable "semantic" memory. The individual episodes can then decay normally while the pattern persists.

hippo-memory implements this with hippo sleep โ€” a consolidation cycle that decays, merges, and prunes in a single transaction. Stash takes the same biological-consolidation idea further: a nine-stage background pipeline that walks raw episodes through facts, relationships, causal links, patterns, contradictions, goals, failure patterns, and hypothesis scans. Where Hippo stops at episodes-to-patterns, Stash extends the same metaphor into causal reasoning and self-correction.

Confidence tiers

Decay alone doesn't capture reliability. A memory can be recent but uncertain, or old but verified. Confidence tiers (verified, observed, inferred, stale) add a second dimension. An agent seeing "observed (2 weeks ago, 60% strength): deploy takes ~3 min" can judge both freshness and reliability before acting on it.

Relevance to this wiki

This wiki uses a different model โ€” no automatic decay, human-directed updates, and a lint cycle that flags stale content. But the underlying problem is the same: knowledge accumulates and some of it goes stale. Decay is one approach; periodic review is another. A hybrid might work: automatic decay for ephemeral context (project status, active bugs), manual curation for durable knowledge (concepts, architecture).

  • agent-memory-strategy-decision-tree โ€” a practical five-question tree for deciding which memory layer (working, semantic, episodic, procedural) each category of information belongs in.
  • ai-cannot-forget-forgive โ€” the sharp counterpart: machine memory has no native decay at all, and forgetting is adaptive compression the substrate lacks.