Agents that keep state, formerly MemGPT
Letta is a framework for building stateful agents: agents that run as a long-lived service and accumulate memory across sessions, rather than starting fresh on every call. It is the project formerly known as MemGPT, and that lineage is the key to understanding it. The MemGPT idea was to treat an LLM’s context like an operating system manages memory, paging information in and out so an agent can hold far more than fits in a single context window. Letta is that idea built into a production framework. At 23,354 stars as of 2026-06, it is a leading option for memory-centric agents.
Where a memory layer like Mem0 is something you add to your own agent, Letta wants to be the agent runtime itself.
What it does
Letta agents have layered memory: core memory holds the immediately relevant context, and archival memory is a larger, vector-backed store the agent searches when it needs older information. The agent decides what to move between them, which is the MemGPT mechanism. You interact through Letta Code (a terminal agent), the Letta API (REST plus Python and TypeScript SDKs for building agents into apps), and the Agent Design Editor, a visual GUI for configuring agents. It is model-agnostic, working with hosted models and self-hosted vLLM or Ollama.
Install
The quickest start is the CLI:
npm install -g @letta-ai/letta-code
letta
For building into an app, install the client SDK (pip install letta-client or the npm equivalent) and point it at Letta Cloud or your own server. Self-hosting runs a server backed by PostgreSQL with pgvector, available via Docker, which is a heavier setup than the CLI implies.
Self-hosted versus Letta Cloud
This is the trade-off to weigh before committing. Letta Cloud is the managed path: full features, quick to start, with the visual editor working out of the box. Self-hosting gives you control and keeps data in-house, but it is a real operation: PostgreSQL with pgvector, server configuration, and authentication, and the issue tracker shows a feature parity gap where some capabilities (and a smoothly working visual editor) lag behind the cloud. So pick self-hosting for control and privacy, accepting the setup cost and occasional feature lag, or Cloud for the complete, frictionless experience.
Where it fits, and where it doesn’t
Letta suits you when you want agents that genuinely persist and improve over long-running use, when the OS-style memory model fits your problem, or when you want a framework that owns the agent lifecycle rather than a library you wire together. The CLI makes trying it easy.
The friction is real for self-hosting: the PostgreSQL-plus-pgvector requirement and configuration raise the bar, the self-hosted feature set trails the cloud, and the framework imposes its own model of how an agent works, which is more to learn than a thin memory layer. If you just want to add memory to an existing agent without adopting a framework, Mem0 is the lighter choice.
letta versus the alternatives
| Letta | Mem0 | LangChain-style memory | |
|---|---|---|---|
| Stars | 23,354 | 58,664 | n/a |
| Shape | stateful-agent framework | agent-agnostic memory layer | memory inside a framework |
| Memory model | core plus archival (MemGPT) | user, session, agent scopes | conversation buffer or store |
| Commitment | owns the agent lifecycle | drops into any agent | tied to that framework |
| Hosting | self-host or Letta Cloud | self-host or Mem0 Platform | your own |
Counts are from GitHub as of June 2026. Mem0 is the lighter, agent-agnostic memory layer you add to an existing agent. Framework-bundled memory ties you to that framework’s model. Letta’s distinct bet is the MemGPT memory OS as the foundation of the agent itself, which is more powerful and more of a commitment.
The star curve
The star curve carries the MemGPT legacy: an early surge when the memory-OS paper and demo caught fire, then sustained growth after the rename to Letta and the build-out into a real framework with a CLI, API, and cloud. The shape reflects a research idea that matured into a product.
What the issue tracker warns you about
The recurring issues cluster around self-hosting. The self-hosted server can lag the cloud on features, and the visual editor has had trouble running against a self-hosted backend. Authentication for the self-hosted server and CLI integration has been fragile in some configurations. Model context-limit handling has hard-coded fallbacks that can misjudge an unknown model. And memory export and import, important for portability, has been a work in progress. None of these block the cloud path; they are mostly the cost of running it yourself.
Related
For a lighter, agent-agnostic memory layer, see Mem0. For the agents you might give long-term memory, see cline and OpenHands. For the document side of retrieval, see docling. For what is trending, see LLM tooling, the daily digest, and the weekly report.
FAQ
Is Letta the same as MemGPT? Yes. Letta is the project formerly known as MemGPT, renamed as it grew from a research idea into a production framework. The core memory-OS mechanism is the same.
Letta vs Mem0, which should I use? Letta is a full stateful-agent framework that owns the agent lifecycle, with MemGPT-style core and archival memory. Mem0 is a lighter memory layer you add to any agent. Choose Letta to build on its framework, Mem0 to add memory to an existing stack.
Should I self-host Letta or use Letta Cloud? Cloud is fully featured and quick to start, with the visual editor working out of the box. Self-hosting gives control and keeps data in-house but requires PostgreSQL with pgvector and configuration, and some features lag the cloud. Choose by whether control or convenience matters more.
How does Letta’s memory work? Agents have core memory for immediately relevant context and archival memory, a larger vector-backed store searched for older information. The agent moves information between them, which is the MemGPT memory-OS mechanism.
Which models does Letta support? It is model-agnostic, working with hosted models (such as Claude and GPT) and self-hosted options via vLLM or Ollama. Note that context-limit handling has hard-coded fallbacks for unknown models, so verify limits for a model the framework does not recognize.