How we built a persistent agent memory layer on Elasticsearch with 0.89 recall and zero tenant leaks
Summary
The Elastic Labs article details building a persistent, multi-tenant agent memory layer on Elasticsearch using three memory indices (episodic, semantic, procedural), a hybrid recall pipeline combining BM25 lexical search with dense vectors, and a cross-encoder reranker. It covers per-user DLS isolation, memory lifecycle management, supersession for contradictions, and time-decay with use-count boosts to improve recall, achieving R@10 of 0.89 across 168 questions with zero cross-tenant leaks. The post includes open-source implementation and integration guidance for agent memory and MCP compatibility.