MemGPT treats the context window as fast RAM and external stores as slow disk with the model as the OS; Letta exposes this through named memory blocks plus read, write, search, and edit tools the model invokes during
Imagine your desk holds only the papers you are actively using. Anything else lives in a filing cabinet across the room. A good worker pulls a file from the cabinet when they need it, puts notes back in the cabinet when they are done, and clears the desk when it gets cluttered. MemGPT proposes that an LLM should manage its own desk and cabinet system the same way: the desk is the context window, the cabinet is external storage, and the LLM decides what to pull, what to file, and what to throw away. Letta gives the LLM the actual tools to do this, open a drawer, write a note, search the cabinet, edit a tag.
Detailed answer & concept explanation~6 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
Start with the MemGPT paging metaphor and what each role maps to (RAM, disk, OS). Describe the named memory blocks (persona, human, archival, recall) and their semantic roles. Walk through the tool operations the model invokes to read, write, search, and edit. Explain how block size limits surfaced to the model trigger eviction decisions. Identify Letta as the 2026 framework that productionizes this design, and close with the architectural payoff: memory management becomes part of the trajectory and is debuggable as a sequence of tool calls.
Real products, models, and research that use this idea.
- The original MemGPT research demo (2023) shipped agents that maintained user facts across long sessions by self-managed paging
- Letta (2026) is used in autonomous-agent research and in some production assistants that need long-running memory
- Anthropic's 2026 memory tool for Claude exposes a similar set of memory operations as tools the model invokes
- LangGraph applications often borrow the named-block pattern, defining state slots with explicit semantic roles
- OpenAI's GPT-5.5 Assistants API offers a memory feature inspired by similar model-driven recall patterns
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does Letta's design hold up when a single agent serves many users?
QWhat makes the surgical replace tool better than an overwrite tool for memory edits?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Treating MemGPT as just a vector store with retrieval, missing that the key contribution is putting the model itself in charge of memory operations through explicit tool calls.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.