TL;DR
MemMA is a plug-and-play multi-agent framework that coordinates the entire memory cycle—construction, retrieval, and utilization—for long-horizon LLM agents. By introducing a "Meta-Thinker" for strategic forward-path guidance and an in-situ self-evolution mechanism that proactively catches and repairs memory gaps using synthetic probe questions, MemMA significantly boosts agent accuracy across diverse storage backends and tasks.
What Problem Does This Paper Address?
When Large Language Model (LLM) agents tackle complex tasks spanning days or weeks, relying solely on context windows becomes computationally prohibitive and prone to "attention dilution." To maintain coherence, agents use external memory banks. However, most current systems treat memory as a linear pipeline of isolated subroutines: writing data, searching data, and using data are handled independently.
The authors argue that this isolation breaks the memory cycle effect, leading to two main pathologies:
- Strategic Blindness (Forward Path): Memory construction is often myopic (indiscriminately appending or overwriting facts without resolving contradictions), and retrieval is aimless (performing shallow, repetitive keyword searches without actually narrowing the information gap).
- Sparse and Delayed Feedback (Backward Path): An agent usually finds out its memory is flawed only when it fails a downstream question much later. At that point, pinpointing exactly which upstream write or update decision caused the failure (credit assignment) is incredibly difficult.
Methods
To bridge these gaps, MemMA introduces a planner-worker multi-agent architecture that coordinates both the forward and backward paths of the memory cycle.
1. Forward Path: Reasoning-Aware Coordination
MemMA decouples high-level strategy from low-level execution using three specialized agents:
- Meta-Thinker ($\pi_p$): The brain of the operation. During construction, it analyzes new dialogue chunks against existing memory to generate meta-guidance on what to retain or resolve. During retrieval, it critiques the currently gathered evidence, diagnoses what is missing, and decides when to stop searching.
- Memory Manager ($\pi_s$): Executes atomic memory edits (ADD, UPDATE, DELETE, NONE) based on the Meta-Thinker's guidance.
- Query Reasoner ($\pi_r$): Replaces standard one-shot retrieval with a diagnosis-guided Refine-and-Probe loop, iteratively rewriting queries to target specific information gaps.
2. Backward Path: In-Situ Self-Evolution
Instead of waiting for downstream failures, MemMA forces the memory to evolve immediately after each interaction session:
- Probe Generation: The system synthesizes a batch of probe question-answer (QA) pairs grounded in the immediate session context and historical memory.
- In-Situ Verification: The agent attempts to answer these synthetic questions using its provisional memory.
- Evidence-Grounded Repair & Consolidation: If the agent fails a probe, a reflection module diagnoses the gap and proposes a repair fact. This fact is then semantically consolidated (via SKIP, MERGE, or INSERT actions) to keep the memory compact and conflict-free before it is permanently committed.
Datasets
The framework was evaluated across three distinct long-horizon benchmarks:
- LoCoMo: A long-context conversational memory benchmark. The authors focused on a reasoning-intensive subset consisting of 152 QA pairs across single-hop, multi-hop, temporal, and open-domain categories.
- LongMemEval-S: A larger-scale conversational memory benchmark featuring chat histories of roughly 115K tokens.
- SWE-bench-Verified-mini: A 50-task subset of a realistic software engineering benchmark used to test MemMA's ability to act as a trajectory-memory controller for agentic coding.
Key Insights and Ideas
- The Primacy of Iterative Retrieval: Ablation studies revealed that diagnosis-guided iterative retrieval is the most critical forward-path component. One-shot retrieval remains a massive bottleneck for complex queries.
- Retrieval Can't Fix Bad Construction: While iterative retrieval is powerful, it cannot surface details that the memory manager failed to preserve during the construction phase. This highlights why coordinating both phases is mandatory.
- Storage Quality Dictates Retrieval Budgets: Stronger memory backends produce cleaner, less redundant entries, meaning a smaller retrieval budget ($k$) is optimal. Conversely, weaker backends require a larger $k$ to dig up enough evidence from sparser, noisier memory banks.
- Probes Must Be Complex: When evaluating different models for probe generation, the authors found that models generating longer, multi-hop questions (like Claude-Opus) provided much stronger supervision for memory repair than models generating short, factoid-style keywords.
Key Results
MemMA demonstrated remarkable plug-and-play flexibility and consistently outperformed baseline methods across different LLM backbones (GPT-4o-mini and Claude-Haiku-4.5):
- Backend Agnostic Improvements: When applied to three different underlying memory backends on LoCoMo, MemMA consistently boosted accuracy:
- Single-Agent backend: Accuracy jumped from 52.60% to 84.87%.
- A-Mem backend: Accuracy increased from 52.63% to 78.29%.
- LightMem backend: Accuracy improved from 75.66% to 81.58%.
- High Gap Closure: On process-level diagnostics, MemMA successfully closed 92.2% of probe-detected construction gaps before memory commitment.
- Agentic Coding Generalization: On SWE-bench-Verified-mini, incorporating MemMA as a trajectory controller raised the coding agent's pass rate from 62.0% to 76.0% in a lifelong learning setup.
Limitations and Future Work
While highly effective, MemMA currently relies on the assumption that interaction streams can be cleanly segmented into distinct "sessions" to trigger the probe-and-repair loop. In highly fluid, open-ended, or continuous real-time environments, defining these session boundaries is less straightforward. Additionally, the evaluation remains largely dialogue- and text-centric; extending this closed-loop coordination to multimodal memory banks (e.g., visual or environmental states in robotics) remains an open avenue for future research.
Summary updated