letta

Letta is the platform for building stateful agents: AI with advanced memory that can learn and self-improve over time.

21.8k
Stars
+368
Stars/month
10
Releases (6m)

Star Growth

+61 (0.3%)
21.3k21.8k22.3kMar 27Apr 1

Overview

Letta (formerly MemGPT) is a platform for building stateful AI agents with advanced memory capabilities that can learn and self-improve over time. Unlike traditional chatbots that reset after each conversation, Letta agents maintain persistent memory across interactions, allowing them to build context, learn from past experiences, and evolve their responses. The platform offers two main products: Letta Code, a CLI tool for running agents locally on your computer, and Letta API for integrating stateful agents into applications. Letta supports skills and subagents, enabling complex workflows and specialized capabilities. The platform is model-agnostic, working with various LLM providers, though it recommends Opus 4.5 and GPT-5.2 for optimal performance. With over 21,000 GitHub stars, Letta provides both TypeScript/Node.js and Python SDKs, making it accessible for developers building applications that require persistent AI memory and learning capabilities.

Deep Analysis

Key Differentiator

Purpose-built memory architecture that enables agents to self-improve over time — vs generic agent frameworks that only have short-term chat history

Capabilities

  • Stateful AI agents with persistent memory that self-improves over time
  • Memory blocks for structured agent context (human/persona/custom)
  • Full-featured agents API with Python and TypeScript SDKs
  • CLI tool (Letta Code) for running agents locally
  • Built-in web search and webpage fetching tools
  • Skills and subagents system for extensibility
  • Model-agnostic (supports OpenAI, Anthropic, and others)

🔗 Integrations

OpenAIAnthropic

Best For

  • Building long-running AI agents that learn from interactions
  • Applications requiring persistent context across sessions

Not Ideal For

  • Simple stateless chatbots
  • Cost-sensitive projects using only small models

Languages

PythonTypeScript

Deployment

npm install (CLI)pip install (SDK)Letta Cloud API

Pricing Detail

Free: Open source, free local CLI usage
Paid: Letta Cloud API key required for hosted usage

Known Limitations

  • Best performance requires frontier models (Opus 4.5, GPT-5.2)
  • Cloud API requires Letta API key
  • Memory management complexity increases with long-running agents

Pros

  • + Advanced persistent memory system that allows agents to learn and improve over time across sessions
  • + Dual deployment options with both local CLI tool and cloud API for different use cases and security requirements
  • + Model-agnostic architecture supporting multiple LLM providers with extensive SDK support for TypeScript and Python

Cons

  • - Requires Node.js 18+ for CLI usage, which may limit adoption in some environments
  • - API-based functionality requires API keys and cloud dependency for full feature access
  • - As a relatively new platform for stateful agents, may have a learning curve for developers new to persistent memory concepts

Use Cases

  • Building coding assistants that remember project context and learn from previous debugging sessions
  • Creating customer support agents that maintain conversation history and learn customer preferences over time
  • Developing personal AI assistants that evolve their responses based on user behavior patterns and feedback

Getting Started

Install the CLI with 'npm install -g @letta-ai/letta-code', run 'letta' in your terminal to launch a local agent, then start conversing to build memory and context over multiple sessions

Compare letta