Skip to main content

Module memory_lifecycle

Module memory_lifecycle 

Source
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§

ClusterCompactionConfig
Guardrails for cluster compaction (#971). See crate::core::memory_policy::CompactionPolicy for field meanings.
LifecycleConfig
LifecycleReport

Enums§

ForgettingModel
Which forgetting curve drives confidence decay (#1).

Constants§

DEFAULT_BASE_STABILITY_DAYS
Default characteristic memory stability (days) for the Ebbinghaus curve.

Functions§

apply_confidence_decay
archive_facts
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
restore_archive
run_lifecycle