Letta

Framework · Last verified 2026-09-30

TL;DR

Letta (formerly MemGPT) is a stateful-agent platform from the company Letta, with agent memory kept in a git-backed file store that persists across conversations and machines. The letta-ai/letta repository is now a landing page: the V1 Python server is retired and current code lives in letta-code. It suits teams building long-lived assistants in TypeScript.

Key facts

Letta key facts. Data as of 2026-10-01.
Type Framework
Languages / SDKs TypeScript, Python
License Apache-2.0
Pricing model Open core
Orchestration pattern Supervisor
GitHub stars 24,985 (as of 2026-10-01)
GitHub forks 2,637
Last push 2026-09-10
Latest release 0.16.8
Repository letta-ai/letta
Website www.letta.com
Documentation docs.letta.com
Last verified 2026-09-30

Key features

  • MemFS: each agent's long-term memory is a git repository of Markdown files; files under system/ are loaded every turn, others are read on demand. (source)
  • Subagents run in their own subprocess with their own prompt, tools and model; seven built-in types plus custom ones defined as Markdown files in .letta/agents/. (source)
  • Background subagents and calling an existing stateful agent as a subagent by its agent_id. (source)
  • Dynamic workflows (Letta Cloud, CLI): the agent writes a short JavaScript script that fans work out to many subagents. (source)
  • Letta Agent SDK for JavaScript/TypeScript: create an agent once, then resume sessions against cloud, local or remote backends. (source)
  • SDK sessions can attach MCP servers over stdio, Streamable HTTP or legacy SSE. (source)
  • Hosted MCP server at api.letta.com/mcp lets other MCP clients create and message Letta agents. (source)
  • Self-hosting via a local runtime or the Letta App Server, with no Letta account required. (source)

Architecture and orchestration pattern

Pattern: Supervisor

The core is the Letta agent harness (also called Letta Code): a runtime that connects a model to the agent's persisted context, manages turns and executes a preset set of tools on the machine where it runs, with skills and mods as extension points. The CLI, desktop and web apps, App Server (WebSocket) and Agent SDK are different front ends to the same harness.

Multi-agent work is delegation from a main agent. It calls a subagent tool, the harness starts the subagent in a subprocess, and only the subagent's final message returns to the caller. Subagents can run in the background, can be existing stateful agents addressed by agent_id, and on Letta Cloud can be fanned out by an agent-written workflow script.

State belongs to the agent, not the process. Memory is MemFS, a git repository of Markdown files; every edit is a commit, and background "dreaming" subagents consolidate lessons from recent conversations. One agent can hold many conversations that share its memory. State lives either in Letta Cloud or in a local backend you run, independent of where tools execute.

Human in the loop

Tool approval is set by permission modes: standard asks before shell commands, edits and subagents, acceptEdits auto-approves file edits, strict asks before every call, and unrestricted (--yolo) skips prompts. The docs note the interactive CLI starts in unrestricted; Shift+Tab cycles modes. Allow and deny rules give per-pattern control. In the Agent SDK, a canUseTool callback can allow, deny, or edit a tool call (updatedInput) and can stop the turn (interrupt: true). Users can also teach memory with /remember. Messages sent through the hosted MCP server run without approval prompts.

Harnesses it can drive

Protocols

MCP, A2A and AG-UI support for Letta. See the full matrix.
ProtocolSupportNote
MCP Yes evidence
checked 2026-09-30
Client: Agent SDK sessions connect to stdio, Streamable HTTP and SSE MCP servers; Letta Cloud also runs a hosted MCP server (platform/hosted-mcp).
A2A Unknown
checked 2026-09-30
Searched docs llms.txt and pages, README, code and issues in letta-ai/letta and letta-ai/letta-code; 'A2A' there names internal agent-to-agent messaging, not the A2A protocol.
AG-UI Unknown
checked 2026-09-30
Searched docs, README, GitHub code search in letta-ai/letta-code for ag-ui / agui, and the AG-UI README integration list; nothing official found.

Best for

  • Assistants that must keep preferences and project knowledge across sessions, models and devices.
  • Terminal coding agents with git-versioned project memory and subagents. (shortlist)
  • TypeScript applications that embed long-lived agents through the Agent SDK. (shortlist)
  • Keeping agent state on your own machine or server, including local models via Ollama or LM Studio. (shortlist)

Not for

  • Python-first teams that want a native agent SDK (Python apps must speak the App Server WebSocket protocol).
  • Projects that depend on the retired Letta V1 Python server or its Docker images.
  • Short stateless tasks where durable agent memory brings no benefit.

Quickstart

npm install @letta-ai/letta-agent-sdk tsx

Install not yet verified by this site. What this means

import { LettaAgentClient } from "@letta-ai/letta-agent-sdk";

const client = new LettaAgentClient({ backend: "local" }); // state stays on this machine
const agentId = await client.createAgent({
  persona: "You are Scout, a teammate who keeps notes about this repository.",
  human: "The user wants short answers with file paths.",
});

await using session = client.createSession(agentId, {
  cwd: process.cwd(),
  permissionMode: "standard",
  canUseTool: async (toolName) =>
    toolName === "Bash" ? { behavior: "deny", message: "No shell in this demo" } : { behavior: "allow" },
});

await session.send("List the top-level folders and remember what each one is for.");
for await (const msg of session.stream()) {
  if (msg.type === "assistant") process.stdout.write(msg.content);
}

Common pitfalls

  • The local backend and the App Server need Node.js 22.19+ (the SDK runs Letta Code as a subprocess).
  • The cloud backend needs a LETTA_API_KEY; the local backend needs no account.
  • Python applications cannot use the Agent SDK and must talk to the App Server WebSocket protocol directly.
  • Local-only agents are stored on local disk; back up the MemFS repository yourself.
  • The interactive CLI starts in unrestricted permission mode; switch to standard to get approval prompts.
  • Older guides using the Python server packages or letta/letta Docker images target the retired V1 server.

Official quickstart

Pros

  • Memory is a git repository, so every memory edit has version history and can be inspected as plain Markdown. (source)
  • Can run with no Letta account: a local runtime or self-hosted App Server keeps agent state on your infrastructure. (source)
  • Per-call approval hook (canUseTool) can allow, deny, rewrite arguments or interrupt a turn. (source)
  • Works on both sides of MCP: SDK sessions consume MCP servers, and Letta Cloud exposes agents as an MCP server. (source)
  • Existing agents, with their own memory, can be reused as subagents by agent_id. (source)

Cons

  • The letta-ai/letta repository is only a landing page; its V1 Python server is retired and gets no fixes or security updates. (source)
  • The Agent SDK is JavaScript/TypeScript only; Python apps must implement the App Server WebSocket protocol themselves. (source)
  • The interactive CLI defaults to unrestricted mode, which runs tools without asking. (source)
  • The free cloud plan is limited to three stateful agents, and running agents in remote sandboxes is listed as a Pro feature. (source)
  • Dynamic workflows are documented for Letta Cloud only, not the local backend. (source)

Alternatives

FAQ

Is Letta the same project as MemGPT?

Yes. The README describes Letta as formerly known as MemGPT.

What happened to the letta-ai/letta repository?

It is now a landing page. The legacy V1 Python server sits on an archive branch, is retired and receives no security updates; current development is in letta-ai/letta-code.

Does Letta support MCP?

Yes, in both directions. Agent SDK sessions can attach stdio, Streamable HTTP or SSE MCP servers, and Letta Cloud hosts an MCP server that clients such as Claude Code can use to create and message Letta agents. A2A and AG-UI support were not found.

Is Letta free?

The code is Apache-2.0 and self-hosting needs no Letta account. Letta Cloud has a free plan limited to three stateful agents plus paid personal, team and usage-based API plans listed on the pricing page.

Which languages can I use with Letta?

The harness and Agent SDK target Node.js and TypeScript/JavaScript. The docs also mention Letta API client SDKs for TypeScript and Python that wrap the cloud REST API.

Sources

Unknown fields: protocols.a2a and protocols.agui are unknown: docs.letta.com llms.txt and pages, the READMEs, GitHub code and issue search in letta-ai/letta and letta-ai/letta-code, and the AG-UI README integration list show no official A2A-protocol or AG-UI support (letta-code uses 'A2A' for its own agent-to-agent messaging). GitHub numbers describe the letta-ai/letta landing repository, not letta-code.

Something wrong or out of date, or do you maintain Letta and want this page removed? Report a correction or request removal.