Overview
Letta Code is a stateful agent harness from the team behind Letta (formerly MemGPT). Where most coding agents start every session from an empty context, a Letta Code agent carries memory, identity and a sense of experience over time. It learns over long horizons by rewriting its own memory blocks, skills, prompts and even the harness itself through mods, and the agents are designed to be self-configuring — the documentation's own advice is to ask the agent to change its skills, hooks or permissions rather than editing config by hand.
It can be driven interactively or left running as an always-on agent that works proactively. The same agent is reachable from a local CLI, a desktop app for macOS, Windows and Linux, a browser (including mobile) at chat.letta.com, and messaging integrations for Telegram, Slack and Discord, with a documented path for custom channels. Context — memory blocks included — is tracked in git through MemFS, so it can be synced to a GitHub repository you own.
Around that sit the features you would expect from a modern harness: skills loaded from global, project and agent scopes; built-in subagents (general-purpose, forked, recall, history-analyzer) that agents can call in the background, including calling other agents or themselves; hooks that run scripts at points in the agent loop; permission modes for auto-approval and auto-denial; and heartbeats and crons so agents can schedule their own work. Signing in to Letta Cloud adds remote computers — the harness runs on any connected machine while agent state stays in the cloud — and obfuscated secrets. The repository is Apache-2.0.
What it does
- Persistent memory blocks and skill learning, with /sleeptime for periodic consolidation, /doctor to audit memory quality and /palace to inspect it
- MemFS — all context tracked in git and syncable to your own GitHub repository
- Skills at three scopes (global ~/.letta, project .agents/skills, agent-scoped in MemFS) plus /skill-creator
- Built-in subagents (general-purpose, forked, recall, history-analyzer) and agent-to-agent calls
- One agent, many front ends: CLI, desktop app, browser and mobile, Slack, Telegram and Discord
- Hooks, permission modes, and self-managed crons and heartbeats
- Message search across all agents and conversations with /search
- Remote computers via Letta Cloud — run the harness on a laptop, a VM, GitHub Actions or a Mac Mini against the same agent state
Getting started
Letta Code installs from npm as a global CLI. A desktop app is available too, and agents created in one show up in the other.
Install the CLI
npm install -g @letta-ai/letta-codeRun it in your project
Start `letta` from the project directory. The tutorial personality is a good first agent.
cd my-project
letta
# or start with the guided agent
letta --new-agent --personality tutorialConnect a model provider
Run /connect inside the CLI to add your own API keys (OpenAI/ChatGPT, Anthropic, Z.ai coding plan and others), then /model to swap models mid-project.
/connect
/modelInstall a skill into an agent
letta skills install https://github.com/owner/repoRun the harness on another machine
With a Letta Cloud login, `letta server` registers a machine as a computer the agent can run on; messages can then be routed to it by name.
letta server --computer-name "work-laptop"
letta computers list --online-only
letta -p --agent <agent-id> --computer "work-laptop" "hello from that machine"Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Keep a coding agent's context, conventions and hard-won fixes across sessions instead of re-explaining them each morning
- Run an always-on agent that picks up work on a schedule and reports back over Slack or Telegram
- Move the same agent between a laptop, a VM and CI while its memory stays in one place
- Version an agent's context in git so memory changes are reviewable like code
How Letta Code compares
Letta Code alongside other open-source autonomous coding agents tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| opencode | ★ 206k | OpenCode is an open source AI coding agent that runs in your terminal, with built-in build and plan agents and an optional desktop app. |
| Claude Code | ★ 145k | Anthropic's agentic coding tool for the terminal, IDE and GitHub: it understands your codebase, executes routine tasks, explains code and handles git workflows from natural-language commands. |
| OpenAI Codex | ★ 123k | OpenAI's cloud and CLI coding agent that writes features, fixes bugs, and proposes code changes across a repo, running tasks in parallel. |
| Gemini CLI | ★ 107k | An open-source command-line AI agent from Google that connects your terminal to Gemini models for reading code, editing files, running shell commands, and searching the web. |
| Pi | ★ 103k | Minimal terminal coding agent harness with four built-in tools, extended through TypeScript extensions, skills and prompt templates instead of forks. |
| OpenHands | ★ 87k | An open-source AI software-development agent that plans tasks, edits files, runs commands, and tests code, usable from a terminal CLI, a local web GUI, or a Python SDK. |
| Cline | ★ 67.7k | Open-source coding agent that runs as a VS Code or JetBrains extension, a terminal CLI, or an embeddable Node SDK, editing code and running commands with human-in-the-loop approval. |
| Letta Code | ★ 3.2k | A stateful coding-agent harness whose agents keep memory, identity and skills across sessions — and rewrite them as they go |