Architecture: How to implement importance decay for Vitto's memory system ...

Documentation for Sessions

🏗️ Architecture: How to implement importance decay for Vitto's memory system ...

Date: 2026-02-27
Time: 22:40:04 UTC
Session: gspace1-152.2
Agent: backend
Confidence: 90%
Status: ✅ Documented


📋 Decision Context

Question:

How to implement importance decay for Vitto's memory system (Session 152)

Task: Session 152: Jarvis memory foundations - importance decay


🎯 Decision Made

Chosen:

Exponential decay formula: importance *= 0.97^(daysSinceLastAccess). Configurable via MEMORY_DECAY_FACTOR env var. Corrections never decay below 0.5. decayProtected field for user-pinned memories. Daily cron at 4am. Batch-updates via bulkWrite for efficiency.

Options Considered:

  1. Exponential decay with configurable rate (chosen)
  2. Linear decay (fixed amount per day)
  3. Step function (drop after threshold days)
  4. No decay - rely on consolidation only

💭 Reasoning

The existing system only increased importance (access bonus). After months of use, hot cache would be dominated by stale high-importance items. Exponential decay (3%/day) is gentle enough that frequently-accessed memories stay high, while unused ones naturally fade. The configurable env var allows tuning without code changes. The decayProtected field lets users pin critical memories. Running after consolidation (3am) at 4am keeps the maintenance pipeline sequential.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation