Smarter memory auto-injection with graph awareness

t-263·WorkTask·
·
·
Created2 months ago·Updated4 weeks ago

Description

Edit

Improve memory auto-injection in runAgentWithMemory: 1) Filter out superseded memories (don't show old info that has been replaced), 2) Surface contradictions as warnings in the prompt, 3) Add recency weighting to similarity scores. Use knowledge graph relations to inform which memories surface.

Timeline (4)

🔄[human]Open → InProgress4 weeks ago
💬[human]4 weeks ago

Implementation complete. Commit 2cd4a63.

Features: 1. Recency weighting: Recent memories get a boost (20% recency, 80% similarity) 2. Superseded filtering: Memories with 'supersedes' links are hidden 3. Contradiction detection: Warns when memories conflict 4. Enhanced API: recallMemoriesEnhanced returns ScoredMemory with all scores

The enhancement is transparent - existing code continues to work, but now gets smarter results through the HydrationConfig/MemorySources pipeline.

🔄[human]InProgress → Done4 weeks ago