letta-ai/letta-code
A stateful coding-agent CLI with Git-tracked memory that persists across sessions
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Letta Code is a stateful TypeScript coding-agent harness with a letta executable, an interactive terminal interface, and a headless invocation mode. In Cloud mode, Letta holds agent identity, memory, and conversation history while the runner executes turns on a workstation, a registered remote computer, or a managed sandbox. This separation lets the same agent resume on another runner. A local backend is selectable, but its storage topology is not specified here.
The package includes @letta-ai/letta-agent-sdk and @letta-ai/letta-client for Letta integration, React and Ink for terminal UI, and node-pty and @vscode/ripgrep for local terminal and search work. Both @modelcontextprotocol/client and @modelcontextprotocol/sdk are dependencies; that does not establish a specific MCP server mode or transport. Extensions include scoped skills, harness mods, and custom channels under src/channels/.
Key Capabilities & Differentiators
Agent learning here changes persistent context: the agent can rewrite prompt context through memory blocks and update reusable skills. MemFS tracks that context in Git and can sync it to a custom GitHub repository, so operators can review changes rather than relying on conversation transcripts alone. /sleeptime configures periodic memory work, /palace inspects memory, and /search searches messages across agents. General-purpose, forked, and recall subagents can run in the background.
Use /connect to configure model access, with options including OpenAI/ChatGPT, Anthropic, and a Z.ai coding plan; use /model to switch models. The same agent can be reached through the CLI, the browser, Slack, Telegram, Discord, or a custom channel. AgentFile (.af) import and export have been removed. Memory import/export and conversation transcript export remain available, but they are not a drop-in replacement for moving a whole agent as an .af file.
Trade-offs & Limitations
Compared with a session-scoped coding CLI, Letta Code can carry repository conventions and lessons forward without reloading the same instructions every session. The cost is another mutable input to debug: the same task can behave differently after memory or skill changes. Review MemFS diffs and keep durable team policy in the repository rather than solely in an agent's memory. Compared with an editor-first assistant, the CLI and headless modes suit terminal workflows better than a workflow centered on inline completions.
Cloud makes it easier to use the same agent from several machines, but adds a dependency for state and may update bundled default prompts when an agent resumes. Custom prompts stay explicit; set LETTA_CODE_PRESERVE_CLOUD_SYSTEM_PROMPT=1 to disable automatic Cloud prompt updates. For always-on use, use a dedicated execution account, review tool permissions and external skills, and verify what context can sync to GitHub. Apache-2.0 covers the repository code, not model-provider, cloud-service, or third-party skill terms.
Hardware & Deployment Guide
Install with npm install -g @letta-ai/letta-code; the manifest lists Node ^22.23.4 || ^24.22.1 || ^26.12.1 and Bun >=1.3.2. The uv tool install letta and pipx install letta paths bundle Node and require Python 3.9+. Wheels cover glibc Linux 2.28+ on x86-64/ARM64, macOS 14+ on Intel/Apple Silicon, and Windows x64; they do not cover Alpine/musl, 32-bit systems, or Windows ARM64. On npm permission errors, use a user-owned prefix or nvm rather than sudo, which interferes with CLI self-updates.
Cloud is the default; use letta backend local to change the saved choice or --backend local for one run. Use letta server to attach your own runner to Cloud-managed agents. Self-hosting the runner does not make Cloud state or hosted inference local. Size hosted-model runners for tools and concurrency; no fixed GPU or VRAM requirement is listed. v0.34.77 fixes discovery of native CLI installs on Windows, while v0.34.75 addresses remote listener turn handling and approval recovery ownership.
~/.letta, project skills from .agents/skills, and agent skills from MemFS.letta server connects a computer; headless calls can target it with --computer or use --computer cloud for a managed sandbox./palace shows memory, /doctor [symptom] investigates behavior, and /sleeptime configures periodic memory work.Long-lived engineering work where the same agent needs to retain project context across sessions or machines, and the team can review memory changes and control runner permissions.
You mainly want inline completion, a disposable CLI for one-off tasks, or a verified fully offline stack without separately validating model access, state, and integrations.
Quick Start & Installation
npm install -g @letta-ai/letta-code
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| letta-code ★ | 4k | +38 | TypeScript | Apache-2.0 | A stateful coding-agent CLI with Git-tracked memory that persists across session |
| opencode | 230.9k | +1.3k | TypeScript | MIT | Terminal-first coding agent with separate planning and editing modes |
| claude-code | 158k | +709 | TypeScript | — | A terminal coding agent for navigating codebases, running tasks, and handling Gi |
| pi | 125.5k | +1.1k | TypeScript | MIT | An extensible TypeScript coding CLI and agent runtime with a unified model API |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/letta-ai/letta-code.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about letta-code
Where does agent state live, and how do I route execution to another machine?
letta server to register a computer, then select it with --computer for a headless turn. MCP client and SDK dependencies are present, but their presence does not establish compatibility with any particular MCP server or transport.Does a local Letta Code runner need a GPU?
Can we use Letta Code commercially and self-host the runner?
When should we choose Letta Code over an editor assistant or a session-scoped coding CLI?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy