TLDRocket
Sign in

How we built a persistent agent memory layer on Elasticsearch with 0.89 recall and zero tenant leaks

elastic.co

A team built a persistent memory system for AI agents using Elasticsearch with three separate indices for episodic (timestamped events), semantic (stable facts), and procedural (step-by-step playbooks) memories, combined with hybrid retrieval using BM25 and dense vectors plus a cross-encoder reranker. The system achieved 0.89 recall@10 on a 168-question evaluation with zero cross-tenant data leaks, using per-user document-level security to isolate each user's memories. The architecture consolidates short-lived episode logs into durable facts and playbooks every turn, handles contradictions through supersession rather than deletion, and applies time-decay so recent information ranks above older facts.

Why it matters

A persistent agent memory layer built on Elasticsearch uses a multi-index system to improve long-term memory capabilities for agents, leading to high recall accuracy and tenant isolation. With separate indices for episodic, semantic, and procedural memory, the architecture efficiently manages various memory types while addressing challenges like memory decay and data contradiction.

Related stories

The daily briefing

Every AI story that matters, in your inbox by 8am.

TLDRocket reads all relevant sources, removes duplicate coverage, and summarises the day in two minutes. Follow companies and topics for alerts, or get the briefing in Slack. Free, no spam, unsubscribe anytime.