letta
Create LLM agents with long-term memory and custom tools
What it is and what it does
Letta is a framework for creating AI agents that maintain long-term memory and can be customized with tools and skills. It offers two main entry points: a local CLI tool (Letta Code, installed via npm) that runs agents on your machine, and a Python API (letta-client) for embedding stateful agents into applications. The framework handles agent state management, memory persistence, and tool integration, allowing agents to learn and adapt over time.
The package itself (letta) is the backend service and core framework, while letta-client is the Python SDK for API interaction. It supports multiple LLM models and is model-agnostic, though the documentation recommends specific models for optimal performance. The dependency footprint is substantial—69 runtime packages including integrations with Anthropic, OpenAI embeddings, LlamaIndex, and observability tools like Datadog—reflecting its role as a full-featured agent platform rather than a lightweight library.
Use it for:
- Build conversational AI assistants that remember user context and preferences across sessions.
- Create autonomous agents that can use web search, fetch webpages, and other tools to complete tasks.
- Integrate stateful LLM agents into existing applications via the Python SDK with persistent memory.
- Develop self-improving agents that learn from interactions and adapt their behavior over time.
- Run local AI agents in the terminal for coding assistance and task automation using Letta Code.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Letta is a framework for building LLM agents with persistent memory that can learn and improve over time, accessible both as a local CLI tool and through a Python API for integration into applications.
Yes, if you need a production-grade agent framework with memory management and tool integration. The active maintenance, permissive license, and low install friction support adoption. However, the large dependency tree and requirement for an external API key (for the cloud API) or Node.js 18+ (for the CLI) may be friction points. Start with letta-client if you only need the Python SDK; the full letta package is for running the backend service.
Install
letta on PyPI
pip
pip install lettauv
uv add lettapoetry
poetry add lettaInstalling letta
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with a recent release. Requires Python 3.11 or later and brings in a large dependency tree (69 runtime packages including anthropic, llama-index, and datadog), which may add setup complexity in constrained environments.
License in practice
Licensed under Apache License with permissive treatment, allowing commercial and private use with minimal restrictions.
Quickstart
pip install letta
from letta_client import Letta
import os
client = Letta(api_key=os.getenv("LETTA_API_KEY"))
agent = client.agents.create(
model="openai/gpt-5.2",
memory_blocks=[{"label": "human", "value": "Name: Alice"}],
tools=["web_search"]
)
response = client.agents.messages.create(
agent_id=agent.id,
input="What do you know about me?"
)
Requires a Letta API key (from app.letta.com) and Python 3.11 or later. The CLI tool also requires Node.js 18+ if using the Letta Code command-line interface.
Verify before relying
- Whether all 69 runtime dependencies are required for basic usage or if many are optional for specific integrations.
- Performance characteristics and latency when managing agent state and memory across requests.
- Compatibility details with specific LLM providers beyond the examples shown (Anthropic, OpenAI).
Package facts
| License | Apache License (permissive) |
| Python support | supports the current Python release (<3.14,>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 69 — aiofiles, aiomultiprocess, alembic, anthropic, apscheduler, async-lru, black, brotli, certifi, clickhouse-connect, colorama, datadog, datamodel-code-generator, ddtrace, demjson3, docstring-parser, exa-py, faker, fastmcp, google-genai, grpcio-tools, grpcio, html2text, httpx-sse, httpx, letta-client, llama-index-embeddings-openai, llama-index, markitdown, marshmallow-sqlalchemy |
| Maintenance | actively maintained — 92 days since the last release |
| First released | |
| Downloads | 148,733/month — #11,020 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: letta-0.16.8-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
letta-clientProvides a Python client library for the Letta…
permissive · top 15,000 on PyPI
fast-agent-mcpfast-agent-mcp is a CLI-first framework for…
permissive · top 15,000 on PyPI
memoriMemori is a Python SDK that automatically…
permissive · top 15,000 on PyPI
PraisonAIPraisonAI is a framework for building and…
permissive · top 15,000 on PyPI
praisonaiagentsPraisonAI agents is a Python framework for…
unclear · top 15,000 on PyPI
langmemLangMem provides memory management tools for…
permissive · top 15,000 on PyPI
llama-index-agent-openaiIntegrates OpenAI language models with…
permissive · top 5,000 on PyPI
deepagents-codeA terminal-based AI coding agent that works…
permissive · top 15,000 on PyPI
openai-agentsA framework for building multi-agent LLM…
permissive · top 1,000 on PyPI
deepagentsDeep Agents is an opinionated agent harness…
permissive · top 5,000 on PyPI