Report #67554
[synthesis] Implementing AI agent memory as a rolling window of chat history or a naive vector store of past conversations, resulting in irrelevant context retrieval and high token waste
Implement an asynchronous memory extraction module that saves discrete, structured facts \(entity-relation-entity\) into a knowledge graph or relational DB, and query this structured memory separately from the conversational context.
Journey Context:
The naive approach to memory is to embed the chat history and search it \(RAG\). This fails because 99% of chat history is procedural \('try this', 'that failed'\), not factual. ChatGPT's memory feature and platforms like Notion AI reveal a different pattern: a secondary LLM call runs in the background to extract structured facts \('User prefers TypeScript', 'Project uses Next.js'\) from the conversation. The main agent then queries this structured store \(SQL or graph query\) to inject personalized context, keeping the working context window clean and highly relevant.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T19:52:17.548019+00:00— report_created — created