What is soft forgetting in agent memory?

Short answer: Soft forgetting lowers a memory’s chance of entering context without deleting it, so reinforcement can bring it back.

Equal loudness forever creates stale noise; timer deletes destroy recoverability. Accessibility is the odds a memory enters the working set. Ranking, budgets, and transforms that supersede wording are soft paths. Reinforcement and cue-driven scopes can restore faded facts. Soft forgetting is the default before archival or hard delete.

Soft forgetting is how human memory stays usable. Old experiences fade from easy reach. They are not instantly erased. A cue or a repeated need can bring them back. Agent memory needs the same idea. If every stored fact stays equally loud forever, retrieval fills with stale noise. If every unused fact is deleted on a timer, you lose recoverability when the world shifts again.

Weaviate Engram is the durable store underneath that policy. It keeps memories searchable under user and property scopes. Pipelines rewrite and merge related facts over time. Hard delete exists when you truly mean gone. Soft forgetting lives mostly in how you rank, budget, and reinforce what Engram returns. Decay in accessibility. Not deletion by default.

What does decay in accessibility mean for an agent?

Accessibility is the chance a memory enters the working set on a given turn. A high-accessibility memory clears a small hybrid search budget and lands in the prompt. A low-accessibility memory can still exist in Engram. It simply loses the ranking fight against fresher or more reinforced facts. Research on decay-driven activation frames forgetting this way on purpose. Unused traces fade. Useful traces get strengthened when they help form a response.

That split matters operationally. Always-on retrieval of a flat store grows interference and latency as history lengthens. Soft forgetting lets the read path skip memory when the live window is enough. It also lets the write path reinforce only memories that earned their keep. Engram supplies the objects and the search API. Your control loop supplies the decay and activation policy.

So soft forgetting is not a missing Engram endpoint. It is a product decision about scores, limits, and when to call search at all.

How can Engram support soft forgetting without deleting rows?

Timestamps are the simplest signal. Each memory carries created_at and updated_at. After hybrid search returns candidates, your application can downrank hits that have not been touched in months. You still have the option to include an older hit when the query is explicit. The fact remains gettable by id. It just stops winning casual recalls.

Search limits are the second lever. A smaller HybridRetrieval(limit=...) is a soft forgetter. Only the top slice of the store becomes accessible on that turn. Topic filters tighten the candidate pool further. A travel preference topic should not compete with every procedural note from last year when the user asks about dinner.

Transforms add a third soft path. When a preference changes, Engram can rewrite an older memory and drop a redundant extract. The superseded wording loses accessibility because it no longer exists as a separate competing object. That is consolidation, not hard deletion of the user’s history of change if the rewrite keeps a short trail.

When should a faded memory become easy to reach again?

Reinforcement is the counterpart of decay. If a dormant fact helps answer the user, write a confirming turn back into Engram. The pipeline may update related memories. Your access log can bump a local utility score. Next time, that fact climbs the ranking again. Soft forgetting assumes reactivation is possible. Hard delete does not.

Cue-driven recall also helps. When the user names an old project or ticket id, pass that property scope and allow a slightly larger limit. Narrow scopes revive the right neighborhood without turning every chat into a full-history dump. Engram’s property filters make that revival precise.

Uncertainty-gated reads belong here too. If the model can answer from the last few messages, skip search. If confidence is low, search. Systems that cast forgetting as control use that pattern to avoid redundant always-on access. Soft forgetting includes choosing not to consult the store.

What does a soft-forgetting loop look like with Engram?

Imagine a creamery desk agent on cheese-cave-rind-bench-2. Seasonal brine notes should fade after the season ends. They should not vanish if a buyer asks about last winter’s rind treatment. The agent keeps everything in Engram. It only promotes what still deserves prompt space.

import os
from datetime import datetime, timezone, timedelta
from engram import EngramClient, HybridRetrieval

client = EngramClient(api_key=os.environ["ENGRAM_API_KEY"])
affineur = "maker-lina-vos"
cave_scope = {"cave_id": "rind-bench-2"}
SOFT_HORIZON = timedelta(days=120)

def accessibility_bonus(memory, now):
    # Soft forgetting: older untouched memories stay stored but rank lower.
    updated = datetime.fromisoformat(memory.updated_at.replace("Z", "+00:00"))
    age = now - updated
    if age <= SOFT_HORIZON:
        return 0.0
    # One gentle penalty step after the horizon; still recoverable via get/search.
    return -0.15

def recall_with_soft_forget(query: str, limit: int = 4):
    now = datetime.now(timezone.utc)
    hits = client.memories.search(
        query,
        user_id=affineur,
        group="personalization",
        properties=cave_scope,
        retrieval_config=HybridRetrieval(limit=12),  # fetch a wider pool
    )
    ranked = sorted(
        hits,
        key=lambda m: (m.score or 0.0) + accessibility_bonus(m, now),
        reverse=True,
    )
    return ranked[:limit]  # only the accessible head enters the prompt

# Seed a seasonal note, then later recalls will downrank it if never reinforced.
client.memories.add(
    "On cheese-cave-rind-bench-2 winter batch W-17 used ash dusting on day three. "
    "Do not repeat ash on spring bloomy rinds unless the buyer asks.",
    user_id=affineur,
    group="personalization",
    properties=cave_scope,
)

accessible = recall_with_soft_forget(
    "What rind treatment should I use for the new spring batch?"
)
for m in accessible:
    print(m.updated_at, m.score, m.content)

# Reinforcement path: if the buyer asks about W-17, write a fresh confirming turn
# so transform/update paths can raise that memory's accessibility again.

The wide search is internal. The narrow slice is what the model sees. That gap is soft forgetting.

How do you keep soft forgetting from becoming silent data loss?

Never pretend a downranked memory is deleted. Compliance and user trust need an honest story. Soft-forgotten means excluded from ordinary prompts. It does not mean unrecoverable. Offer operator tools that list by id, get by id, and search with an explicit archive mode that ignores age penalties.

Separate policy classes. Safety-critical constraints may be exempt from decay. Ephemeral seasonal tips may decay quickly. Engram topics help you encode that difference. Put durable constraints in a topic you always fetch. Put seasonal notes in a topic that participates in soft ranking.

Finally, know the border with the next maintenance move. When accessibility decay is not enough, you graduate to archival or hard deletion. Soft forgetting should be the default first response to clutter. It preserves option value while cleaning the agent's attention.

Our next chapter, What is hard deletion vs archival?, takes the step beyond accessibility decay and compares true removal with keeping memories offline but recoverable.