A hands-on lab about memory for AI agents: what to store, where to store it, and how to retrieve it. The diagram below maps agent memory into six technical levels, from the active context window up to cross-session reflection and self-editing policies.
High-level overview: https://mem.codedorf.dev
[ LEVEL 6: METACOGNITIVE / EVOLUTIONARY LAYER ]
│ Scope: Autonomous system-level adaptation (Cross-Session / Global)
│ Medium: Offline async batch jobs, reflection graphs, self-editing system instructions
│ Function: Synthesizes high-level principles from experiences; refines tool policies
│
▼ updates & prunes
[ LEVEL 5: PROCEDURAL / SKILL MEMORY ]
│ Scope: Behavioral patterns, execution workflows, tool schemas (Persistent)
│ Medium: System prompt registries, MCP tool catalogs, code execution sandboxes
│ Function: Encodes "how to do things" (few-shot patterns, task execution graphs)
│
▼ grounds & validates
[ LEVEL 4: SEMANTIC / DECLARATIVE MEMORY ]
│ Scope: Universal world knowledge, user entities, domain facts (Persistent)
│ Medium: Knowledge graphs (triplets), relational DBs, dense vector embeddings
│ Function: Encodes "what is true" independent of temporal sequence (e.g., user constraints)
│
▼ consolidates & indexes
[ LEVEL 3: EPISODIC / AUTOBIOGRAPHICAL MEMORY ]
│ Scope: Historical narrative, run traces, chronological interactions (Time-Anchored)
│ Medium: Append-only event logs, time-decayed vector stores, execution histories
│ Function: Encodes "what happened and when" (past failures, session logs, tool I/O)
│
▼ retrieves & compacts
[ LEVEL 2: SHORT-TERM / CONVERSATIONAL BUFFER ]
│ Scope: Active thread or multi-step task run (Session Scope)
│ Medium: Sliding message array, thread caches, recursive rolling summaries
│ Function: Tracks immediate dialogue continuity and the active task boundary
│
▼ loads into
[ LEVEL 1: WORKING MEMORY / SCRATCHPAD ]
Scope: Current forward pass / single step execution (Immediate)
Medium: Active Context Window (Tokens, Attention, KV Cache)
Function: Holds chain-of-thought, current tool inputs/outputs, and active sub-goals
How each system maps to the six levels. Deep dives live in mds/.
Legend: ● first-class, ◐ partial or possible with work, - not built in.
| System | Type | L1 | L2 | L3 | L4 | L5 | L6 | Storage and retrieval | Best for |
|---|---|---|---|---|---|---|---|---|---|
| Memanto | Memory agent | - | - | ◐ | ● | - | ◐ | Local vector store, typed facts | Low-ops factual memory |
| Mem0 | Memory layer | - | ◐ | ◐ | ● | - | ◐ | Vector plus optional graph | Drop-in personalization |
| Zep | Temporal KG platform | - | ◐ | ● | ● | - | - | Bi-temporal knowledge graph | Facts that change over time |
| Letta | Agent runtime | ● | ● | ● | ● | ◐ | ◐ | Core blocks, archival, database | Self-editing long-lived agents |
| MemOS | Memory OS | ● | ● | ● | ● | ● | ◐ | MemCube over vector, graph, KV, LoRA | Fleet-scale memory infra |
| TencentDB Agent Memory | Team memory hub | ● | ● | ● | ● | ● | ◐ | SQLite plus sqlite-vec and files | Local and team agents |
| LangMem | SDK | ◐ | ◐ | ● | ● | ● | ◐ | Bring your own store | LangGraph apps |
| Cognee | Graph memory engine | - | - | ◐ | ● | - | ◐ | Graph plus vector plus relational | Document and enterprise KG |
| Graphiti | Temporal KG library | - | - | ● | ● | - | - | Neo4j, FalkorDB, Kuzu, Neptune | Custom temporal graph |
| A-MEM | Research system | - | - | ● | ● | - | ◐ | ChromaDB plus linked notes | Adaptive note networks |
| MemoryOS | Research system | ● | ● | ● | ● | - | ◐ | Tiered local store | Personalized long dialogs |
| HippoRAG | Retrieval framework | - | - | ◐ | ● | - | - | Graph plus Personalized PageRank | Multi-hop document QA |
| Memobase | Profile backend | - | ◐ | ● | ● | - | - | Postgres plus Redis | Consumer chat profiles |
| Supermemory | Memory API | - | ◐ | ● | ● | - | ◐ | Graph plus vector, one store | Product memory and RAG |
| MemMachine | Memory layer | ● | ● | ● | ● | - | - | Client-server episodes and profile | Ground-truth recall |
Licenses, hosting, and papers:
| System | License | Hosting | Paper |
|---|---|---|---|
| Memanto | MIT | Local | arXiv:2604.22085 |
| Mem0 | Apache-2.0 | Cloud or self-host | arXiv:2504.19413 |
| Zep | Apache-2.0 (Graphiti) | Cloud, engine self-host | arXiv:2501.13956 |
| Letta | Apache-2.0 | Cloud or self-host | MemGPT, arXiv:2310.08560 |
| MemOS | Apache-2.0 | Cloud or self-host | arXiv:2507.03724 |
| TencentDB Agent Memory | MIT | Local | none |
| LangMem | MIT | Library | none |
| Cognee | Apache-2.0 | Cloud or self-host | none (used in arXiv:2505.24478) |
| Graphiti | Apache-2.0 | Self-host | Zep paper |
| A-MEM | MIT | Local | arXiv:2502.12110 |
| MemoryOS | Apache-2.0 | Local | arXiv:2506.06326 |
| HippoRAG | MIT | Library | arXiv:2405.14831 |
| Memobase | Apache-2.0 | Cloud or self-host | none |
| Supermemory | MIT | Cloud or self-host | none |
| MemMachine | Apache-2.0 | Cloud or self-host | arXiv:2604.04853 |
Benchmarks are labeled in each deep dive as paper results or vendor claims. Harnesses differ, so do not compare scores across papers without checking the setup.
- mds/ - technical deep dives on individual memory systems
- lab/ - the hands-on lab: does memory make the second run better?
- INTENT.md - project intent and roadmap
- docs/index.html - high-level overview published on GitHub Pages