TL;DR
Large Language Model (LLM) agent memory has rapidly evolved into a complex data management system, yet it is still predominantly evaluated as an NLP black box. This paper introduces a systematic framework that decomposes agent memory into four core modules—representation, extraction, retrieval, and maintenance—and benchmarks 12 major memory systems. The findings reveal that no single architecture fits all workloads, exposing critical trade-offs between structural complexity, retrieval accuracy, and operational cost.
What Problem Does This Paper Address?
To execute long-horizon tasks, interact personally with users, and use tools effectively, LLM agents require a robust memory system. While early approaches relied on simple vector-based Retrieval-Augmented Generation (RAG), modern agent memory systems function more like specialized databases that handle persistent storage, updates, evictions, and complex data structures.
However, current benchmarks evaluate these memory systems primarily through end-to-end NLP metrics (like F1 or BLEU scores), treating the underlying architecture as a monolithic black box. This approach obscures critical system-level challenges: How much computational latency and cost do these systems incur? How well do they handle dynamic, conflicting knowledge updates? The authors address this gap by analyzing agent memory through a data management lens, breaking systems down into modular components to pinpoint exactly where they succeed or fail.
Methods
The authors formalize the agent memory system by decomposing it into four core functional modules:
- Memory Representation and Storage ($R$): Defines the logical structure (flat tokens, graphs, hierarchical trees, or composite objects) and the physical storage engine (in-context registers, single-engine databases, or multi-engine distributed backends).
- Memory Extraction ($S$): Governs how raw input streams (dialogue histories, tool logs) are processed into memory primitives via raw concatenation, schema-free extraction, or schema-constrained structured extraction.
- Memory Retrieval and Routing ($Q$): The mechanisms used to query and traverse indices, ranging from native attention and dense vector searches to topological graph traversals and agentic tool-calling.
- Memory Maintenance ($U$): Policies governing the lifecycle of memory, including conflict resolution (multi-versioning), capacity management (eviction policies), and semantic consolidation (summarization).
Using this framework, the authors evaluate 12 representative memory systems (such as Mem0, MemGPT/Letta, Zep, and Cognee) and isolate the impact of individual modules through fine-grained ablation studies.
Datasets
The evaluation features 5 distinct benchmark workloads spanning 11 datasets, chosen to target different memory bottlenecks:
- LoCoMo: A long-conversation QA benchmark testing episodic, temporal, and open-domain memory over multi-turn interactions.
- LongMemEval: A multi-session long-memory benchmark that tests an agent's ability to reconnect facts across sessions and reason over temporally distributed evidence.
- DB-Bench (from LifelongAgentBench): Evaluates procedural execution and trace preservation across sequential database operations.
- LongBench: Measures controlled long-context difficulty and robustness as context length scales.
Key Insights and Ideas
- Workload-Architecture Alignment: There is no single "best" memory architecture. Graph-based systems excel at cross-session fact reconnection, hybrid filtering shines in long, semantically coherent dialogues, and trace-preserving sequential logs are mandatory for step-by-step tool execution.
- "Hallucinations of the Past": Systems lacking active lifecycle management or relying on simple append-only stores struggle heavily with targeted overwrites. When knowledge updates occur, they frequently surface stale, outdated facts.
- The Cost of Abstraction: Every layer of abstraction (compression, summarization, fact extraction) progressively discards information. Retaining raw conversational text often outperforms aggressive LLM-driven summarization for exact detail recovery.
- The Efficiency Frontier: Highly structured topological systems (like Knowledge Graphs) incur orders-of-magnitude higher index construction times and query latencies, yet they do not consistently deliver proportional accuracy gains. Localized maintenance is far more cost-effective than global reorganization.
Key Results
- Task Effectiveness: On LongMemEval, structure-aware systems led the field, with Zep achieving the highest LLM Judge Accuracy of 48.0% and Cognee attaining a top ROUGE-L F1 of 35.3%. On LoCoMo, hybrid filtering systems excelled, with MemOS hitting the highest Exact Match (EM) score of 11.5%.
- Retrieval Fidelity: Retrieval accuracy degrades sharply as the temporal distance between the evidence and the query grows. Flat embedding RAG baselines drop dramatically over long horizons, whereas structured systems like A-MEM and MemTree remain highly stable.
- Operational Costs: Highly structured systems like Zep and Cognee exceeded 110+ seconds in average operation latency per query due to heavy graph construction overhead. In contrast, lightweight systems like LightMem operated under 4 seconds per query while maintaining competitive utility.
Limitations and Future Work
The authors note that standard semantic consolidation techniques often destroy crucial chronological cues, meaning that raw long-context retrieval still frequently outperforms memory-backed approaches on strictly time-dependent queries.
Future research should focus on developing truly agent-native memory systems that balance structural representation with operational efficiency. Key directions include designing better localized maintenance strategies that avoid global recomputation and preserving temporal fidelity without incurring massive computational latencies.
Summary updated