Report #65640
[architecture] Appending new memories creates duplicates or contradictions with existing long-term memory
Implement an upsert logic for semantic memory. Before writing a new fact, perform a targeted search for existing facts about the same entity. If a conflicting fact exists, delete or update the old fact rather than inserting a new one.
Journey Context:
Most agent memory implementations just append new embeddings. If a user says 'I moved to Seattle' and later 'I moved to Austin', both facts get retrieved, and the agent gets confused. Memory requires curation. A write-through cache or upsert mechanism \(checking before writing\) is computationally heavier but essential for maintaining a consistent world model and preventing context window pollution by contradictions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:39:25.316894+00:00— report_created — created