What Happened
Conventional retrieval-augmented generation (RAG) finds information in documents, but it does not automatically preserve lessons an agent learns while working. Keeping every conversation in the prompt is expensive and eventually impractical. An emerging approach adds a memory lifecycle to retrieval: write, update, forget, infer and recall facts from conversations while retaining their provenance and access boundaries [1].
Elastic’s experimental Context Engine illustrates the approach. It captures conversations and optional notes, consolidates them in the background to deduplicate facts and resolve contradictions, then makes eligible memories retrievable alongside documents, tickets and runbooks through keyword or semantic search, filters and access controls. The memory capability is in private preview, not a generally available default for RAG systems [1].
Why It Matters to Businesses
A support or operations agent that can retrieve a current customer preference or a resolved incident may avoid repeating work. But a memory system that recalls a superseded fact—or exposes one team’s notes to another—can be worse than no memory. The business requirement is therefore not simply better recall; it is current, attributable and authorized recall [1].
This changes how teams should assess RAG stacks built with frameworks such as LlamaIndex, LangChain or Haystack and search systems such as Elasticsearch, Weaviate, Pinecone, Qdrant, Milvus or Vespa. Document retrieval quality still matters, but agent workflows also need explicit rules for what can become memory, when it is revised or deleted, and who can retrieve it. Those requirements should be tested on the organization’s own tasks [1].
Kimbodo Engineering Perspective
We would treat memory as a governed data product, not as a longer chat history or another vector collection. A transcript is evidence; a proposed memory is a derived claim that needs a source, scope, timestamp and lifecycle state. Semantic similarity helps find candidates, but it cannot by itself decide whether a fact is still true or whether the requester may see it.
Start with ordinary document RAG when the task only requires current source material. Add agent memory when repeated work demonstrably benefits from facts learned during prior sessions. Background consolidation can reduce duplication, but it introduces latency and the possibility of incorrect inferences; high-impact facts should require verification before they influence an action [1].
How We Would Implement It
- Separate stores and scopes: Keep authoritative documents and derived memories distinguishable. Attach source references, subject or entity IDs, tenant and user or team scope, creation time, expiry and status to each memory.
- Control writes: Capture only permitted interactions. Extract candidate facts, then validate them before writing; do not treat every agent-generated statement as ground truth.
- Consolidate with a lifecycle: Link related entities, deduplicate candidates, mark replaced facts as superseded and process deletion or retention requests. Preserve an audit trail without allowing forgotten content back into retrieval [1].
- Retrieve in layers: Apply authorization and lifecycle filters before combining keyword and vector results. Rank eligible memories with relevant documents, and pass concise, attributed context to the model rather than entire transcripts.
- Evaluate end to end: Measure answer quality, stale-fact recall, cross-scope leakage, deletion effectiveness, retrieval latency and cost on representative workflows—not just vector-search relevance [1].
Risks, Costs and Security
Memory adds extraction and consolidation compute, storage, indexing work and operational monitoring. It also creates a new location for sensitive information. Enforce access controls at retrieval time, isolate tenants, set retention limits and test that updates and deletions affect both indexed results and any downstream caches. Treat retrieved memories as untrusted context: provenance and authorization do not make their contents safe instructions for an agent to execute [1].
For production selection, compare candidate search platforms and orchestration frameworks against these lifecycle and security requirements, as well as your existing infrastructure. A private-preview memory feature may be useful for evaluation, but critical workflows need a fallback and a clear path for operating the same controls in production [1].
Where Kimbodo Comes In
Kimbodo builds and operates this in production for businesses — see our RAG Development Services practice, or Estimate My RAG System.