
Long-running agents accumulate state across weeks or months, and a memory store that only ever grows becomes a liability rather than an asset. Redundant entries crowd out useful evidence at retrieval time, stale facts leak into new sessions, and unmanaged growth eventually breaks both storage budgets and privacy obligations. Forgetting, in this framing, is not a storage optimization but an architectural decision about what the agent is allowed to keep. This article examines five concrete mechanisms for deciding what to discard: Ebbinghaus-inspired retention decay, Elastic Weight Consolidation for parameter-level continual learning, SimpleMem's three-stage compression pipeline, the importance scoring engine of agent-memory-compressor, and the Byzantine fault-tolerant Co-Forgetting Protocol for multi-agent settings. The intended audience is engineers designing agent memory backends who must choose where deletion happens — in weights, in stores, at retrieval, or by consensus — and what each choice costs.

Long‑running agents that never prune their memory suffer three concrete drawbacks that quickly make an “append‑only” store untenable.
Unbounded storage and wasted resources. MemRefine defines storage‑budgeted memory management as a separate engineering task because, without active pruning, a store “grows without bound and fills with redundant entries” — inflating disk usage and driving up operational costs 【1†L2-L7】.
Retrieval interference. Mem0’s eviction guide points out that “every additional fact is another candidate in a top‑k search, so recall quality declines even with unlimited storage.” The interference created by noisy, stale entries pushes the most relevant evidence down the rank list, causing the agent to return incorrect or irrelevant context 【2†L9-L13】.
Regulatory risk. GDPR and CCPA give users a legal right to erasure. If memory entries are not individually taggable and deletable, the system cannot satisfy “right‑to‑be‑forgotten” requests, and derived artifacts (embeddings, summaries, indexes) must also be purged 【4†L1-L8】. Failure to implement a deletion pipeline therefore violates privacy law 【5†L1-L6】.
The industry consensus is that forgetting is not a peripheral housekeeping concern—it is a primary architectural decision. Redis’ long‑term‑memory blog calls forgetting “one of the least solved parts of memory systems” and warns that “teams need explicit retention policies and consolidation rules instead of assuming the memory layer will manage itself” 【3†L1-L6】.
| Strategy | How it decides what to drop | Typical cost |
|---|---|---|
| Passive aging (TTL, LRU) | Relies on time‑based or usage‑based expiration without inspecting the content of each item. | Cheap to implement, predictable, but blind to semantic relevance. |
| Active forgetting (salience scoring, supersession, compression pipelines) | Evaluates each memory with a model‑driven or rule‑based importance metric and explicitly deletes, merges, or compresses the entry. | Higher compute overhead, but catches cases where passive aging would discard valuable facts or retain harmful noise. |
Because passive mechanisms only bound storage, they cannot guarantee that “the right answer can rise to the top.” Active forgetting, by contrast, makes per‑item decisions that directly protect recall quality, compliance, and budget constraints. Treating the deletion policy as a first‑class surface therefore becomes essential for any production‑grade agent memory backend.

The classic forgetting curve discovered by Hermann Ebbinghaus in 1885 shows a steep initial drop in retention that flattens with each successful review. Modern agents translate this pattern into a retention score that determines whether a memory should be evicted.
Formula: retention = e^(‑t / stability)
Key attributes
| Parameter | Description |
|---|---|
| t | Integer turn distance since the last recall (deterministic counter, not wall‑clock time) |
| stability | Starts at 8; each recall multiplies it non‑linearly. After four recalls spread over 45 turns, stability ≈ 292 |
| eviction threshold | Default 0.20; an item is removed when retention < threshold |
With the above values, a heavily‑recalled fact retains a score of 0.684 at turn 150, comfortably above the 0.20 cut‑off【5†source】. The engine shares a minimal interface (register, recall, step, is_present, working_set_size) with a simple recency baseline, ensuring that the eviction policy alone drives differences【2†source】. The design deliberately avoids time.time() because the first draft exhibited nondeterministic pruning【2†source】.
Formula: R = importance × e^(‑decay_rate × t)
Decay rate: decay_rate = 0.16 × (1 ‑ importance × 0.8)
Behavior
last_accessed; every retrieval resets t.decay_rate ≈ 0.032, so they can survive months without another hit.The constants 0.16, 0.20 (the eviction threshold used in A), and the baseline stability are hyper‑parameters, not universal laws; different deployments may tune them for their latency or privacy budgets【1†source】.
Both engines behave like a pure recency window when a fact is never recalled: the retention score collapses to the same value as a plain age > window test, so reinforcement only benefits accessed items【1†source】.
A naïve recency‑only policy cannot differentiate a critical instruction stored on turn 1 from a trivial log created at the same time. Whichever entry becomes older is evicted, regardless of semantic importance. This leads to use‑blind loss of valuable knowledge, a problem the decay formulas explicitly address.
Robert Bjork distinguishes storage strength (latent durability) from retrieval strength (ease of access). In practice, agents can apply this by re‑ranking results at query time rather than deleting records:
Mem0 implements this exact soft‑ranking layer, leaving facts in the store while lowering their visibility if they are not reinforced【3†source】. The approach mirrors Bjork’s theory: the memory stays stored (high storage strength) but its retrieval strength declines, reducing its impact without risking data loss. In contrast, the exponential‑retention engines perform hard eviction once the retention score falls below the threshold, permanently reclaiming space.
| Goal | Preferred mechanism |
|---|---|
| Strict storage budget or privacy limits → Hard eviction (Ebbinghaus decay) | |
| Need to preserve audit trails while keeping the active list relevant → Search‑time re‑ranking (Bjork‑style decay) | |
| Mixed multi‑agent environments where consensus on deletion matters → combine both (e.g., decay for ranking, eviction after consensus) |
By understanding the mathematics and the trade‑offs, engineers can deliberately place the forgetting decision at the level that aligns with system constraints and the value of the memorised content.

When a long‑running agent is fine‑tuned on successive tasks, the weights of its neural model can drift, causing catastrophic forgetting—the abrupt loss of knowledge acquired on earlier tasks. This phenomenon differs from the context‑level forgetting discussed elsewhere in this article because it occurs directly in the model parameters, not in an external memory store.
Elastic Weight Consolidation (EWC) was introduced in DeepMind’s 2017 PNAS paper and remains a canonical regularisation approach to continual learning. After completing a task, EWC computes a Fisher Information Matrix (FIM) on that task’s data, which estimates the importance of each parameter for the learned behaviour. During subsequent training it adds a quadratic penalty to the loss:
[ L_{\text{total}} = L_{\text{new}} + \frac{\lambda}{2}\sum_i F_i (\theta_i - \theta_i^{*})^2 ]
where (F_i) is the diagonal of the FIM, (\theta_i^{*}) the parameter value after the previous task, and (\lambda) a regularisation strength. Parameters with high (F_i) are “elastic”: they resist change, while those with low importance are free to adapt to the new task. Crucially, no raw data from earlier tasks needs to be stored, unlike replay‑based methods.
A 2025 NeurIPS workshop evaluation reported that EWC reduced catastrophic forgetting on a knowledge‑graph link‑prediction benchmark from 12.62 % (naïve sequential fine‑tuning) to 6.85 %, a 45.7 % relative improvement【{"cursor": 0, "id": 0}】. The authors caution that this result reflects a single experimental setting and should not be taken as a universal guarantee.
EWC sits on the classic plasticity‑stability spectrum:
| Aspect | Strong regularisation (high λ) | Weak regularisation (low λ) |
|---|---|---|
| Forgetting | Minimal – old knowledge preserved | Higher – more drift |
| New learning | Slower – parameter updates constrained | Faster – weights adapt freely |
| Compute / storage | Low – only the FIM needs to be saved | Low – same overhead |
Replay methods (e.g., experience replay) can preserve old knowledge more completely but incur storage and privacy costs, while EWC offers a middle ground by sacrificing some adaptability for data‑free protection.
These successors illustrate two trends: (1) geometric constraints that pre‑empt interference (O‑LoRA) and (2) activation‑centric regularisation or external memory that reduces reliance on weight‑level penalties (Function‑Vector, Titans).
EWC is attractive for agents that regularly fine‑tune on new data but cannot retain the raw data for privacy or compliance reasons. Its modest memory footprint (the diagonal FIM) and compatibility with standard optimiser pipelines make it straightforward to integrate into existing training stacks. Conversely, agents that operate with static weights—for example, inference‑only services or systems that delegate all adaptation to external vector stores—do not benefit from parameter‑level forgetting and can skip EWC entirely.

SimpleMem tackles the classic trade‑off between passively storing raw interaction logs (which quickly becomes token‑hungry and redundant) and deferring all reasoning to query time (which forces expensive re‑ranking loops). Its core contribution is to shift redundancy elimination from the retrieval phase to the write phase, ensuring that the memory store never grows unchecked.
| Stage | Purpose | Key actions |
|---|---|---|
| 1. Semantic Structured Compression | Convert unstructured dialog into compact, self‑contained facts. | Coreference resolution, absolute timestamping, and multi‑view indexing (e.g., semantic, temporal, and topical) enable flexible look‑up without re‑parsing the original text. |
| 2. Online Semantic Synthesis | Merge related pieces as they arrive rather than waiting for a later query. | Within a session, SimpleMem identifies overlapping concepts and abstracts them into a single representation, discarding duplicated wording while preserving the underlying meaning. |
| 3. Intent‑Aware Retrieval Planning | Infer the user’s intent at query time and select only the most relevant compressed units. | The planner predicts the type of information needed (e.g., factual recall, chronological reasoning) and constructs a minimal context that satisfies the intent, further limiting token usage. |
Because the pipeline operates during ingestion, the memory backend stores only the distilled units. This is fundamentally different from approaches that keep the full history and later apply re‑ranking or dampening; those methods still pay the cost of loading the entire transcript before any compression can occur.
On the LoCoMo benchmark, SimpleMem reported an average +26.4 % F1 gain over prior systems while reducing inference‑time token consumption by roughly 30×【{"cursor": 0, "id": 0}】. The authors note that these figures come from a single benchmark run and should be re‑validated against the target workload before being used as a hard architectural decision.
In SimpleMem, forgetting is not a background garbage‑collector; it is an explicit, per‑interaction decision made by the compression pipeline. Every incoming turn is examined, and details judged as “noise” are omitted from the stored unit. The resulting F1 improvement directly measures how well the system decides what to keep versus what to discard. By embedding forgetting into the write path, SimpleMem keeps the memory footprint low, accelerates downstream retrieval, and aligns with the article’s broader thesis: architectural forgetting is a proactive, performance‑critical strategy for long‑running agents.

What to compress – the library isolates the importance decision in scoring.ImportanceScorer. The scorer fuses three orthogonal signals:
| Signal | Mechanism | Effect on score |
|---|---|---|
| Recency | Exponential decay – newer entries receive a higher weight. | Guarantees that fresh context remains visible. |
| Type weight | Pre‑assigned priorities – decisions and system notes outrank routine turns and tool‑noise entries. | Keeps strategic reasoning intact while allowing chatter to be forgotten. |
| Keyword boost | Goal‑related keyword match (e.g., “budget”, “deadline”, “compliance”). | Promotes entries that are semantically aligned with the agent’s current objective. |
The orchestrator calls get_compression_priority to sort the memory store by the resulting importance score, so the least‑valuable history is compressed first and high‑importance records stay protected.
When to compress – timing is handled by triggers.ForgettingCurve. Two independent thresholds can fire a compression cycle:
compression_interval_turns turns (default 10).compression_threshold_tokens (default 6000), with hysteresis to avoid rapid thrashing.should_compress(store) returns True when either condition is satisfied, and mark_compressed(store) resets the counters after a successful pass. The defaults are version‑specific configuration values and should be tuned to the deployment’s latency and budget constraints rather than taken as universal constants.
Scoring rubric – the library documents a four‑band rubric that guides how aggressively an entry is treated:
All compression is lossy by design; a mis‑scored routine observation can fill the context window, while a low‑scored critical decision could be lost. The guiding principle is “specific data is precious; connective tissue is cheap.”
Contrast with FSFM – the Selective Forgetting Framework for LLM agents (FSFM, arXiv 2604.20300) augments a single importance score with a multi‑dimensional matrix: content quality (0‑3), business value (0‑3), temporal relevance (0‑2), plus negative security penalties (‑10 for dangerous data, ‑2 for sensitive data). FSFM therefore allows explicit penalisation of privacy‑critical records, whereas agent-memory-compressor relies on keyword boosting and type weighting alone.
Best‑practice recommendation – the official docs advise validating the scorer against real task traces and conducting a human review of compression outputs during the initial rollout. This early feedback loop helps catch systematic mis‑scoring before the system reaches production scale.
Sources: agent-memory-compressor repository (scoring and triggers modules) [GitHub]; importance‑scoring guidelines [Engineers of AI]; FSFM paper [arXiv 2604.20300].

When several agents share a common memory store, forgetting can no longer be a purely local decision. An entry that is irrelevant for one agent may still be essential context for another, and a malicious or buggy agent must not be able to erase shared knowledge unilaterally. The Co‑Forgetting Protocol formalizes forgetting as a consensus operation that runs on top of a Byzantine‑fault‑tolerant (BFT) substrate.
distilbert-base-uncased) model to score a memory item against its current task context. The score feeds a binary keep / forget vote.An epoch is triggered every 100 agent interactions. During an epoch the manager:
If the PBFT round succeeds, the memory is physically removed; otherwise it is retained for the next epoch.
Agents carry static role‑based weights (e.g., planning agents (w=1.5), perceptual agents (w=1.0)) and a dynamic reliability confidence (c_i \in [0,1]). The effective vote weight is (w_i \times c_i). The quorum threshold adapts to the current set of participants, ensuring that a minority of high‑confidence agents cannot dominate the decision.
| Component | Purpose | Implementation details |
|---|---|---|
| SQLite | Stores UUIDs of memories for epoch‑level synchronization and collision avoidance. | Simple file‑based DB; transactionally safe. |
| Pinecone | Holds vector embeddings for fast similarity search. | Managed vector DB with automatic indexing. |
| LRU cache + batched upserts | Reduces Pinecone API traffic (≈ 50 updates or 10 s batch). | In‑process cache; background flush thread. |
MemoryManager | Executes decay computation, gathers votes. | Stateless per‑epoch, re‑entrant. |
PBFTCoordinator | Runs the three‑phase PBFT commit over gRPC. | Uses protobuf messages; retries on transient failures. |
The paper evaluated robustness with four agents, injecting Byzantine behavior into one randomly chosen node ((f = 1)). The faulty agent either dropped PBFT messages for 50 % of rounds or voted opposite to its local relevance judgment for the remaining 50 %. Under these conditions the protocol achieved a 92 % success rate (i.e., the correct consensus on deletion was reached) source. The authors note that the exact metric definition should be verified against the original source.
Traditional crash‑tolerant consensus such as Raft assumes only silent failures. In adversarial multi‑agent environments, nodes may behave arbitrarily—sending malformed messages, equivocating, or actively trying to prune critical memories. PBFT’s ability to tolerate Byzantine faults (arbitrary misbehavior) makes it a safer foundation for coordinated forgetting, ensuring that even a malicious agent cannot corrupt the shared knowledge base without being outvoted by the required (2f!+!1) honest majority.

| Layer | Mechanism | What it protects | When to use it | Rough cost |
|---|---|---|---|---|
| Weight layer | Elastic Weight Consolidation (EWC) – a Fisher‑matrix regularizer that penalizes changes to parameters important for prior tasks【{"source":"https://zylos.ai/research/2026-04-09-continual-learning-catastrophic-forgetting-ai-agents/"}】 | Knowledge baked into model weights during sequential fine‑tuning | Deployments that continue to fine‑tune on new data streams and cannot afford loss of previously learned capabilities | Adds a small quadratic term to the loss; negligible runtime overhead but requires a Fisher computation after each task |
| Write‑time store layer | SimpleMem stages 1–2 – semantic structured compression followed by online synthesis, merging related facts before they are persisted【{"source":"https://github.com/aiming-lab/SimpleMem"}】 | Redundant raw episodes and raw tool outputs | Systems that can afford a modest preprocessing step after each interaction and prefer to keep the hot store compact from day 1 | One extra LLM call per turn; reduces later retrieval token budget dramatically |
| Heuristic eviction layer | agent‑memory‑compressor (ImportanceScorer) – combines recency decay, type weighting, and goal‑keyword boosts to rank entries for compression or deletion【{"source":"https://github.com/dakshjain-1616/Agent-Memory-Compressor"}】 | Low‑value turns, routine tool chatter | Pipelines that already have a token or turn budget trigger and need the cheapest way to prune | O(N) scoring pass; cheap compared with re‑embedding or re‑summarisation |
| Retrieval‑time dampening layer | Mem0‑style decay & Björk retrieval‑strength re‑ranking – scores are multiplied by a decay factor when a memory has not been accessed; the fact stays in the store but sinks in ranking【{"source":"https://mem0.ai/blog/memory-eviction-and-forgetting-in-ai-agents"}】 | Stale facts that must remain for compliance but can be hidden from the model | Environments where hard deletion is disallowed (e.g., legal retention) or where a “soft” forgetting policy is preferred | No storage change; only a constant‑time re‑ranking at query time |
| Coordination layer | Co‑Forgetting Protocol (PBFT‑backed semantic voting) – agents vote on a memory’s relevance; a Practical Byzantine Fault‑Tolerance (PBFT) consensus guarantees that at most f malicious agents can sway the decision in a network of N ≥ 3f + 1【{"source":"https://www.opastpublishers.com/open-access-articles/pbftbacked-semantic-voting-for-multiagent-memory-pruning-9452.html"}】 | Global knowledge shared across several agents | Multi‑agent deployments where inconsistent deletions could corrupt a shared world model | Network round‑trip latency (3‑phase commit) and modest CPU for DistilBERT voting; scales with number of participants |
These mechanisms are composable. A robust pipeline might:
Each layer answers a distinct question: what the model knows (weight), what the store contains (write‑time), what the context surfaces (retrieval), and what the group agrees to drop (coordination). By aligning the concrete mechanisms to these questions, engineers can select the cheapest failure point that matches their product’s risk profile.

Over‑eager forgetting – A TTL that expires before the user’s natural recall interval, or an LRU window that does not match the interaction cadence, leads to missing facts that the user still expects the agent to remember. This is the most common source of “I told you yesterday” failures【1†L1-L5】.
Rare‑but‑critical pruning – LRU treats access frequency as a proxy for importance. When a low‑frequency fact carries high stakes (e.g., a penicillin allergy not accessed for six months), the entry is silently dropped, causing dangerous omissions【4†L7-L12】.
Stale facts surviving – Pure semantic‑supersession waits for a contradicting fact to invalidate an older entry. If the user never explicitly corrects the information, the outdated fact remains in the store and can pollute new sessions【1†L9-L13】.
Stacked contradictions – Without active supersession on every write, multiple conflicting statements accumulate, forcing the retrieval layer to resolve ambiguity at runtime and degrading answer quality.
Rater drift – The salience scorer (model, prompt, or evaluator) evolves over time. Thresholds calibrated in one quarter may become too permissive or too strict in the next, causing sudden spikes in pruning or retention【9†L7-L13】.
The Mem0 guide recommends a layered approach that balances compliance, noise reduction, and logical consistency:
Together they embody the principle: passive aging handles noise, while active forgetting handles factual change【6†L1-L7】.
Boundary reminder: Decay mechanisms only preserve items that the agent actually recalls; untapped facts that never surface will still fade unless an explicit importance score protects them. Teams should set realistic expectations that forgetting curves are not a substitute for proper salience‑based retention.