Introduction: Why Do Agents Keep "Forgetting"?
When a conversation restarts, prior context vanishes; on complex tasks, the agent cannot recall decisions made three days ago; across multi-turn collaboration, important information slips away. This is not an "intelligence" problem but a structural flaw in memory architecture.
This topic series answers three core questions:
- What: What are the core design dimensions of AI memory systems?
- Why: What trade-offs drive different architectural choices?
- How: How do you pick the right memory solution for your Agent?
- Storage granularity: lossy summarization (MemPalace) ↔ hybrid (MAGMA) ↔ verbatim (RAG baseline) — trade-off: compression vs. precision, token cost vs. recall.
- Retrieval paradigm: vector search (semantic similarity) ↔ graph reasoning (relational inference) ↔ hybrid search (MAGMA-style).
- Temporal dimension: working memory (current session) → short-term (recent dialogues) → long-term (accumulated history), with lifecycle management (decay, persistence triggers, compression).
- Deployment: local-first (privacy/offline) ↔ cloud-synced (cross-device/sharing).
- Quick overview (~30 min): DNA Memory 2.0 → MAGMA vs. MemPalace comparison.
- Designing a memory system: DNA Memory 2.0 → MAGMA → comparison → Codebase-Memory. Decision checklist: exact recall vs. fuzzy association? Token cost a constraint? Cross-session context needed? Code/structured data involved?
- Optimizing an existing system: MAGMA (95% token reduction) → Claude Dream (industrial architecture) → Codebase-Memory (domain-specific techniques).
Article Navigation
Beginner · Building Concepts
| Article | Key Takeaway | Reading Time | |---|---|---| | DNA Memory 2.0 | Three-tier memory architecture (working / short-term / long-term) plus five core mechanisms: forgetting, decay, generalization, etc. | 15 min |Not all information deserves permanent storage — intelligent forgetting is part of memory design.
Advanced · Technical Depth
| Article | Key Takeaway | Reading Time | |---|---|---| | MAGMA: Volcanic Eruption of AI Memory | MAGMA's four-dimensional orthogonal graph architecture; layered abstraction + semantic boundaries achieve ~95% token reduction | 20 min | | Twin Stars of Memory: MAGMA vs. MemPalace | Design philosophy contrast between the academically rigorous MAGMA and the pragmatic MemPalace; no silver bullets | 25 min |Applied · Engineering Practice
| Article | Key Takeaway | Reading Time | |---|---|---| | Codebase-Memory | Tree-Sitter + knowledge graphs for codebase memory; a concrete ~90% token reduction implementation | 20 min | | Claude Code Leaked Source - Dream Memory System | Industrial-grade memory design: Dream's three-tier architecture and the KAIROS daemon | 15 min |Core Concept Map
Key Concepts Quick Reference
| Concept | One-line Explanation | Representative | |---|---|---| | Four-dimensional orthogonal graph | Organize memory by type × hierarchy × time × module for precise semantic boundaries | MAGMA | | Spatial metaphor | Memory as "rooms-corridors-buildings", leveraging human spatial memory | MemPalace | | Tree-Sitter knowledge graph | Parse code structure into a typed semantic graph | Codebase-Memory | | KAIROS daemon | Background process handling decay, archiving, compression | Claude Dream | | LongMemEval | Long-context memory benchmark; 96.6% represents current SOTA | MemPalace |Reading Path Guide
Open Questions
1. Where is the information boundary of memory compression? Is there an incompressible core information set? How to quantify the trade-off between forgetting loss and compute savings? 2. How to guarantee long-term memory "truthfulness"? Can repeated compression accumulate hallucinations? What verification mechanisms ensure accuracy? 3. Privacy vs. usability: Can we design "verifiable but opaque" shared memory? 4. Cross-agent memory sharing: Can agents with different architectures share or migrate memories? Is a standardized memory format needed? 5. Adaptive memory architecture: Can agents automatically select memory strategies (granularity, retrieval paradigm) by task type? 6. Human-AI hybrid memory: How should agent memory integrate with human externalized memory (notes, documents)?
The index is continuously updated; community contributions are welcome.