Skip to main content

Module memory_decay

Module memory_decay 

Source
Expand description

Periodic recency-decay job for EpisodicMemorySchema tables.

Reads the last_accessed_at column from each data file (Timestamp(ns, UTC) or legacy Utf8), recomputes recency_weight = exp(-lambda * days_since_access), rewrites the column, and commits a new Iceberg snapshot replacing the old files.

Integrates with the existing CompactionExecutor infrastructure: it reads and rewrites individual data files (not a merge), preserving HNSW indexes.

Structs§

MemoryDecayJob
Periodic job that updates recency_weight for all records in a table.