Skip to the page
Chapter 02 · Memory

Typed memories with half-lives.

A scratch note is useful for a day and a procedural rule for a year, so ee stores memories at four levels, each with its own half-life. When the decay pass runs, a stale memory is demoted, then leaves retrieval with an audit entry.

Read all eight chapters on one page

02.1Decay and demotion

How fast each level fades.

Freshness halves on a schedule set by the kind of memory: a day for working notes, a year for a procedural rule. The decay pass (ee maintenance run --include-decay) weighs freshness × confidence × utility to demote or tombstone a memory, with an audit entry either way.
Half-lives by kind

Age, confidence and utility decide when a memory is demoted or tombstoned.

ee's rule, computed here
0.25.50.75101d1w1mo3mo6mo1y2yTIME SINCE LAST USE · LOG SCALEFRESHNESSdemote · lifecycle < 0.053 mo

Preserve

3

Demote

1

Tombstone

1

Confidence × utility

0.25

Demote once freshness drops below 0.2; tombstone below 0.04.

KindHalf-lifeFreshnessLifecycleDecisionDemotes after
Working1 d00tombstone2.3 d
Episodic event30 d0.1250.0313demote2.3 mo
Episodic failure90 d0.50.125preserve6.9 mo
Semantic fact180 d0.7070.1768preserve13.7 mo
Procedural rule365 d0.8430.2107preserve2.3 y

Age. Age runs from the latest of a memory’s creation, update and last access, so a memory that keeps being recalled stays fresh.

Demotion. A demoted procedural memory moves down to semantic and a semantic one to episodic, and its importance halves.

Tombstones. A tombstoned memory leaves retrieval and gets an audit entry. The row is kept, and ee curate untombstone <id> restores it.

Sources and assumptions
src/policy/memory_decay.rs · MemoryDecayHalfLives::default (working 1 d, episodic event 30 d, episodic failure 90 d, semantic fact 180 d, procedural rule 365 d) · memory_decay_freshness_score · DEFAULT_DECAY_DEMOTE_THRESHOLD 0.05 · DEFAULT_DECAY_FORGET_THRESHOLD 0.01 · demoted_memory_level · src/steward/mod.rs · memory_decay_reference_time · src/core/curate.rs · run_curate_untombstone

working

Task notes, scratch, in-progress facts

decay
fastest
packing
low; suppressed across sessions

episodic

“On 2026-03-12 the release failed because…”

decay
medium
packing
medium

semantic

Project conventions, architectural facts

decay
slow
packing
high

procedural

Rules, anti-patterns, playbooks

decay
slowest
packing
highest
02.2Typed fields

Fields a search can filter on.

A failure records its cause and the commit that reverted it; a decision, its options and when to revisit it. Search filters on those fields by name (--kind failure --field family^rustc). Plain prose gets no typed fields; ee does not invent them.

rule

procedural
  • condition
  • action
  • exceptions

condition: before tagging · action: cargo fmt --check

anti-pattern

procedural
  • trigger
  • blast_radius
  • safer_alternative

trigger: git rebase on main · safer: merge

decision

semantic
  • options
  • chosen
  • rationale
  • supersedes
  • revisit_by

chosen: Asupersync · rationale: no Tokio

convention

semantic
  • scope
  • pattern

scope: tests/*.rs · pattern: allow header after //!

command

procedural
  • command
  • when_to_use
  • exit_meaning

exit_meaning: 124 means the command timed out

failure

episodic
  • cause
  • regression_surface
  • reverted_at_sha
  • family

family: rustc E0277 · cause: missing bound

Every memory also carries its level, kind, content hash, tags, confidence, utility, importance, access count, source, evidence spans, links and trust class. README, “Memory Model”.