# Letta Code

> A stateful coding-agent harness whose agents keep memory, identity and skills across sessions — and rewrite them as they go

- Category: AI Coding / Autonomous Coding Agents
- Language: TypeScript
- Licence: Apache-2.0
- Repository: https://github.com/letta-ai/letta-code
- Website: https://www.letta.com/agent
- Canonical page: https://ai-tldr.dev/tools/letta-code/
- Updated: 2026-05-04

## In short

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 sits in the Autonomous Coding Agents category of the AI Coding tools and is open-source, written in TypeScript and licensed Apache-2.0.

## 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.

1. Install the CLI

```bash
npm install -g @letta-ai/letta-code
```

2. Run it in your project

   Start `letta` from the project directory. The tutorial personality is a good first agent.

```bash
cd my-project
letta

# or start with the guided agent
letta --new-agent --personality tutorial
```

3. Connect 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.

```text
/connect
/model
```

4. Install a skill into an agent

```bash
letta skills install https://github.com/owner/repo
```

5. Run 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.

```bash
letta server --computer-name "work-laptop"
letta computers list --online-only
letta -p --agent <agent-id> --computer "work-laptop" "hello from that machine"
```

## 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

## Version history

- 2026-05-04 v0.25.0: Letta Code v0.25 shipped the memory-first coding agent app, keeping agent context persistent across model switches.
