Letta
Open-source platform for stateful agents with long-term memory, Letta Code local CLI agents, hosted Letta API agents, Python and TypeScript clients, skills, subagents, custom tools, MCP dependencies, and persistent agent state.
Open the source and read safety notes before installing.
Safety notes
- Letta is designed for persistent stateful agents; memory blocks, agent state, skills, subagents, and tool outputs can influence future behavior long after the original request.
- Letta Code runs agents locally in a terminal context and can be used for coding and computer tasks; scope file access, command execution, network access, and approvals before use.
- Custom tools, web search, fetch tools, MCP dependencies, sandbox integrations, external-tools extras, and subagents can mutate external systems or retrieve sensitive data if misconfigured.
- Hosted Letta API usage requires API-key handling, data-retention review, access control, workspace separation, and auditability before production user data is stored.
- Long-term memory should have explicit update, correction, deletion, export, and review paths so stale or sensitive memories do not silently persist.
Privacy notes
- Agent memory, memory blocks, persona data, user profile data, prompts, messages, tool arguments, tool outputs, files, traces, logs, API responses, and subagent state may contain sensitive personal or business data.
- Do not store secrets, private credentials, regulated records, private repository content, customer data, or sensitive personal attributes in persistent memory unless the retention and access policy allows it.
- When using hosted Letta, Letta Code, MCP dependencies, external tools, provider APIs, databases, telemetry, or cloud sandboxes, review where data is sent, stored, retained, and deleted.
- If agents self-improve or update memory automatically, add review and rollback controls for incorrect, stale, private, or user-contested memories.
Prerequisites
- Python 3.11 or newer for the open-source `letta` package, or Node.js 18+ for Letta Code workflows.
- A decision between local Letta Code, local/self-hosted Letta server, and hosted Letta API usage.
- Letta API credentials or local server credentials when using hosted or API-backed agents.
- A model/provider configuration for the selected Letta route, plus any required OpenAI, Anthropic, Google, Mistral, Bedrock, or local-model credentials.
- A memory and retention policy for user profile data, persona data, agent state, tool outputs, files, skills, subagents, traces, and logs.
Schema details
- Install type
- cli
- Troubleshooting
- No
- Scope
- Source repo
- Estimated setup
- 30 minutes
- Difficulty
- intermediate
- Website
- https://docs.letta.com/
- Pricing
- free
- Disclosure
- editorial
- Application category
- DeveloperApplication
- Operating system
- Cross-platform
Full copyable content
pip install lettaAbout this resource
Overview
Letta is an open-source platform for stateful agents with long-term memory. It supports local terminal agents through Letta Code, API-backed agents through Letta's hosted or self-hosted agent API, Python and TypeScript clients, memory blocks, custom tools, skills, subagents, and persistent agent state.
Use it when a project needs agents that remember user, persona, task, or environment context across sessions rather than treating every chat as stateless. It is especially relevant for long-term memory, MemGPT migration, stateful agents, local coding agents, API agents, skills, and subagents searches.
Install
For the open-source Python package:
pip install letta
The repository also points Letta Code users to the Node-based CLI:
npm install -g @letta-ai/letta-code
For hosted Letta API clients, the docs use @letta-ai/letta-client for
TypeScript and letta-client for Python. Choose the local, self-hosted, or
hosted path deliberately because persistence and data handling differ.
Agent Capabilities
| Area | Letta Coverage |
|---|---|
| Stateful Agents | Long-term memory, memory blocks, persona/user state, and persistent agent state |
| Local CLI | Letta Code terminal agents for local coding and computer workflows |
| API Agents | Hosted or self-hosted Letta API, Python client, TypeScript client, and agent message APIs |
| Skills and Subagents | Letta Code skills, subagents, and bundled reusable capabilities |
| Tools | Custom tools, web search, fetch tools, MCP dependencies, and external-tool extras |
| Storage and Runtime | Python server package, database dependencies, optional Postgres/Redis/Pinecone/SQLite extras, telemetry, and sandbox extras |
| Provider Support | OpenAI, Anthropic, Google, Mistral, Bedrock, realtime, local/self-hosted routes, and related provider dependencies |
MCP Fit
Letta is relevant to MCP and skills searches because its Python package depends on MCP packages and its model centers on persistent agents that can use tools, skills, and subagents over time. That makes memory governance more important than in a one-shot tool-calling framework.
If a Letta agent can call MCP tools or custom tools, the tool results can become part of persistent agent context. Keep tool permissions, memory update rules, and deletion flows aligned so sensitive results do not become durable memory by accident.
Use Cases
- Build agents that maintain long-term memory across sessions.
- Run local Letta Code agents with skills and subagents.
- Integrate stateful agents into an application through the Letta API.
- Store user, persona, project, or task context in explicit memory blocks.
- Build custom tools that interact with a persistent agent state.
- Compare Letta's memory-first model with stateless agent frameworks.
- Prototype MemGPT-style long-lived agents with local or hosted deployment choices.
Source Review
Verified on 2026-06-18:
- The upstream repository identifies Letta as formerly MemGPT and describes it as AI with advanced memory that can learn and self-improve over time.
- The docs cover Letta Code, Letta API quickstart paths, skills, subagents, and API usage.
pyproject.tomldeclares thelettapackage, Apache licensing, Python>=3.11,<3.14, thelettaCLI script,letta-client, MCP dependencies, OpenAI/Anthropic/Google/Mistral/Bedrock dependencies, database extras, external-tool extras, server extras, telemetry, and sandbox-related extras.- PyPI resolves package metadata for
lettaversion0.16.8.
Safety and Privacy
Letta's central feature is durable memory, so the main safety question is not only what an agent can do now, but what it will remember and reuse later. Define memory schemas, retention, user correction, deletion, export, and audit paths before storing real user or customer data.
For local Letta Code agents, treat terminal access, file access, tools, skills, subagents, and network access as high-impact capabilities. For hosted Letta API agents, review API keys, workspace access, provider routes, data retention, and third-party processing before sending production data.
Duplicate Check
Checked current content/tools/, content/agents/, content/mcp/,
content/skills/, guides, open pull requests, and repository-wide content for
letta-ai/letta, Letta, MemGPT, Letta Code, Letta API agents, Letta skills,
Letta subagents, stateful agents, and long-term agent memory. Existing entries
cover vector stores, memory MCP servers, and adjacent agent frameworks, but no
dedicated Letta tools entry, exact source URL duplicate, target file, or open
duplicate PR was found.
Source citations
Add this badge to your README
How it compares
Letta side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.
| Field | Letta Open-source platform for stateful agents with long-term memory, Letta Code local CLI agents, hosted Letta API agents, Python and TypeScript clients, skills, subagents, custom tools, MCP dependencies, and persistent agent state. Open dossier | DeerFlow ByteDance long-horizon super-agent harness for research, coding, creation, subagents, skills, memory, sandboxes, MCP server support, messaging channels, LangGraph workflows, and Docker or local development. Open dossier | Hermes Agent Nous Research AI agent with terminal UI, messaging gateway, skills, memory, MCP integration, scheduled automations, subagents, terminal backends, OpenClaw migration, model switching, and persistent cross-session workflows. Open dossier | LibreChat Self-hosted AI chat and agent platform with LibreChat Agents, MCP support, reusable Skills, Subagents, Code Interpreter, web search, artifacts, multi-provider model routing, secure multi-user auth, and Docker Compose deployment. Open dossier |
|---|---|---|---|---|
| Trust | ||||
| Install risk | Review first | Review first | Review first | Review first |
| Notes | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ |
| Category | tools | tools | tools | tools |
| Source | source-backed | source-backed | source-backed | source-backed |
| Author | Letta | ByteDance | Nous Research | LibreChat |
| Added | 2026-06-18 | 2026-06-18 | 2026-06-18 | 2026-06-18 |
| Platforms | CLI | CLI | CodexCLI | CLI |
| Source repo | — | — | — | — |
| Safety notes | ✓Letta is designed for persistent stateful agents; memory blocks, agent state, skills, subagents, and tool outputs can influence future behavior long after the original request. Letta Code runs agents locally in a terminal context and can be used for coding and computer tasks; scope file access, command execution, network access, and approvals before use. Custom tools, web search, fetch tools, MCP dependencies, sandbox integrations, external-tools extras, and subagents can mutate external systems or retrieve sensitive data if misconfigured. Hosted Letta API usage requires API-key handling, data-retention review, access control, workspace separation, and auditability before production user data is stored. Long-term memory should have explicit update, correction, deletion, export, and review paths so stale or sensitive memories do not silently persist. | ✓DeerFlow orchestrates subagents, skills, memory, sandboxes, file-system access, bash access, MCP server support, messaging integrations, and model-provider calls; review each enabled capability before using real projects. The setup wizard can write model keys to `.env` and generate `config.yaml`; keep secret-bearing files out of commits, screenshots, prompts, and support issues. Sandbox and file-write settings determine whether agents can execute code, write files, run bash commands, or use containerized environments. Keep destructive and write-capable tools disabled until reviewed. MCP server and messaging channel modes can expose agent workflows to other clients or chat systems; bind endpoints carefully and restrict users, tokens, and allowed tools. Production Docker mode starts long-running services; size the host, persistence, network exposure, logs, and backup strategy before sharing it with a team. | ✓Hermes Agent can run tools, shell commands, terminal sessions, scheduled jobs, subagents, skills, MCP servers, messaging gateways, and remote backends; review permissions before using it on sensitive systems. The README documents one-line shell installers for some platforms. Inspect installer scripts and prefer isolated package installs or disposable environments when evaluating the agent. OpenClaw migration can import settings, memories, skills, command allowlists, messaging settings, API keys, audio assets, and workspace instructions; use dry-run and non-secret presets before migrating real profiles. Scheduled automations and messaging gateways can run unattended and deliver results to external chat systems, so restrict allowed users, home directories, credentials, and write-capable tools. Terminal backends such as local shell, Docker, SSH, Singularity, Modal, and Daytona can touch local files, containers, remote hosts, cloud sandboxes, and GPU infrastructure. | ✓LibreChat can combine agents, MCP servers, Skills, Subagents, file search, web search, Code Interpreter, OpenAPI actions, functions, and custom endpoints; each connected tool needs explicit permission review. The Docker Compose file starts application, MongoDB, MeiliSearch, pgvector, and RAG API services and mounts `.env`, uploads, logs, images, and skill directories. Review volumes and secrets before exposing the instance. Code Interpreter is designed for sandboxed execution, but uploaded files, generated code, network access, and language runtimes still need isolation and quota controls. MCP servers can expose read/write tools from local or remote systems. Start with read-only servers, restrict tool scopes, and review logs before enabling account, filesystem, database, browser, or infrastructure actions. Multi-user auth, sharing, presets, agents, and prompt libraries can leak capabilities between users if roles, groups, and admin settings are misconfigured. |
| Privacy notes | ✓Agent memory, memory blocks, persona data, user profile data, prompts, messages, tool arguments, tool outputs, files, traces, logs, API responses, and subagent state may contain sensitive personal or business data. Do not store secrets, private credentials, regulated records, private repository content, customer data, or sensitive personal attributes in persistent memory unless the retention and access policy allows it. When using hosted Letta, Letta Code, MCP dependencies, external tools, provider APIs, databases, telemetry, or cloud sandboxes, review where data is sent, stored, retained, and deleted. If agents self-improve or update memory automatically, add review and rollback controls for incorrect, stale, private, or user-contested memories. | ✓Prompts, research queries, source files, generated reports, memory entries, skills, sandbox artifacts, model responses, web search results, MCP payloads, chat messages, logs, and config files may contain sensitive data. Configured model providers, web search providers, messaging platforms, MCP clients, sandbox services, and observability integrations may receive task data depending on enabled features. Claude Code and Codex CLI provider routes may read local auth files or OAuth tokens according to configuration; do not expose those files to the app unless that path is intended. Define retention, deletion, workspace separation, and export policies before using DeerFlow with customer data, private repositories, regulated documents, or production credentials. | ✓Conversation history, memory files, user profiles, skill outputs, session search indexes, tool arguments, tool results, model responses, gateway messages, audio transcripts, and logs may contain sensitive data. Model providers, messaging platforms, search/image/TTS/browser tool gateways, MCP servers, and remote terminal backends may receive prompts, files, commands, account identifiers, or generated outputs depending on configuration. OpenClaw migration may copy memories, persona files, skills, API keys, messaging settings, command allowlists, TTS assets, and workspace instructions into the Hermes profile. Keep provider keys, bot tokens, OAuth grants, migrated secrets, workspace paths, generated summaries, and session search data out of public prompts, screenshots, issues, and examples. | ✓Chats, prompts, file uploads, image inputs, tool calls, MCP payloads, Skills, Subagent transcripts, Code Interpreter files, RAG chunks, embeddings, message search data, logs, and exports may contain private data. Model providers, rerankers, search providers, MCP servers, custom endpoints, storage services, and analytics integrations may receive user content depending on configuration. Keep `.env`, model keys, OAuth secrets, LDAP settings, MongoDB data, MeiliSearch indexes, pgvector data, upload folders, logs, and generated artifacts out of public repos and screenshots. Before using shared agents or marketplace-style workflows, define who can view prompts, files, agent configs, Skills, MCP server definitions, and conversation exports. |
| Prerequisites |
|
|
|
|
| Install | | | | |
| Config | — | — | — | — |
| Citations | ||||
| Claim | Unclaimed | Unclaimed | Unclaimed | Unclaimed |
Signals
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.