Drag each answer to line up with its matching prompt
Mem0
Sliding buffer of recent turns plus a running summary of older turns
Letta (formerly MemGPT)
LLM extracted user facts stored and retrieved per turn via a managed API
Zep
Typed state object that flows through nodes and supports checkpointing
LangGraph state
Temporal knowledge graph with dated facts that are invalidated, not deleted, and graph traversal at retrieval
LangChain ConversationSummaryBufferMemory
Per agent model context, optionally windowed to recent messages, that can be saved and loaded
AutoGen agent state
OS inspired memory blocks the model edits with explicit tool calls
Mem0 stores extracted facts; Letta has model-edited memory blocks; Zep is a temporal graph; LangGraph has typed checkpointed state; LangChain summary-buffer keeps recent turns plus a summary; AutoGen windows context.
Imagine six different librarians, each with a different way to remember what you have asked about. One writes sticky notes after every conversation and hands you the relevant ones the next time you walk in (Mem0). One has labeled drawers they open and rearrange themselves (Letta). One draws a family tree of facts with dates so they can tell you when something was true (Zep). One keeps your whole case file in a folder with named tabs and saves a copy at every step (LangGraph). One keeps the last few pages of notes plus a one-paragraph summary of everything older (LangChain). And one gives each helper a notebook that keeps only the latest pages and can be saved and reopened later (AutoGen). Same job, six designs.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Six common memory designs each start from a different core abstraction and target a different workload. Reading them as variants of the same vector store plus retrieval pattern misses the point. They differ in who manages memory, how time is modeled, what the storage unit is, and how the model fits into the loop.
Mem0: extracted facts behind a managed API
Mem0 starts from the observation that most useful long-term memory is declarative facts about the user: 'is vegetarian', 'lives in Berlin since July', 'prefers Python over JavaScript'. Raw dialogue is noisy; facts are what the next turn needs.
The design runs an LLM extraction pass over new messages and produces candidate facts. The Mem0 paper then compares each candidate with similar stored facts and has the LLM choose ADD, UPDATE, DELETE or NOOP. Retrieval at the next turn is vector search over the fact store.
The developer interface is small: m.add(messages, user_id=uid) and m.search(query, filters={'user_id': uid}, top_k=5). Extraction lives inside the library or the hosted platform. This is Mem0's main value proposition: long-term memory without an engineering project.
The trade-offs are opacity (you do not see why a fact was kept) and, on the hosted platform, dependency on the service. The extraction prompt can be replaced through the prompt argument of add(), but the pipeline shape is fixed. Mem0 fits products that want memory without becoming experts in extraction logic: personal assistants, consumer chat products, ambient AI features.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- Mem0 ships as an open-source Python library (mem0ai) and as a hosted platform, both built on the same add and search model
- The Letta V1 server implemented the MemGPT design with core blocks plus archival and recall search tools
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you combine LangGraph state with Mem0 in a production agent?
LangGraph state holds the working memory of the current trajectory (plan, tool results, summary). Mem0 holds cross-session user facts. Before each trajectory starts, fetch relevant Mem0 facts and put them in a persistent state slot. During the trajectory, do not write to Mem0 inside the loop. After the trajectory ends, run a single Mem0 extraction pass over the transcript. This keeps the orchestration layer and the long-term memory layer cleanly separated.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Treating all memory frameworks as variants of the same vector store plus retrieval pattern, missing that they differ in who manages eviction, how time is modeled, and where the model fits in the loop.
60 second bullets to scan on the way to the call.
Name Mem0's core abstraction (extracted facts behind a managed API)
Name Letta's lineage (MemGPT) and its core abstraction (OS-style memory blocks edited by the model)
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.