Letta (formerly MemGPT) is an open-source framework for building stateful AI agents with persistent memory. Born from the MemGPT research paper ("Memory-GPT") at UC Berkeley in 2023, it gives agents a memory hierarchy: core memory blocks stay in-context while external memory is stored in Postgres and loaded as needed. This lets agents remember conversations indefinitely without blowing up their context windows.
Key Features
- Memory Hierarchy: Core memory blocks in-context plus external memory in Postgres, loaded on demand — agents remember everything across sessions.
- Sleep-Time Compute: Agents process and store memories between conversations — memory reflection and agentic memory built in.
- Editable Memory Blocks: Memory blocks can be inspected and edited by tools, giving transparent state.
- Client-Server Architecture: Letta 2.0 splits the agent loop into a client library and a state server (letta-server) for multi-agent support.
- Self-Hostable: Deploy with Docker; REST API and Python SDK included.
- ADE (Agent Development Environment): Letta Cloud IDE for building agents visually.
- Managed Cloud: Letta Cloud for hosted agents with the same memory engine.
- Use Cases Proven: Personal AI companions, support agents, research assistants, and long-running autonomous agents.
Use Cases
Who Should Use This Tool?
- Memory-Critical Agents: Builders of assistants that must remember users, projects, and conversations over long periods.
- Self-Hosters: Teams that want their agent memory engine on their own infrastructure.
- Research & Companionship: Personal AI companions and research assistants needing persistent context.
Problems It Solves
- Context window limits: External memory means unlimited conversation history without context bloat.
- Session amnesia: Agents remember across sessions, not just within one.
- Memory transparency: Editable memory blocks make agent state inspectable.
Pricing
| Plan | Price | Features |
|---|---|---|
| Open Source | $0 | Apache-2.0 core; self-host the server with Docker. |
| Letta Cloud | Free + paid tiers | Hosted agents with persistent memory, no infrastructure to run. |
Advantages & Unique Selling Points
Compared to Competitors:
- Proven memory model: Backed by the MemGPT paper and years of agent-memory research.
- Self-hostable state server: Your agents' memory lives on your infrastructure.
- Sleep-time compute: Memory reflection that competitors lack.
What Makes It Stand Out:
- 15,000+ GitHub stars and a strong research pedigree.
- Editable, inspectable memory blocks.
- From self-hosted server to managed cloud in one stack.
Getting Started
Quick Start Guide
- Install:
pip install lettaor use the Docker image. - Start the server: Run letta-server (or use Letta Cloud).
- Create an agent: Use the Python SDK or ADE to define your agent with memory blocks.
- Chat: Your agent now remembers across sessions automatically.
Integration
Integrates with:
- Docker self-hosting
- Python SDK and REST API
- Letta Cloud and ADE
Frequently Asked Questions
How is Letta different from other agent frameworks?
Its core focus is persistent memory — the MemGPT memory hierarchy that survives sessions without context bloat.
Does it require a database?
Yes — external memory is stored in Postgres, giving durable, queryable agent memory.
Can I self-host it?
Yes — the server is open source and runs with Docker; Letta Cloud is the managed alternative.
Alternatives
If Letta isn't the right fit, consider these alternatives:
- LangGraph: Stateful orchestration with built-in memory via checkpoints.
- CrewAI: Role-based teams with delegation and memory.
- Google ADK: Google's framework with shared state across agent teams.
Tips & Best Practices
- Design memory blocks deliberately: What an agent should always remember belongs in core blocks.
- Use sleep-time compute: Let agents reflect and consolidate between conversations.
- Inspect memory via tools: Editable blocks give you transparency and control over state.
Conclusion
Letta is the framework that makes agent memory a solved problem — persistent, inspectable, and self-hostable, with the MemGPT research pedigree behind it. If your agents must remember across sessions and contexts, Letta is the most proven choice in the category.
Comments
No comments yet. Be the first to comment!
Related Tools
LangGraph
www.langchain.com/langgraph
LangChain's low-level agent orchestration framework and runtime for building, managing, and deploying long-running, stateful agents. Durable execution, human-in-the-loop, and comprehensive memory. 39,000+ GitHub stars.
OpenAI Agents SDK
openai.github.io/openai-agents-python
OpenAI's official framework for building production AI agents in Python and TypeScript. Agents, handoffs, guardrails, sessions, and built-in tracing — the successor to Swarm.
CrewAI
www.crewai.com
The leading multi-agent orchestration framework (Python). Define role-based agent teams — roles, goals, backstories — compose crews, assign tasks, and let agents collaborate. 30,000+ GitHub stars.
Related Insights
After I Connected Obsidian to OpenClaw, It Started Helping Me Make Decisions
Once Obsidian stopped being just a place to store notes and started working with OpenClaw, it began helping me organize context, connect information, and improve real decisions.
Stop Cramming AI Assistants into Chat Boxes: Clawdbot Picked the Wrong Battlefield
Clawdbot is convenient, but putting it inside Slack or Discord was the wrong design choice from day one. Chat tools are not for operating tasks, and AI isn't for chatting.
The Twilight of Low-Code Platforms: Why Claude Agent SDK Will Make Dify History
A deep dive from first principles of large language models on why Claude Agent SDK will replace Dify. Exploring why describing processes in natural language is more aligned with human primitive behavior patterns, and why this is the inevitable choice in the AI era.