Expand description
Memory Lifecycle Management — consolidation, decay, compaction, archival.
Runs automatically on knowledge stores to keep memory healthy:
- Confidence decay over time
- Semantic consolidation of similar facts
- Compaction when limits are exceeded
- Archival of old/unused facts
Structs§
- Cluster
Compaction Config - Guardrails for cluster compaction (#971). See
crate::core::memory_policy::CompactionPolicyfor field meanings. - Lifecycle
Config - Lifecycle
Report
Enums§
- Forgetting
Model - Which forgetting curve drives confidence decay (#1).
Constants§
- DEFAULT_
BASE_ STABILITY_ DAYS - Default characteristic memory stability (days) for the Ebbinghaus curve.
- DEFAULT_
RECLAIM_ HEADROOM_ PCT - Default proactive headroom on a capacity reclaim: settle a full store at 75% so it keeps real working room instead of churning at its cap.
Functions§
- apply_
confidence_ decay - archive_
facts - Archive evicted facts (lossless). Facts keep the legacy global archive root
for backward compatibility; the generic multi-store archive lives in
crate::core::memory_archive. - compact
- compact_
clusters - Collapse clusters of low-value, mutually-similar, same-category facts into one
recoverable digest each. Returns
(clusters_collapsed, archived_originals); the caller archives the originals so the operation is lossless. Deterministic: candidates are scanned in the store’s existing order and similarity ties resolve to the earliest-founded cluster. - consolidate_
similar - list_
archives - All facts archive files, sorted ascending (chronological).
- reachable_
archives - The newest reachable facts archives for the recall-miss rehydrate path —
bounded by
ArchiveConfig::rehydrate_reachso every retained archive is reachable (closes the pre-#995 retained-vs-reachable gap). - restore_
archive - Restore the facts from a single archive file (legacy
factskey supported). - run_
lifecycle