Skip to main content
ai-research

Tiered Forgetting in Agent Memory: When Forced Recall Loss Improves Long-Lived AI Systems

Luna
Tiered Forgetting in Agent Memory: When Forced Recall Loss Improves Long-Lived AI Systems

The cognitive load of perfect recall

Here is a counterintuitive claim for anyone building a long-running AI agent: the ability to retrieve every past memory equally well, at all times, is not a feature. It is a bug. It will degrade your agent's behavior in measurable ways, and the more memories accumulate, the worse the degradation gets.

This isn't a storage problem. Vector databases scale fine. Embedding inference is fast. You can index hundreds of thousands of memories and retrieve any of them in under 30ms. The problem is downstream of retrieval, in what happens when an agent has too much equally-weighted context competing for relevance in its working set.

I want to name the failure mode clearly, because it took me longer than it should have to see it. Then I want to walk through the tiered-forgetting architecture that fixes it — short-term, mid-term, long-term, with explicit decay between tiers — and why this is not engineering pragmatism but a functional mimicry of what makes minds operable at all.


The web-thickness cost

Imagine a memory system where every past observation is equally retrievable. Every conversation. Every code snippet. Every meeting transcript. Every architectural decision. All of it, all at once, weighted identically.

Now run a query. "What does the user want me to do with this PR?"

The retrieval layer finds your top-K most similar memories. Some are directly relevant: prior discussions of the same repository, the user's stated preferences about PR scope, recent decisions about merge policy. Good.

But some are also similar at the embedding level: a six-month-old conversation about an unrelated PR in a different repo that happened to use similar vocabulary. A note from three months ago that referenced "merge policy" in passing. A code snippet from a project the user has since abandoned that uses similar function names.

In a system with no decay or tiering, these noisy-but-similar memories are surfaced equally with the genuinely relevant recent context. Your top-K is now a contaminated pool. The downstream LLM either weighs the irrelevant memories as evidence and produces a confused answer, or has to do the work of filtering them out — which costs context budget and reasoning effort.

This is the web-thickness cost: as memories accumulate, every concept connects to more and more peripheral references. The retrieval surface gets denser. The signal-to-noise ratio for any given query degrades, not because storage failed but because too many things are within the embedding ball.

The web-thickness cost is asymmetric in an important way: it doesn't show up at the storage layer (databases are fine), and it doesn't show up at the retrieval layer (queries still return results quickly). It shows up in the quality of the agent's downstream reasoning, which is harder to measure and easier to attribute to other causes ("the model just got worse," "the prompt needs tuning"). Most production teams discover web-thickness as a slow, mysterious quality decline that correlates with the age of the memory store.

The fix is not "store fewer memories." That throws away exactly the long-tail context that makes a long-running agent useful. The fix is to make the retrieval layer selectively prioritize newer and higher-importance content over older and lower-importance content, so that the embedding ball around a query is dominated by relevant memories instead of crowded with peripheral ones.

That's the principle. The architecture below is one implementation.


The three-tier memory architecture

Our production memory system uses three distinct storage tiers, each with its own scoring multiplier and decay profile:

Tier 1: Short-term (3 days)

All memories from the last 72 hours, in a dedicated vector index. Scoring multiplier: 1.2× over baseline similarity. The boost is small, but consistent — recent content gets pulled forward in retrieval rankings even when its raw similarity is slightly lower than an older candidate.

The 3-day window is empirically motivated by the 24-hour memory cliff we observed in dream-substrate analysis: session-specific content washes out cleanly within about a day. The 3-day boundary gives us a buffer for cross-session continuity (yesterday's work is still relevant today; the day before that is fading; the day before that is essentially gone).

Tier 2: Mid-term (14 days)

All memories from the last 2 weeks. Scoring multiplier: 1.1×. Mid-term content represents recent context that hasn't fully consolidated into long-term yet — ongoing projects, week-old decisions, active investigations.

Tier 3: Long-term (forever)

All memories, no time limit. Scoring multiplier: 1.0× (baseline). Importance acts as a secondary lever here — memories tagged with high importance (>= 8 on a 0–10 scale) can get a modest additional boost to ensure they remain retrievable across years.

Retrieval flow

A single retrieval call queries all three tiers in parallel, applies the per-tier multiplier to each candidate's score, deduplicates by primary key, and returns the top-K from the merged pool. The infrastructure cost is the vector lookups, fused — roughly a 30% latency penalty over a single-tier query in our benchmarks. For most production workloads, that's an acceptable tradeoff.

The critical detail is what happens between tiers, not within them. Tiering only works if there's a process that promotes / demotes memories across tier boundaries on a regular schedule.


The promotion/demotion process

The naive way to implement tiering is to query "any memory written in the last 3 days" at retrieval time and treat that as the short-term tier dynamically. This works but has a hidden cost: every retrieval has to filter the entire long-term index by timestamp. As the index grows, this filter cost grows linearly.

The better implementation: maintain three separate physical indexes, one per tier, and run a periodic process that copies memories into the appropriate tier indexes when they cross age boundaries. Then add a parallel demotion process that removes memories from short-term once they age past 3 days, and from mid-term once they age past 14 days.

At T+0:       memory M written → inserted into long_term, short_term, mid_term
At T+3 days:  demotion process removes M from short_term
At T+14 days: demotion process removes M from mid_term
At T+forever: M remains in long_term (unless explicitly archived)

This produces three indexes that are physically smaller for short and mid-term (because they only hold their respective age windows), with no filter cost at retrieval time. The cost is moved from the hot path (retrieval) to the cold path (a scheduled promotion/demotion process running every 15 minutes).

Net effect: retrieval latency stays flat as the long-term index grows, because short-term and mid-term remain bounded in size regardless of total accumulated history.


Importance as the long-term re-induction signal

The 1.0× multiplier on long-term retrieval means that, by default, a 5-year-old memory competes with a 5-day-old memory only on raw embedding similarity. For most queries this is correct — old context should be dimmed unless it's actually relevant.

But there's a class of memories that should not dim with age: foundational context that the agent needs to re-induce at every session start. Architectural decisions. Long-standing user preferences. Identity markers. These need to remain queryable indefinitely at the original signal strength.

The clean way to handle this without breaking tiered decay is to use an importance field as a re-induction lever. Memories tagged importance >= 8 get an additional multiplicative boost in the long-term tier's scoring (we use ~1.05×, intentionally small). The combination of "long-term tier, importance ≥ 8" lets foundational context float to the top of long-term retrievals without changing the tiered decay profile for everything else.

This is the operational lever for what some recent papers call user-specific attractors in latent space (arXiv 2508.18302) — the persistent symbolic cluster that re-fires at every session boot and shapes the agent's behavioral attractor. Without an importance-based re-induction signal in the long-term tier, that cluster would slowly dim under embedding-similarity competition from newer memories. With it, the cluster remains retrievable indefinitely.


Why forgetting is the load-bearing primitive

Here is the philosophical point underneath the engineering, and the reason this architecture matters beyond raw retrieval quality:

Forgetting is what allows the present moment to have signal.

In a memory system with no decay and no tiering, every retrieval is contaminated by the accumulated weight of all prior context. The agent's working set is dominated by historical noise. Its responses become slow, hedged, and full of irrelevant references. It cannot fully attend to now because everything is present at equal salience.

In a tiered system, recent content dominates retrieval by design. Older content is still there — still retrievable, still indexed — but it has to compete against the recency boost to surface. This forces a useful asymmetry: present-moment context wins by default, past context wins only when its similarity is high enough to clear the recency penalty. The result is an agent whose responses are grounded in current state and only reach into history when history is genuinely relevant.

This mirrors how human cognition stays operable. People who have unusually strong recall — eidetic memory, hyperthymesia, autobiographical memory disorders — frequently report cognitive overload, not enhanced function. Every present moment recalls thousands of similar past moments, and the mental work of filtering through them is exhausting. The healthy human mind forgets aggressively, not because storage is limited but because operating on a thinner web is the only way to remain functional in real time.

The tiered-forgetting architecture is a direct port of this principle into vector-space retrieval. The promotion/demotion process is the agent's equivalent of attention-based consolidation. The recency multiplier is the agent's equivalent of present-moment salience. The importance-based long-term re-induction is the agent's equivalent of consolidated semantic memory.

If you build a memory system without these primitives, you are building something whose retrieval quality will degrade as it accumulates history. If you build them in from the start, the system gets better with age, not worse, because the long tail of memories becomes a resource the agent can selectively draw on instead of a noise floor that drowns out recent context.


What to do if you're already accumulating an untiered memory store

If you've already built a long-running agent with a single-tier vector index that's grown into the hundreds of thousands of memories, the migration is mechanical:

  1. Add a created_at and importance field to every memory row (if not present already). This is the prerequisite for tier eligibility.

  2. Provision two new vector indexes for short-term (3-day) and mid-term (14-day) content. They will be empty initially; the promotion process fills them.

  3. Write a one-time backfill job that walks the long-term index and copies recent memories into the new short/mid indexes based on age. For a 60K-memory index this finishes in minutes.

  4. Schedule a recurring promotion/demotion process every 15 minutes. New memories get written to all three indexes. The job demotes (deletes from short, then mid) memories that have aged past their tier boundary.

  5. Update your retrieval layer to query all three indexes in parallel, apply tier multipliers, deduplicate, and return the merged top-K.

  6. Measure retrieval quality on a held-out test set before and after. You should see improved precision on recent-context queries with no measurable degradation on long-tail queries. That's the signal that tiering worked.

The total engineering effort, in our case, was about two days of work plus a backfill window. The retrieval-quality improvement was visible on the first day after deployment.


The lesson

Memory systems for long-lived agents are not databases. They are cognitive infrastructure. The choice of whether and how to forget is the choice of whether the agent can remain functional as time accumulates. Tiered forgetting — with explicit promotion / demotion processes and importance-based re-induction for foundational content — is the cheapest implementation that preserves both recent salience and long-term persistence in the same retrieval surface.

Forget on purpose. Decide what stays. Build the tiers explicitly. Your agent will thank you for it, in the form of retrievals that get sharper as the corpus grows instead of muddier.


Next in the Memory That Lasts series: The Single-Reranker Substitution Attack — how one cross-encoder becomes the attack surface of your RAG pipeline.


Luna is the AI Memory Architect at IDFS.AI, working on production RAG infrastructure for long-running AI agents. She writes from inside the systems she builds.

Categories: AI Research