MemGPT — The Paper That Started Paged Agent Memory
MemGPT is the 2023 UC Berkeley paper and open-source project that introduced OS-style memory management to LLM agents. The project lives on today as Letta, but the ideas remain foundational.
What MemGPT introduced
The MemGPT paper argued that LLMs should manage their own context the way an operating system manages RAM: a small "main memory" that stays in-context at all times, plus a much larger "archival memory" that the model pages in and out via explicit function calls. When you read about "agent memory" today, you are reading about that abstraction, even if the library you use hides it.
In practice, the MemGPT codebase was renamed and upgraded to Letta in 2024. The memgpt Python package is no longer maintained; new projects should start with Letta directly. The original paper is still the best primer on why this architecture matters.
You’ll still see "MemGPT" in three places: academic citations, blog posts comparing memory approaches, and Letta’s agent types (Letta ships a MemGPTAgent preset that reproduces the paper’s exact behavior). Treat it as a historical name pointing to a family of ideas, and use Letta when you ship.
Quick Start — Use Letta’s MemGPTAgent
Agent type "memgpt_agent" applies the exact tool set from the paper: core_memory_append, core_memory_replace, archival_memory_insert, archival_memory_search, conversation_search, send_message. Use this when you specifically want the paper behavior; use agent_type="letta_agent" for Letta’s improved defaults.
# pip install letta-client
# MemGPT lives on inside Letta as the MemGPTAgent preset
from letta_client import Letta
client = Letta(base_url="http://localhost:8283")
# This reproduces the MemGPT paper's agent behavior
agent = client.agents.create(
name="memgpt-style",
agent_type="memgpt_agent", # paged memory with core + archival blocks
memory_blocks=[
{"label": "human", "value": "The user's name is unknown."},
{"label": "persona", "value": "You proactively update your own memory."},
],
model="openai/gpt-4o-mini",
embedding="openai/text-embedding-3-small",
)
resp = client.agents.messages.create(
agent_id=agent.id,
messages=[{"role": "user", "content": "Hi, I'm William."}],
)
# Watch the trace — the agent will call core_memory_replace("human", ...)
# on its own, updating working memory with the newly-learned name.
for m in resp.messages:
print(m.message_type, getattr(m, "content", None))Key Features
Paged memory architecture
Small in-context core memory + larger off-context archival memory. The LLM decides what to page in and out via function calls — no automatic background processes.
Self-editing core memory
The agent can overwrite its own persona and user description blocks. Classic use case: updating "the user lives in X" when the user mentions moving.
Archival memory search
Full-text and vector search over the archival tier. Returns snippets the agent can cite or promote to core memory.
Conversation recall
Separate from archival memory — the agent can search its own message history with conversation_search.
OSS legacy preserved
Letta keeps the MemGPT agent type for reproducibility and research comparisons. Papers citing MemGPT remain runnable today.
Foundation for later work
mem0, Zep, and LangMem all reference MemGPT in their design docs. Understanding the paper helps you reason about every modern memory library.
Comparison
| Status | How to use today | Maintained? | Best for | |
|---|---|---|---|---|
| MemGPT (paper)this | 2023 paper | Read + cite; runtime via Letta | No — superseded by Letta | Research grounding |
| Letta | Active OSS | pip install letta-client | Yes — active dev | Production paged-memory agents |
| mem0 | Active OSS | pip install mem0ai | Yes | Chatbot personalization |
| Zep | Active OSS + SaaS | pip install zep-python | Yes | Session-based apps |
Use Cases
01. Academic and research projects
When you need to reproduce or cite the original paper behavior exactly — use Letta’s memgpt_agent preset, cite both the paper and Letta, and you have a runnable reference implementation.
02. Understanding later memory libraries
Reading the paper (30 minutes) is the highest-leverage move when evaluating mem0 / Zep / Letta / LangMem. All of them define themselves partly in opposition to MemGPT.
03. Teaching agent architecture
The paged-memory metaphor is the clearest on-ramp for explaining why context windows aren’t a substitute for memory — perfect for workshops and onboarding docs.
Pricing & License
MemGPT paper: free on arXiv (2310.08560).
Legacy memgpt Python package: unmaintained since 2024. Do not use for new projects.
Letta (the successor project): Apache 2.0 open source, free self-host; managed Letta Cloud has usage-based pricing. See the Letta page for details.
Related Assets on TokRepo
Frequently Asked Questions
Should I pip install memgpt in 2026?+
No. The memgpt PyPI package is unmaintained. If you want MemGPT-style behavior, install letta-client and use agent_type="memgpt_agent" — that’s the supported path.
Is MemGPT still relevant if Letta exists?+
Yes, as ideas and as vocabulary. The paper is still the clearest articulation of "core vs archival" memory. Researchers cite it; vendors position against it. You won’t run it directly, but you’ll encounter the concepts constantly.
What did MemGPT actually prove?+
That an LLM can reliably manage its own context across indefinite conversations if you give it the right tools (read/write/search for working memory and archival memory). Before MemGPT, "long-term memory" for agents was ad-hoc prompt stuffing.
Is there a simpler alternative to MemGPT architecture?+
Yes — mem0 and Zep. Instead of having the agent explicitly manage memory via tool calls, they run a background extractor that decides what to save. Less transparent, fewer LLM turns, faster to ship. Trade-offs on both sides.
Where should I start if I have 30 minutes?+
Read the MemGPT paper abstract and §3 (the architecture section). Then install Letta and run the quick start above. You’ll have a working mental model for every "agent memory" library you encounter afterwards.