---
title: "Supersession, decay, and forget"
description: "Three mechanisms for how beliefs change, fade, and are removed."
canonical_url: "https://surrealdb.com/docs/agent-memory/learn/mental-model/memory-lifecycle"
section: "Agent Memory"
surrealdb_version: "4.x"
last_modified: "2026-11-18T02:09:16Z"
---

> Full SurrealDB documentation index: https://surrealdb.com/docs/llms.txt

# Supersession, decay, and forget

Three mechanisms for how beliefs change, fade, and are removed.

Most memory products fold three different questions into a single "delete" or "rank lower" behaviour. A correction can disappear, a stale preference can still win at retrieval, or an erasure request can leave records in a backup table nobody queries.

SurrealDB Agent Memory keeps the three mechanisms separate:

| Question | Mechanism | Example |
| --- | --- | --- |
| **“This replaced that.”** | **Supersession** | You preferred formal tone in March; you prefer casual now. The old instruction stays in history with a bounded validity interval; the new one is current. |
| **“This stopped being relevant.”** | **Decay** | A sprint goal from three weeks ago carries less weight than one set this week. |
| **“This should not exist for the agent.”** | **Forget** (soft by default) | “Forget everything about my old job.” Matched beliefs expire from current retrieval; see [Forgetting memories](/docs/agent-memory/learn/operations/forget.md). |

If these share one overwrite or one ranking pool, you either lose the audit trail or you let two "current" beliefs fight at query time.

## Supersession - replacement with history

When an updated preference or corrected fact arrives from the **same kind of source** (for example two statements from the same user over time), SurrealDB Agent Memory treats it as **you changing your mind**, not a contradiction to flag.

- The prior belief is **closed in time**, not erased.
- The new belief becomes the **single current answer** for “what is true now?”
- You can still ask what the value was last month and when it changed.

Instructions behave the same way: “always use formal tone” superseded by “prefer casual” means the agent follows casual **now**, but the shift remains auditable.

Cross-provenance clashes are different - an uploaded policy versus a user assertion - and surface as **`uncertainty`** instead of a clean supersession. See [Authority when pillars meet](/docs/agent-memory/learn/reasoning/authority-hierarchy.md).

## Decay - relevance without destruction

Not everything should live at full strength forever. **Context** fades quickly; **knowledge** fades more slowly; **identity** is comparatively stable. SurrealDB Agent Memory applies category-aware **importance decay** on a schedule.

Decay is not blind deletion: a decayed fact can still be retrieved. Recall does not currently raise a fact's importance, so a fact that is retrieved often decays at the same rate as one that is never retrieved.

The decay pass runs once a day and multiplies each fact's importance by a fixed rate for its category:

| Category | Rate per pass |
| --- | --- |
| `context` | 0.95 |
| `knowledge` | 0.995 |
| `identity` | 1 (no decay) |

Decay changes importance only. It never ends a fact, so a decayed fact can still be retrieved.

The figure below plots the starting importance and daily rate of each category over 60 days.

<img src="~/assets/img/diagrams/light/am-importance-decay-light.webp" darkSrc="~/assets/img/diagrams/am-importance-decay.webp" alt="Importance over 60 days with one decay pass a day. Identity facts start at 1.0 and do not decay. Knowledge facts start at 0.8 and are multiplied by 0.995 a day, reaching 0.59 at day 60. Context facts start at 0.5 and are multiplied by 0.95 a day: 0.35 at day 7, when the fact expires and gets a valid_until, then 0.11 at day 30 and 0.02 at day 60. Decay changes importance only and never ends a fact." />

### Expiry of context facts

A `context` fact expires 7 days after its known time (`created_at`). Agent Memory checks for these facts every hour. Expiry sets the fact's `valid_until`, so the fact leaves current retrieval but stays in the entity's history. Nothing is deleted.

The expiry pass applies to `context` attributes and actions. It skips:

- facts that already have a `valid_until`
- facts that a later value superseded
- relations, whatever their category
- topic rollups and gists, which end when the facts they summarise end

> [!WARNING]
> The 7 days count from the known time, not from the write. A backfill that sets `observed_at` more than 7 days in the past writes `context` facts that expire at the next hourly check. To keep backfilled facts current, write them as triples with a `memory_category` of `knowledge` or `identity`. See [Setting the category](/docs/agent-memory/learn/mental-model/memory-categories.md#setting-the-category).

### What you can configure

The 7-day expiry and the decay rates are the same for every Context, scope and principal, and on every deployment, including [Enterprise](/docs/agent-memory/operate/enterprise/configuration.md#fixed-behaviour) deployments. You cannot set them per Context or per scope. You control them in these ways:

- **Choose the category at write time.** Triples take a `memory_category`, so a fact that must not expire can be written as `knowledge` or `identity`.
- **Run a pass on demand.** `POST /api/v1/{context_id}/lifecycle/expire` runs the expiry pass and needs the `memory:forget` grant. `POST /api/v1/{context_id}/lifecycle/decay` runs the decay pass across the whole Context and needs the `grant:manage` grant over `/`. Both use the same rules as the scheduled passes.

Background **consolidation** can also crystallise repeated observations into durable beliefs (`source.kind = "consolidation"`) - the “between conversations” evolution described in [Traces and memory evolution](/docs/agent-memory/learn/architecture/traces-and-evolution.md).

## Forget - explicit removal

When something must stop influencing the agent - privacy, compliance, or a hard reset - use **`POST /forget`** or entity delete. Default behaviour **expires** matched records from current retrieval while keeping audit history; **`purge: true`** and scoped forget exist for erasure requirements.

Forget does not block future extraction: if a later turn mentions the same topic again, new memory can be created. Combine product policy with forget when a topic must stay gone.

The figure below compares what each mechanism on this page leaves in current recall, in point-in-time reads, in history and in storage.

<img src="~/assets/img/diagrams/light/am-forget-matrix-light.webp" darkSrc="~/assets/img/diagrams/am-forget-matrix.webp" alt="What each way of retiring a fact leaves behind. A correction (supersession): current recall shows the new value only, point-in-time reads serve the old value, correction history and storage are kept. Context expiry, 7 days after known time: no longer returned by current recall, still served by point-in-time reads, history and storage kept. Decay: still returned, point-in-time reads and history unchanged, stored. Forget or entity delete: no longer returned, withheld from point-in-time reads, history kept and stored for audit. Forget with purge: removed from recall and point-in-time reads, history and storage erased. Scoped forget: removed and erased, with the subtree hard-deleted. Tombstoning a scope node only retires the folder in the scope vocabulary." />

## Long sessions and compaction

Existing model context windows encourage **compaction**, namely the process of squashing a long thread into a summary. Summaries are inherently lossy, often discarding details you did not know you would need later.

SurrealDB Agent Memory’s approach is complementary: important facts from turns are **promoted into durable, queryable memory** (entities, attributes, instructions) while the **full episodic transcript** remains addressable via sessions and provenance. Consolidation and reflection run **between** interactions so you are not dependent on remembering to compact at the right moment for memory to survive the next session.

## Who owns the decision?

The **reconciler** owns the bookkeeping guarantees - supersession chains, confidence floors, decay schedules, uncertainty when sources disagree. **Signals** come from agent actions: turns, corrections, document ingest, reflection, and traces of what was retrieved and used.

When the system genuinely cannot decide (cross-provenance conflict, confidence below the calibration floor), it records **`uncertainty`** for the agent or a higher-level policy to resolve rather than silently picking a winner.

## Related reading

- [Reconciliation and supersession](/docs/agent-memory/learn/reasoning/reconciliation-and-supersession.md)
- [Tri-temporal model](/docs/agent-memory/learn/architecture/tri-temporal-model.md)
- [Forgetting memories](/docs/agent-memory/learn/operations/forget.md)
- [Traces and memory evolution](/docs/agent-memory/learn/architecture/traces-and-evolution.md)
