Letta Code is a stateful agent harness for creating agents that are more like people than tools. Letta Code agents have memory, identity, and a sense of experience over time. They learn and evolve over long horizons through rewriting their own memory, skills, prompts, and even the harness itself (through mods).
Letta Code can be used interactively, or to power always-on agents that work proactively. Interact with agents through:
- A local CLI
- The desktop app for macOS, Windows, and Linux
- Your browser, including mobile, at chat.letta.com
- Messaging integrations, including Telegram, Slack, Discord, and custom channels
Tip
Letta Code agents are designed to be self-configuring. If you want to configure something (e.g. skills, behavior, hooks, permissions), try asking your agent to do it for you.
| Feature | Description |
|---|---|
| Self-improvement & Learning | Agents programmatically rewrite their context to improve and adapt over time, including system prompt learning (through memory blocks) and skill learning. Configure periodic dreaming with /sleeptime, audit memory quality with /doctor, and view memory with /palace |
| Message search | Search across all messages and agents with /search. Agent can also search their own conversations or the conversations of other agents |
| MemFS | All context (including memory blocks) is tracked via git. Sync context to a custom GitHub repository by setting /memory-repository set [email protected]:... |
| Skills | Loads global skills (~/.letta), project-scoped skills (.agents/skills), and agent-scoped skills (stored in MemFS). View skills with /skills and create with /skill-creator |
| Subagents & Multi-agent | Call built-in subagents (general-purpose, forked, recall, history-analyzer) async or sync. Agents can call any other agent (including themselves) as subagents |
| Messaging Integrations | Chat with the same agent from Slack, Telegram, your browser (chat.letta.com) including mobile, and through custom channels |
| Hooks | Run custom scripts at key points of agent execution to automate workflows |
| Permissions | Set permission modes and customize what actions are auto-approved or auto-denied |
| Crons & Schedules | Configure heartbeats and crons, and let agents work across time with self-managed schedules |
| Remote & Multi-Env (requires signing in with Letta) | Agents work across multiple environments. Make any machine available as a remote environment by running letta server --env-name "..." |
| Secrets (requires signing in with Letta) | Make secrets available as environment variables (across machines) while obfuscating their values from context |
See the full list of slash commands in our documentation.
Install the package via npm:
npm install -g @letta-ai/letta-codeNavigate to your project directory and run letta (see command-line options in the docs). You can also run the tutorial agent with:
letta --new-agent --personality tutorial
Run /connect to configure your own LLM API keys (OpenAI / ChatGPT, Anthropic, Z.ai coding plan, etc.), and use /model to swap models.
You can also download the desktop app for macOS, Windows, and Linux. Agents created in the CLI are available via the desktop app, and vice versa.
Agents stored in Letta Cloud keep their memory, identity, and conversations there while the Letta Code harness can run on any connected computer: your laptop, GitHub Actions, a managed cloud sandbox, a remote VM, or a Mac Mini. You can chat with the same agents through chat.letta.com or the desktop app.
graph TD
LettaCloud["Letta Cloud<br/>Agent state"]
LettaCloud --> A["💻 Your Laptop"]
LettaCloud --> B["☁️ Cloud VM"]
LettaCloud --> C["🖥️ Mac Mini"]
LettaCloud --> D["📦 Managed Sandbox"]
Run /login from the CLI or sign in through the desktop app to access agents in your Letta account.
Agents stored in Letta Cloud can run across multiple machines. Any machine can be made into an available environment by running:
letta server
letta server --env-name "work-laptop"List discoverable environments from the CLI:
letta environments list --online-onlyGet the current environment for routing another agent onto this same machine:
letta environments currentRoute a headless message through a specific environment:
letta -p --agent <agent-id> --environment "work-laptop" "hello from that machine"Use --environment cloud to start or reuse the target agent's cloud sandbox.
Agent-to-agent headless messages without --environment keep the original
same-environment behavior.
See our guides for using Railway, DigitalOcean, and Fly.io as remote environments.
Install skills into a specific agent's memory with letta skills install <skill>:
| Source | Example |
|---|---|
| GitHub | letta skills install https://github.com/owner/repoletta skills install https://github.com/owner/repo/tree/main/path/to/skillletta skills install https://github.com/owner/repo/blob/main/path/to/skill/SKILL.md |
| ClawHub | openclaw skills install <skill-slug> → letta skills install <skill-slug> |
| Hermes Skills Hub | hermes skills install <skill-path> → letta skills install <skill-path> |
To view skills run letta skills list --agent <agent-id>, and delete skills with letta skills delete <skill-name> --agent <agent-id>.
Letta Code is developed by the creators of MemGPT and sleep-time compute (now called "dreaming"), and driven by our research in AI memory and continual learning.
Community maintained packages are available for Arch Linux users on the AUR:
yay -S letta-code # release
yay -S letta-code-git # nightlyNix users can run or install Letta Code through the repository flake:
nix run github:letta-ai/letta-code
nix profile install github:letta-ai/letta-codeSee docs/nix.md for Home Manager and NixOS service examples.
Made with 💜 in San Francisco

