https://github.com/letta-ai/letta-code
The memory-first coding agent
https://github.com/letta-ai/letta-code
Last synced: 6 days ago
JSON representation
The memory-first coding agent
- Host: GitHub
- URL: https://github.com/letta-ai/letta-code
- Owner: letta-ai
- License: apache-2.0
- Created: 2025-10-25T04:17:51.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-04-04T07:01:31.000Z (28 days ago)
- Last Synced: 2026-04-04T09:03:21.683Z (28 days ago)
- Language: TypeScript
- Homepage: https://docs.letta.com/letta-code
- Size: 66.3 MB
- Stars: 2,085
- Watchers: 5
- Forks: 208
- Open Issues: 86
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-side-quests - letta-ai/letta-code - first coding agent from the MemGPT team — persistent context that survives across sessions (Web Frontend / JS Libraries & Utilities)
- awesome-github-projects - letta-code - The memory-first coding agent ⭐2,397 `TypeScript` 🔥 (🔧 Utilities & Miscellaneous)
- awesome - letta-ai/letta-code - The memory-first coding agent (TypeScript)
- AiTreasureBox - letta-ai/letta-code - 02-24_1651_4](https://img.shields.io/github/stars/letta-ai/letta-code.svg)|The memory-first coding agent| (Repos)
- awesome-ai-tools - Letta Code - first terminal coding agent; stateful across sessions; [Docs](https://docs.letta.com/letta-code) | (💻 Terminal & CLI Agents)
- awesome-cli-coding-agents - Letta Code - first CLI coding agent built on the Letta platform (formerly MemGPT); persistent memory across sessions, model-agnostic (Claude/GPT/Gemini), skill learning, and context repositories. (Terminal-native coding agents / Open Source)
README
# Letta Code
[](https://www.npmjs.com/package/@letta-ai/letta-code) [](https://discord.gg/letta)
Letta Code is a memory-first coding harness, designed for long-lived agents that can learn from experience.
Instead of working in independent sessions, you work with a persisted agent whose memory is portable across models (Claude, GPT, Gemini, GLM, Kimi, and more).
Run Letta Code in the [**CLI**](https://docs.letta.com/letta-code/cli), or download the [**desktop app**](https://docs.letta.com/letta-code/desktop-app) for MacOS, Windows, and Linux.
You can also access Letta Code via [your phone](https://docs.letta.com/letta-code/remote-mobile) and [Slack/Telegram/Discord](https://docs.letta.com/letta-code/channels).

## Get started
Install the package via [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm):
```bash
npm install -g @letta-ai/letta-code
```
Navigate to your project directory and run `letta` (see various command-line options [on the docs](https://docs.letta.com/letta-code/commands)).
Run `/connect` to configure your own LLM API keys (OpenAI / ChatGPT, Anthropic, zAI coding plan, etc.), and use `/model` to swap models.
You can also download the [**desktop app**](https://docs.letta.com/letta-code/desktop-app) for MacOS, Windows, and Linux. Agents created in the CLI are available via the desktop app, and vice versa.
## Philosophy
Letta Code is built around long-lived agents that persist across sessions and improve with use. Rather than working in independent sessions, each session is tied to a persisted agent that learns.
**Claude Code / Codex / Gemini CLI** (Session-Based)
- Sessions are independent
- No learning between sessions
- Context = messages in the current session + `AGENTS.md`
- Relationship: Every conversation is like meeting a new contractor
**Letta Code** (Agent-Based)
- Same agent across sessions
- Persistent memory and learning over time
- `/clear` starts a new conversation (aka "thread" or "session"), but memory persists
- Relationship: Like having a coworker or mentee that learns and remembers
## Agent Memory & Learning
If you’re using Letta Code for the first time, you will likely want to run the `/init` command to initialize the agent’s memory system:
```bash
> /init
```
Over time, the agent will update its memory as it learns. To actively guide your agents memory, you can use the `/remember` command:
```bash
> /remember [optional instructions on what to remember]
```
Letta Code works with skills (reusable modules that teach your agent new capabilities in a `.skills` directory), but additionally supports [skill learning](https://www.letta.com/blog/skill-learning). You can ask your agent to learn a skill from its current trajectory with the command:
```bash
> /skill [optional instructions on what skill to learn]
```
Read the docs to learn more about [skills and skill learning](https://docs.letta.com/letta-code/skills).
Community maintained packages are available for Arch Linux users on the [AUR](https://aur.archlinux.org/packages/letta-code):
```bash
yay -S letta-code # release
yay -S letta-code-git # nightly
```
---
Made with 💜 in San Francisco