LLM Agent Memory Systems: Deep Dive into Ten Architectures Under a Unified Framework
Introduction: Why Memory Matters for Agents
As LLM-powered agents evolve from simple Q&A systems into assistants that track long-term goals across hundreds of conversation turns, memory systems have become core infrastructure. LLMs are constrained by fixed context windows, which makes it impossible to process entire interaction histories directly. Dedicated agent memory systems address this: how to efficiently store, manage, and retrieve knowledge across long interaction histories within a limited context window.
The field has evolved through clear stages: early RAG systems injected external knowledge via vector retrieval but lacked deep understanding of conversation history; MemGPT introduced OS-style layered memory management; MemoryBank borrowed the Ebbinghaus forgetting curve from cognitive science; and recent systems like A-MEM, Mem0, and Zep explore dynamic knowledge networks and graph-structured memory. The survey paper *Memory in the LLM Era: Modular Architectures and Strategies in a Unified Framework* (arXiv:2604.01707) provides the first systematic comparative analysis, evaluating ten representative methods on the LOCOMO and LongMemEval benchmarks. This article analyzes those ten approaches, their design philosophies, and trade-offs.
Part 1: A Unified Analysis Framework
The framework abstracts memory systems into four core components forming a complete pipeline.
1.1 Information Extraction
- Direct archival: store conversations raw or near-raw (MemoryBank, MemGPT)
- Summarization-based: LLM-extracted structured summaries — A-MEM generates notes with context descriptions, keywords, and tags; Mem0 extracts key facts as semantic vectors
- Graph-based: extract entities and relations as subject–predicate–object (SPO) triples (Mem0ᵍ, Zep)
- Linking related experiences: A-MEM builds interconnected knowledge networks via dynamic indexing; MemoryOS clusters memories by semantic association
- Consolidating fragmented memories: MemoryBank aggregates via summarization; MemoChat uses structured memos
- Cross-level transitions: MemoryOS's short/mid/long-term tiers with FIFO + heat-score migration
- Updating existing memories: rule-driven (time decay), LLM-driven (semantic merging), or agent-driven (A-MEM's dynamic link updates)
- Filtering invalid information: access frequency + time decay (MemoryBank's forgetting curve), semantic deduplication
- Flat (MemoryBank's FIFO queues/JSON)
- Hierarchical (MemoryOS's short/mid/long-term three-tier architecture)
- Tree (MemTree's dynamic tree representation)
- Vector stores (FAISS, Qdrant)
- Graph stores (MemTree's tree, Zep's temporal knowledge graph)
- Hybrid (Mem0 supports both vector retrieval and graph traversal)
- Lexical: keyword matching (BM25, Jaccard similarity)
- Vector: cosine similarity + ANN — the current mainstream
- Structural: graph traversal, multi-hop reasoning (Mem0ᵍ, Zep)
- LLM-assisted: query rewriting/expansion (MemoChat's iterative memorize–retrieve–respond loop)
- Extraction vs. retention: keep raw content for fact-dense domains (medical, legal); structured extraction suffices for casual chat; hybrid strategies are often best.
- Flat vs. hierarchical: flat is fine for <100 turns; long-term memory should be hierarchical (2–3 layers); trees suit knowledge-heavy scenarios with depth ≤5.
- Vector vs. graph: "content about X" → vector; "relations between X and Y" → graph; vector + lightweight graph is a pragmatic middle ground.
- Automatic vs. manual memory management: full automation for consumer apps; human review for enterprise; user-editable memory is a differentiator.
- Forgetting — the neglected dimension: most systems optimize remembering, not forgetting. Future directions include importance scoring, memory compression via merging, and joint time-decay/access-frequency models.
1.2 Memory Management
Five core operations:
1.3 Memory Storage
Organization:
Representation:
1.4 Information Retrieval
Part 2: The Ten Memory Schemes
2.1 A-MEM: Dynamic Knowledge Network
Inspired by Luhmann's Zettelkasten method, A-MEM gives memory "agency" — memories autonomously form links and evolve. New memories trigger structured note generation (context, keywords, tags), dynamic linking to semantically similar historical memories, and evolution of prior memory contexts. Suited to knowledge association-heavy scenarios like research assistants and knowledge management.
Paper: arXiv:2502.12110 | https://github.com/WujiangXu/AgenticMemory
2.2 MemoryBank: Human-like Forgetting
Based on the Ebbinghaus forgetting curve: memory strength decays over time, with important memories decaying more slowly. Designed for long-term AI companionship (the SiliconFriend chatbot), with dual-layer memory (short-term working + long-term storage) and personality understanding. First systematic import of cognitive science theory into LLM memory design.
Paper: arXiv:2305.10250 | https://github.com/zhongwanjun/MemoryBank-SiliconFriend
2.3 MemGPT: OS-inspired Virtual Context
Like OS virtual memory swapping data between RAM and disk, MemGPT intelligently swaps data between the limited context window and external storage. Features layered storage (fast context + slow persistent external store), OS-like interrupt mechanisms for control flow, and paging of long documents. Later evolved into the Letta framework.
Paper: arXiv:2310.08560 | https://github.com/letta-ai/letta
2.4 Mem0 / Mem0ᵍ: Scalable Memory Infrastructure
Designed for production-grade agents with a pragmatism-first principle. Manages user-, session-, and agent-level state; extracts and consolidates key information dynamically. The graph variant (Mem0ᵍ) captures complex relations as SPO triples. On LOCOMO, Mem0 reports 26% accuracy improvement over OpenAI's built-in memory, 91% lower p95 latency, and 90% fewer tokens.
Paper: arXiv:2504.19413 | https://github.com/mem0ai/mem0
2.5 MemoChat: Structured Memo Loop
A three-stage iterate loop — Memorization → Retrieval → Response — with template-structured memos and per-stage instruction tuning. Shows that well-designed training and structured memory let open-source models match commercial ones in long-range conversation.
Paper: arXiv:2308.08239 | https://github.com/LuJunru/MemoChat
2.6 Zep (Graphiti): Temporal Knowledge Graph
Graphiti is a time-aware knowledge graph engine that integrates unstructured dialogue and structured business data while maintaining relationship timelines. Achieves 94.8% on the DMR benchmark (vs. MemGPT's 93.4%), and on LongMemEval reports up to 18.5% accuracy improvement and 90% latency reduction. Ideal for tracking information evolution (CRM, medical records).
Paper: arXiv:2501.13956 | https://github.com/getzep/graphiti
2.7 MemTree: Dynamic Tree Memory
Formalizes hierarchical cognition: high-level nodes summarize multiple low-level details. A dynamic tree where each node holds aggregated text and semantic embeddings, adjusted adaptively by comparing new information with existing memory. Well suited to knowledge-intensive QA and multi-turn dialogue; retrieval cost grows non-linearly with tree depth.
Paper: arXiv:2410.14052
2.8 MemoryOS: Hierarchical Memory OS
Applies OS memory-management principles comprehensively with short/mid/long-term tiers: short→mid via conversation-chain FIFO; mid→long via segmented paging. Four modules (storage, update, retrieval, generation). Reports average F1 gains of 49.11% and BLEU-1 gains of 46.18% on LOCOMO over baselines.
Paper: arXiv:2506.06326 | https://github.com/BAI-LAB/MemoryOS
2.9 MemOS: Memory as a System Resource
The most ambitious abstraction: memory as a managed system resource. MemCube units encapsulate content and metadata (source, version) and support composition, migration, and fusion; unifies plaintext, activation, and parameter-level memory, bridging retrieval-augmented and parametric learning toward AGI infrastructure.
Paper: arXiv:2507.03724 | https://github.com/MemTensor/MemOS
Part 3: Systematic Comparison
Extraction strategies
| System | Strategy | Best for | |---|---|---| | MemoryBank | Direct archival | Full-context scenarios | | MemGPT | Direct archival (paged) | Very long documents | | A-MEM | Summarization (rich notes) | Knowledge management, research | | Mem0 | Summarization (facts + vectors) | General assistants | | Mem0ᵍ | Graph (SPO triples) | Relation-dense queries | | Zep | Graph (temporal KG) | Time-sensitive applications |
Direct archival is lossless but costly; summarization compresses but risks detail loss; graphs suit relational reasoning but depend on extraction quality.
Retrieval and multi-hop
Graph-based systems (A-MEM, Mem0ᵍ, Zep) natively support multi-hop reasoning; MemoChat's LLM-assisted retrieval offers flexible query understanding; MemoryBank's vector retrieval with time weighting has limited multi-hop support.
Part 4: Benchmarks and Key Findings
LOCOMO: 10 long conversations (avg. 27.2 sessions, 588.2 turns, ~9,000 tokens each, up to 16,000), 1,986 questions across single-hop, multi-hop, temporal, open-domain, and adversarial (unanswerable) categories.
LongMemEval: 500 curated questions over ~50.2 sessions (~115,000 tokens), evaluating information extraction, multi-session reasoning, knowledge updates, temporal reasoning, and abstention.
Key findings:
1. Tree/hierarchical storage wins: MemTree, MemoryOS, and MemOS outperform flat structures — mirroring the hierarchical organization of human memory. 2. Information completeness matters: systems retaining raw messages (MemoryOS) beat triple-only extraction (base Zep); over-simplification loses subtle semantics. 3. Memory linkage drives multi-hop reasoning: A-MEM's dynamic links, Mem0ᵍ's graph traversal, and Zep's temporal graph queries excel on multi-hop tasks. 4. Temporal reasoning is model-scale sensitive: ~35% accuracy with 7B models vs. ~70% with 72B — an emergent capability. 5. More tokens help, but coarser granularity doesn't necessarily hurt: aggregated memory units can outperform raw fragments. 6. Index scalability matters: MemTree's retrieval cost rises non-linearly with tree depth.
Performance highlights (as reported per paper; cross-paper comparison is indicative only):
| System | LOCOMO (F1) | LongMemEval (Acc) | Latency | Token savings | |---|---|---|---|---| | Mem0 | High | High | −91% | −90% | | Zep | Medium | High (+18.5%) | −90% | — | | MemoryOS | High (+49%) | — | — | — | | A-MEM | High | — | — | — |
Part 5: Design Trade-offs
Part 6: Future Directions
Short term (1–2 years): standardized memory APIs/protocols (e.g., MCP-style interoperability); convergence of memory and RAG into a unified context-enhancement layer; multimodal memory (image, audio, video).
Medium term (3–5 years): per-user personalized memory models; Memory-as-a-Service (MaaS) analogous to managed vector databases; federated memory for privacy-preserving distributed memory management.
Long term (5+ years): unification of memory and reasoning (retrieval as inference); true lifelong learning where memory accumulates skills (MemOS's vision); human–AI memory symbiosis.
Open challenges: memory reliability (hallucination, forgetting, confusion — a blocker for high-stakes uses); privacy, security, and right-to-be-forgotten; cross-system memory portability via standard exchange formats; and the ethics of what AI should remember or forget.
Conclusion
From MemGPT's virtual context management, to A-MEM's dynamic knowledge networks, to MemoryOS's hierarchical storage, researchers are exploring memory along multiple dimensions. The survey's counter-intuitive findings — tree structures beat flat ones, information completeness beats over-extraction, and coarser granularity doesn't necessarily hurt performance — provide valuable guidance for future design. Memory is becoming core AI infrastructure rather than an accessory; every advance in this field underpins more intelligent, more personalized AI experiences.
References
1. Wu, Y., et al. (2026). *Memory in the LLM Era: Modular Architectures and Strategies in a Unified Framework*. arXiv:2604.01707. 2. Xu, W., et al. (2025). *A-Mem: Agentic Memory for LLM Agents*. arXiv:2502.12110. 3. Zhong, W., et al. (2023). *MemoryBank: Enhancing Large Language Models with Long-Term Memory*. arXiv:2305.10250. 4. Packer, C., et al. (2023). *MemGPT: Towards LLMs as Operating Systems*. arXiv:2310.08560. 5. Chhikara, P., et al. (2025). *Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory*. arXiv:2504.19413. 6. Lu, J., et al. (2023). *MemoChat: Tuning LLMs to Use Memos for Consistent Long-Range Open-Domain Conversation*. arXiv:2308.08239. 7. Rasmussen, P., et al. (2025). *Zep: A Temporal Knowledge Graph Architecture for Agent Memory*. arXiv:2501.13956. 8. Rezazadeh, A. (2024). *MemTree: A Dynamic Tree-Structured Memory Representation for LLM Agents*. arXiv:2410.14052. 9. Kang, J., et al. (2025). *MemoryOS: A Hierarchical Memory Operating System for AI Agents*. arXiv:2506.06326. 10. Li, Z., et al. (2025). *MemOS: A Memory Operating System for Large Language Models*. arXiv:2507.03724. 11. Maharana, A., et al. (2024). *LoCoMo: Evaluating Very Long-Term Conversational Memory of LLM Agents*. arXiv:2402.17753. 12. Wu, D., et al. (2024). *LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory*. arXiv:2410.10813.
*This article is compiled from public academic papers and technical documentation, for research reference only.*