TL;DR
LLM agents struggle to maintain coherent long-term memory because existing systems rely on rigid text chunking and fail to update outdated facts. This paper introduces AMA, a multi-agent framework that dynamically stores and retrieves memory across multiple granularities (raw text, specific facts, and episodic summaries) while actively detecting and resolving logical conflicts. AMA achieves state-of-the-art performance on complex long-context benchmarks while slashing token consumption by up to 80%.
What Problem Does This Paper Address?
As Large Language Models (LLMs) are increasingly deployed as autonomous agents or long-term companions, they need robust external memory systems to remember past interactions. Currently, most memory systems rely on static strategies: they either chop conversation history into fixed-length text chunks or generate coarse, high-level summaries.
This creates two major problems:
- The Granularity Mismatch: Sometimes an agent needs a highly specific detail ("What exact error code did I get last week?"), and sometimes it needs a broad summary ("What is the general theme of my fitness journey?"). Rigid memory systems either retrieve too much irrelevant noise or lose crucial fine-grained details.
- Unchecked Inconsistencies: Standard memory systems are "accumulation-heavy." If a user says "I use a Fitbit Inspire" on Tuesday, and "I returned the Inspire and bought a Versa" on Friday, the system simply stores both. Over time, these logical contradictions pile up, leading the agent to hallucinate or use outdated information.
Methods
To solve these issues, the authors propose AMA (Adaptive Memory via Multi-Agent Collaboration). Instead of relying on a single monolithic prompt to manage memory, AMA divides the memory lifecycle into four specialized, interacting agents:
- Constructor: Parses incoming dialogue and stores it in three distinct granularities: Raw Text, Fact Knowledge (breaking sentences down into strict Subject-Verb-Object relationships), and Episode Memory (generating high-level summaries when it detects a topic shift).
- Retriever: Acts as a smart router. It analyzes the user's query intent and decides which memory granularity to search. For example, it routes abstract queries to Episode Memory and specific detail queries to Fact Knowledge.
- Judge: The quality control auditor. It evaluates retrieved memories for relevance. If the info is insufficient, it tells the Retriever to try again. Crucially, it also scans for logical conflicts between the new input and the retrieved history.
- Refresher: The editor. If the Judge detects a conflict (e.g., the user changed their device), the Refresher is triggered to explicitly update or delete the outdated memory entry, keeping the database clean and accurate.
Datasets
The framework was evaluated on two challenging long-term memory benchmarks:
- LoCoMo: A large-scale benchmark for very long-term conversational memory, featuring complex multi-session chats averaging 16.6k tokens per conversation.
- LongMemEvals: A "needle-in-a-haystack" style benchmark featuring massive interaction histories (~115k tokens) designed to test specific memory abilities like temporal reasoning and knowledge updating.
Key Insights and Ideas
- One size does not fit all for memory: The ablation studies showed that combining Raw Text, Fact Knowledge, and Episodic Memory vastly outperforms using any single format. Different reasoning tasks require different levels of abstraction.
- Active maintenance is non-negotiable: Simply accumulating facts is a recipe for failure in long-term deployments. The "Refresher" agent proved that explicitly deleting or updating conflicting information is vital for maintaining an agent's reasoning fidelity over time.
- Separation of concerns works: By splitting memory management into distinct roles (Constructor, Retriever, Judge, Refresher), the system avoids entangling conflicting objectives. A single LLM struggles to simultaneously retrieve data, check it for errors, and rewrite it; dividing these tasks among agents makes the pipeline highly reliable.
Key Results
- State-of-the-Art Accuracy: On the LoCoMo benchmark using GPT-4o-mini, AMA achieved an overall LLM Score of 0.774, comfortably beating strong baselines like Nemori (0.740), Mem0 (0.608), and standard RAG (0.300).
- Massive Efficiency Gains: AMA achieved these top scores while processing only ~3,600 tokens per query. Compared to feeding the entire conversation history into the model (which took ~18,600 tokens and 7.2 seconds), AMA reduced token usage by roughly 80% and cut latency nearly in half (3.9 seconds).
- Mastery of Dynamic Updates: On the LongMemEvals "knowledge-update" scenarios (where facts change over time), AMA achieved an impressive 89.7% accuracy. When the Refresher agent was disabled, this score plummeted to 56.8%, highlighting exactly how critical active memory editing is.
Limitations and Future Work
The authors acknowledge a few limitations. First, multi-agent collaboration introduces a moderate computational overhead compared to simple, static retrieval methods like standard RAG. Second, the framework relies heavily on the reasoning capabilities of the underlying "backbone" model (like GPT-4). If deployed on smaller, less capable open-source models, the agents might struggle to accurately parse facts or detect subtle logical conflicts.
Future work will focus on optimizing the system's efficiency and improving its universality so it can run effectively on smaller, more lightweight model architectures.
Summary updated