D-Mem: A Dual-Process Memory System for LLM Agents
Organizations: Einstein Institute of Mathematics The Hebrew University of Jerusalem, Israel · Independent Researcher · AWS AI
Abstract
Driven by the development of persistent, self-adapting autonomous agents, equipping these systems with high-fidelity memory access for long-horizon reasoning has emerged as a critical requirement. However, prevalent retrieval-based memory frameworks often follow an incremental processing paradigm that continuously extracts and updates conversational memories into vector databases, relying on semantic retrieval when queried. While this approach is fast, it inherently relies on lossy abstraction, frequently missing contextually critical information and struggling to resolve queries that rely on fine-grained contextual understanding. To address this, we introduce D-Mem, a dual-process memory system. It retains lightweight vector retrieval for routine queries while establishing an exhaustive Full Deliberation module as a high-fidelity fallback. To achieve cognitive economy without sacrificing accuracy, D-Mem employs a Multi-dimensional Quality Gating policy to dynamically bridge these two processes. Experiments on the LoCoMo and RealTalk benchmarks using GPT-4o-mini and Qwen3-235B-Instruct demonstrate the efficacy of our approach. Notably, our Multi-dimensional Quality Gating policy achieves an F1 score of 53.5 on LoCoMo with GPT-4o-mini. This outperforms our static retrieval baseline, Mem0 (51.2), and recovers 96.7% of the Full Deliberation's performance (55.3), while incurring significantly lower computational costs.
Figures & tables
| LoCoMo | RealTalk | |||||||||
| Method | F1 | LLM | BLEU | Time(s) | Tokens | F1 | LLM | BLEU | Time(s) | Tokens |
| GPT-4o-mini | ||||||||||
| Full Context | 46.2 | 72.3 | 37.8 | – | – | – | – | – | – | – |
| RAG | 20.8 | 30.2 | 16.4 | – | – | – | – | – | – | – |
| LangMem | 35.8 | 51.3 | 29.4 | – | – | – | – | – | – | – |
| Mem0 | 41.5 | 61.3 | 34.2 | – | – | – | – | – | – | – |
| Method | Status | LoCoMo | RealTalk | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Rate | F1 | LLM | BLEU | Tokens | Rate | F1 | LLM | BLEU | Tokens | ||
| GPT-4o-mini | |||||||||||
| Majority Voting | W/O FB | 98.2% | 51.6 | 73.4 | 41.4 | 6902.1 | 97.1% | 38.0 | 61.1 | 23.9 | 7262.1 |
| W/ FB | 1.8% | 35.1 | 59.3 | 28.7 | 41082.7 | 2.9% | 19.7 | 38.1 | 17.3 | 58445.0 | |
| Consensus | W/O FB | 75.5% | 57.4 | 78.1 | 46.7 | 6834.7 | 70.5% | 42.1 | 65.7 | 25.9 | 7148.4 |
| W/ FB | 24.5% | 41.6 | 69.8 | 31.5 | 42315.1 | 29.5% | 32.0 | 54.4 | 22.9 | 55959.9 | |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | F1 Score | LLM-as-a-Judge | BLEU | Efficiency | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| S-H | M-H | Temp | O-D | Avg | S-H | M-H | Temp | O-D | Avg | S-H | M-H | Temp | O-D | Avg | In | Out | Time | |
| Full Context | 53.1 | 35.4 | 44.1 | 24.5 | 46.2 | 83.0 | 66.8 | 56.2 | 48.6 | 72.3 | 44.7 | 26.1 | 36.1 | 17.2 | 37.8 | – | – | – |
| LangMem | 38.8 | 33.5 | 31.9 | 29.4 | 35.8 | 61.4 | 52.4 | 24.9 | 47.6 | 51.3 | 33.1 | 23.9 | 26.2 | 23.5 | 29.4 | – | – | – |
| Mem0 | 44.4 | 34.3 | 44.4 | 27.1 | 41.5 | 68.1 | 60.3 | 50.4 | 40.6 | 61.3 | 37.7 | 25.2 | 37.6 | 19.4 | 34.2 | – | – | – |
| RAG | 22.2 | 18.6 | 19.5 | 19.0 | 20.8 | 32.0 | 31.3 | 23.7 | 32.6 | 30.2 | 18.6 | 11.7 | 15.7 | 13.5 | 16.4 | – | – | – |
| Zep | 39.7 | 27.5 | 44.8 | 22.9 | 37.5 | 63.2 | 50.5 | 58.9 | 39.6 | 58.5 | 33.7 | 19.3 | 38.1 | 15.7 | 30.9 | – | – | – |
| Method | F1 Score | LLM-as-a-Judge | BLEU | Efficiency | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| M-H | Temp | O-D | Avg | M-H | Temp | O-D | Avg | M-H | Temp | O-D | Avg | In | Out | Time | |
| Basic Methods | |||||||||||||||
| Mem0 ∗ | 32.0 | 47.5 | 21.7 | 37.3 | 51.2 | 68.0 | 54.6 | 59.1 | 23.5 | 26.1 | 17.0 | 23.7 | 2296.5 | 6.0 | 3.272 |
| Filter | 33.2 | 48.3 | 24.0 | 38.4 | 54.8 | 68.7 | 53.7 | 60.7 | 24.6 | 27.3 | 17.8 | 24.8 | 3345.1 | 31.3 | 4.140 |
| Gated Deliberation | |||||||||||||||
| Majority Voting | 31.6 | 48.2 | 22.2 | 37.5 | 53.2 | 69.6 | 53.7 | 60.4 | 22.6 | 27.0 | 17.3 | 23.7 | 8738.5 | 55.2 | 5.404 |
| Method | F1 Score | LLM-as-a-Judge | BLEU | Efficiency | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| S-H | M-H | Temp | O-D | Avg | S-H | M-H | Temp | O-D | Avg | S-H | M-H | Temp | O-D | Avg | In | Out | Time | |
| Mem0 (Baseline) | 38.0 | 29.5 | 42.5 | 16.3 | 36.0 | 58.0 | 52.5 | 49.8 | 37.5 | 54.0 | 31.7 | 20.1 | 35.1 | 13.1 | 29.1 | 1977.9 | 5.7 | 0.702 |
| Basic Methods | ||||||||||||||||||
| Mem0 ∗ | 51.7 | 41.5 | 51.8 | 22.6 | 48.1 | 79.9 | 74.8 | 65.7 | 59.4 | 74.7 | 45.4 | 32.1 | 38.1 | 18.0 | 39.7 | 2431.2 | 11.6 | 1.518 |
| Filter | 52.8 | 41.6 | 59.1 | 24.5 | 50.3 | 79.8 | 74.5 | 77.0 | 57.3 | 76.8 | 46.7 | 32.5 | 44.6 | 20.3 | 42.0 | 3521.8 | 32.5 | 2.713 |
| Gated Deliberation | ||||||||||||||||||
| Method | F1 Score | LLM-as-a-Judge | BLEU | Efficiency | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| M-H | Temp | O-D | Avg | M-H | Temp | O-D | Avg | M-H | Temp | O-D | Avg | In | Out | Time | |
| Basic Methods | |||||||||||||||
| Mem0 ∗ | 32.1 | 44.1 | 18.6 | 35.4 | 59.1 | 68.0 | 55.6 | 62.5 | 26.1 | 18.8 | 15.4 | 21.3 | 2765.5 | 11.0 | 1.995 |
| Filter | 32.1 | 43.3 | 19.8 | 35.2 | 56.8 | 65.8 | 51.8 | 60.0 | 24.9 | 19.7 | 15.4 | 21.2 | 4075.5 | 43.9 | 3.215 |
| Gated Deliberation | |||||||||||||||
| Majority Voting | 32.8 | 44.8 | 17.9 | 35.8 | 55.8 | 67.7 | 52.8 | 60.6 | 26.5 | 18.9 | 14.8 | 21.4 | 10858.4 | 150.7 | 5.446 |
Agent Memory Management
Agent memory management studies how AI agents store, update, retrieve, compress, and forget information across long-running tasks.
See all 446 papers