Skip to main content
9 – 17 UHR +49 8031 3508270 LUITPOLDSTR. 9, 83022 ROSENHEIM
DE / EN
Coding agent Letta United States CLI, desktop, web

Letta Code

Letta Code is Letta's memory-first coding agent harness, with persistent, learning agents, memory blocks and sub-agents for terminal, desktop and web.

Licence Apache-2.0
First release December 2025
Interfaces Terminal (CLI), Desktop app (macOS, Windows, Linux), Web (chat.letta.com), Messaging (Telegram, Slack, Discord)
Platforms macOS, Linux, Windows

The seven building blocks in Letta Code

How Letta Code implements the building blocks of an AI harness

  1. 1

    Agent loop

    The Letta Code harness drives long-lived agents that continue the same ongoing conversation in the terminal via `letta`, in the desktop app, or at chat.letta.com, instead of restarting each session.

  2. 2

    Tools and execution environment

    Built-in coding tools, MCP servers (`/mcp`) and messaging channels such as Telegram, Slack and Discord give the agent access to code, systems and communication channels.

  3. 3

    Context management

    MemFS versions the entire context, including memory blocks, via git, per the documentation; `/memory-repository set git@github.com:...` syncs that context to your own repository.

  4. 4

    State and memory

    Agents programmatically rewrite their own system prompt via memory blocks and learn skills from experience; `/sleeptime` configures periodic consolidation ('dreaming'), and `/palace` shows the current memory contents.

  5. 5

    Permissions

    Four permission modes - `strict`, `standard`, `acceptEdits`, `unrestricted` - can be set via a flag or persistently in `.letta/settings.json` with allow/deny rules; a cross-agent memory guard protects other agents' memory even in unrestricted mode.

  6. 6

    Verification and feedback

    A hooks system - per the documentation, being phased out in favour of event-driven 'mods' - can intervene at ten lifecycle points such as PreToolUse or Stop, blocking commands or running custom check scripts.

  7. 7

    Orchestration

    Seven built-in subagents (including general-purpose, recall, reflection, history-analyzer) run as their own subprocess with their own context, per the documentation; any existing Letta agent can also be deployed as a subagent of another agent.

Models and model access

Which models the harness uses and how they are obtained

Models and model access
Models model-agnostic - freely choosable LLM per agent
Access routes Anthropic API, OpenAI API, Google Gemini, Mistral, DeepSeek, Amazon Bedrock, Azure OpenAI, Groq, Together AI, Hugging Face, Fireworks, Ollama, LM Studio, custom OpenAI-compatible endpoints
Free choice of model Yes
Custom endpoint / LLM gateway Yes
Custom OpenAI-compatible providers can be set up via `/connect` with a base URL and API key, as long as the endpoint supports chat completions and tool calling.
Features
MCP servers Sub-agents Hooks Skills Plugins / extensions Sandbox Headless / CI SDK Resume sessions
Running it with herdr
Supported by herdr Yes
State detection Screen manifest
Integration Session
Per herdr's support table, herdr detects Letta Code via the terminal screen manifest and provides session integration.
More about herdr →

Enterprise use

Data processing, controls and pricing model according to the vendor

Self-hosted server or Letta Cloud

Agents and their memory can run in Letta Cloud or on a fully self-hosted server (`letta server`); the harness itself is open source under Apache-2.0 and, per the documentation, runs on any connected machine, from a laptop to a GitHub Action.

Identity and access

Access to Letta Cloud, remote computers and secrets goes through sign-in (`/login`); the public documentation does not describe a standalone enterprise SSO for Letta Code itself.

Admin policies

Permission modes (`strict`, `standard`, `acceptEdits`, `unrestricted`) and project-wide allow/deny rules in `.letta/settings.json` control which tools run automatically.

Telemetry and context versioning

The public documentation makes no statement on telemetry or central usage-data collection at this point; MemFS optionally versions context in a git repository you choose, rather than at Letta.

Pricing model

The Letta Code harness is open source with no licence cost and can be used with your own API keys; Letta Cloud and extras such as remote computers or secrets require signing in with Letta, per the documentation.

Strengths
  • Long-lived, stateful agents with persistent memory instead of stateless one-off sessions
  • Self-improvement via memory blocks and automatically learned, reusable skills
  • Seven built-in subagents, plus any existing agent can be deployed as a subagent
  • MemFS fully versions context and memory via git, including to a repository you choose
  • Available as CLI, desktop app, web and messaging integrations sharing one agent state
  • Programmable via a dedicated TypeScript/JavaScript agent SDK for custom surfaces
Limitations
  • AgentFile export/import (.af) has been removed per the documentation, along with the migration paths it enabled
  • Many extras such as remote computers, secrets or cloud sync require signing in with Letta
  • No dedicated IDE plugin documented; access is via CLI, desktop app or browser

Use cases

Typical tasks for this harness

Persistent developer agents that learn project conventions across many sessions
Always-on agents that work proactively and can be reached via Slack or Telegram
Multi-agent setups where specialised agents call each other as subagents
Programmable, long-lived agents embedded in your own applications via the Letta Agent SDK

AI harnesses are the software layer that turns a language model into a working agent. Letta Code is Letta’s memory-first coding agent harness: instead of starting fresh every session, Letta Code agents carry persistent memory, learn skills from experience, and rewrite their own system prompt. As of 20 September 2026.

What is Letta Code?

Letta Code is developed by Letta, founded by the authors of MemGPT and the sleep-time compute approach (now called “dreaming”). The project is open source on GitHub at letta-ai/letta-code under the Apache-2.0 licence. The harness is installed via npm install -g @letta-ai/letta-code; afterwards, letta starts a session in the project directory, and letta --new-agent --personality tutorial starts a guided introduction. Besides the CLI, a desktop app for macOS, Windows and Linux and a web client at chat.letta.com are available, including on mobile.

Letta Code as an AI harness

The key difference from classic coding harnesses: agents are, per the documentation, long-lived and “more like people than tools.” They learn through memory blocks - building blocks of the system prompt that the agent itself reads and rewrites - and through learned skills from global (~/.letta), project-scoped (.agents/skills) and agent-owned sources. MemFS versions this entire context via git and can be synced to your own GitHub repository with /memory-repository set. For complex tasks, seven built-in subagents are available (general-purpose, fork, recall, reflection, history-analyzer, memory, init), which run as their own subprocess with their own context; any other existing Letta agent can also be deployed as a subagent. Four permission modes - strict, standard, acceptEdits, unrestricted - control which tool calls are auto-approved.

Models and model access

Letta Code is explicitly model-agnostic: /connect sets API keys for Anthropic, OpenAI, Google Gemini, Mistral, DeepSeek, Amazon Bedrock, Azure OpenAI and other providers, and /model switches the active model. For a custom endpoint, Letta Code documents support for OpenAI-compatible providers with a freely chosen base URL and API key, as long as that endpoint supports chat completions and tool calling. Model access can therefore generally be routed through a central proxy such as our AI Gateway by entering its OpenAI-compatible endpoint as the base URL.

Enterprise use: data protection and governance

Agents and their memory can either run in Letta Cloud or be fully self-hosted: letta server starts the Apache-2.0-licensed app server on any machine, from a laptop through a GitHub Action to your own VM. Permission modes and project-wide allow/deny rules in .letta/settings.json govern automated tool execution, and a cross-agent memory guard protects other agents’ memory stores. The public documentation makes no statement on telemetry or central usage-data collection at this point. Regardless of the deployment model: source code and conversation content go to whichever model provider is chosen - this belongs in your own records of processing activities in advance, particularly when using Letta Cloud rather than a self-hosted server.

Orchestrating Letta Code with herdr

herdr is a terminal runtime for several coding agents running at once. Per herdr’s documentation, it detects Letta Code through the terminal screen manifest and provides session integration through it, making Letta Code sessions visible alongside other supported harnesses in the same multi-agent overview.

Where it fits: developer harness and enterprise harness

Letta Code targets developers who want long-lived, learning agents in a terminal, an IDE-adjacent desktop app, or a browser. For business users across an entire company, CompanyGPT is the fitting harness: tools via MCP servers, context via companyRAG, roles from Entra ID or Keycloak, and audit logs. Our AI Gateway provides the shared cost and governance layer across different harnesses and model providers. You’ll find further agent harnesses in our harness overview. If you’d like to check how a memory-first agent like Letta Code fits into your development environment and data protection concept, we’re glad to help.

From developer harness to enterprise harness

Coding harnesses are tools for developers. Business users, cost control and governance need two more layers.

CompanyGPT – the harness for business users

CompanyGPT gives any language model tools via MCP servers, integrations and n8n, company knowledge via companyRAG, roles from Entra ID or Keycloak, and audit logs – operated in your Azure environment or sovereignly on STACKIT.

Discover CompanyGPT
AI Gateway – cost and governance for every agent

The AI Gateway bundles the model access of your tools and coding agents behind an OpenAI-compatible API: authentication via Entra ID, budgets and cost centres per team, user and agent, guardrails and complete logging.

View the AI Gateway

Frequently Asked Questions

What is Letta Code?

Letta Code is Letta's memory-first coding agent harness: agents are long-lived, retain memory and identity across sessions, and rewrite their own system prompt via memory blocks. It's usable via terminal, desktop app, browser and messaging integrations.

Is Letta Code open source?

Yes. The `letta-ai/letta-code` repository is licensed under Apache-2.0 according to GitHub, and the accompanying app server can also be self-hosted.

Which models does Letta Code support?

Letta Code is model-agnostic and, per the documentation, supports more than 35 providers, including Anthropic, OpenAI, Google Gemini, Mistral, DeepSeek, Amazon Bedrock and Azure OpenAI, plus custom OpenAI-compatible endpoints via `/connect`.

What are memory blocks in Letta Code?

Memory blocks are building blocks of the system prompt that a Letta Code agent reads and rewrites itself to permanently store project knowledge, conventions and preferences. They distinguish Letta Code from harnesses that restart with no stored memory every session.

Does Letta Code work with herdr?

Yes. herdr detects Letta Code through the terminal screen manifest and provides session integration for it within the multi-agent overview.

What is the difference between Letta Code and the Letta server?

Letta Code is the agent harness with terminal, desktop and web interfaces. The earlier standalone Letta server (formerly the MemGPT project) has, per the repository, since merged into the `letta-ai/letta-code` source, which now contains the harness, app server, channels and runtime together.

Introduce coding agents safely in your company

We support selection, model access in the EU, permission design and cost control.