Tideline

Decay & lifecycle

Good memory forgets the right things. Tideline ages facts with an importance-scaled exponential decay, reinforces what you actually use, and sweeps the truly faded into an archive — never a hard delete for anything durable.

The effective score#

Every fact has an effective score in [0,1] that drives both ranking and the GC sweep. Permanent facts are pinned at 1.0 and never decay; everything else decays exponentially from its last access, scaled by importance, and is nudged back up by how often it has been recalled.

effectiveScore
permanent tier            -> 1            (never decays) daysSinceAccess  = (now - lastAccessedAt) / 1 dayadaptiveHalfLife = 11.25 days * (1 + importance)lambda           = (ln2 / adaptiveHalfLife) * 0.8 * (1 + decayRate)decayed          = importance * exp(-lambda * daysSinceAccess)reinforcement    = 1 + ln(1 + accessCount) * 0.1score            = clamp(decayed * reinforcement, 0, 1)

A high-importance identity fact has a half-life around three weeks; a low-importance context note fades in days. Each recall bumps the access count and resets the clock, so the facts you lean on stay sharp.

Tiers & segment defaults#

A fact's tier and starting importance come from its segment:

SegmentTierImportanceDecay rate
identitypermanent0.850.01
correctionlong0.800.015
relationshiplong0.750.02
preferencelong0.700.02
projectlong0.650.025
knowledgelong0.600.03
contextshort0.400.08
  • permanent — pinned at 1.0, never decays, never evicted.
  • long — decays, but is only ever archived, never hard-pruned.
  • short — can be pruned (hard-deleted) once it fully fades.

The sweep#

A decay GC runs on the background maintenance sweep — cheap, no model, idempotent. It moves each fact by its score, and a confirmed belief is immune to eviction entirely:

Effective scoreshort tierlong tier
0.15kept activekept active
0.050.15archivedarchived
< 0.05pruned (hard delete)archived (never pruned)

Lifecycle states are active (in the recall pool), archived (out of recall but recoverable), and pruned(gone). Archiving is reversible; every transition is written to the event log so you can answer "why did this fact disappear?".

Reinforcement & feedback#

Recall reinforces: a hit bumps the access count and refreshes recency (auto-recall is the exception — it is passive and never reinforces). Explicit feedback is asymmetric on purpose:

  • up nudges importance +0.05 and resets the decay clock.
  • down nudges importance -0.10 and leaves the clock alone, letting decay take over.

A few bad recalls outweigh many lukewarm ones — so memory corrects toward what actually helps.

In the code

The formula and sweep are src/agents/memory/decay.ts; tiers, segment defaults, lifecycle, reinforcement, and feedback are in records.ts.

Next

Decay handles the gradual fade. The deliberate clean-up — confirming beliefs, merging duplicates, evicting noise — happens in maintenance.