DISCOVER THE FUTURE OF AI AGENTSarrow_forward

Letta Code

calendar_todayAdded Feb 22, 2026
categoryAgent & Tooling
codeOpen Source
TypeScript大语言模型AI AgentsCLIBunAgent & ToolingOtherDeveloper Tools & Coding

Letta Code is a memory-first coding agent CLI tool. Unlike traditional session-based tools, it features cross-session persistent agents with skill learning, self-improvement, and hierarchical memory systems, supporting multiple LLM backends (Claude, GPT, Gemini, GLM, etc.).

Overview#

Letta Code is a CLI coding agent developed by Letta AI with a "Memory-First" philosophy. Unlike session-based tools like Claude Code, Codex, or Gemini CLI, Letta Code uses cross-session persistent agents that accumulate knowledge, learn skills, and self-improve over time.

Core Features#

Persistent Memory System#

Agents maintain memory across sessions; /clear only clears conversation without affecting memory. Use the same agent across sessions for knowledge accumulation.

Skill Learning#

Learn reusable skills from trajectories via /skill command, stored in .skills directory. Supports learning new skills from current trajectory.

Multi-Model Support#

Supports multiple LLM backends:

  • Claude Sonnet / Opus 4.5
  • GPT-4o / GPT-4 series
  • Gemini Pro
  • GLM-4
  • Other OpenAI-compatible APIs

Sub-Agent Delegation#

Delegate tasks to specialized sub-agents for task distribution.

Rich Toolset#

Built-in tools include:

  • memory: memory-related operations
  • web_search: web search
  • fetch_webpage: webpage fetching
  • Memory filesystem (memfs) support

LSP Support#

Enable LSP infrastructure for type checking via LETTA_ENABLE_LSP environment variable.

Installation & Quick Start#

Requirements#

  • Node.js version 18+
  • npm package manager

Installation#

npm Global Installation (Recommended)

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

Arch Linux AUR Installation

yay -S letta-code        # release version
yay -S letta-code-git    # nightly version

Quick Start#

# Navigate to project directory
cd your-project-directory

# Start Letta Code
letta

# First-time OAuth authentication
# Follow prompts to complete Letta account authentication

CLI Command Reference#

Interactive TUI Mode#

letta                          # Resume default session
letta --new                    # Create new session
letta --continue               # Resume last session
letta --resume                 # Open agent selector UI
letta --new-agent              # Create new agent directly
letta --agent <agent-id>       # Open specific agent

Headless Mode#

letta -p "..."                 # One-off prompt (no TTY UI)

Maintenance Commands#

letta update                   # Manual update check
letta --info                   # Show current directory, skills, and pinned agent info

Skill Control#

letta --no-skills              # Disable all skills
letta --no-bundled-skills      # Disable bundled skills

Interactive Slash Commands#

CommandFunction
/connectConfigure LLM API keys (OpenAI, Anthropic, etc.)
/modelSwitch model
/initInitialize agent memory system
/remember [instructions]Actively guide agent memory
/skill [instructions]Learn skill from current trajectory
/profile saveSave current agent as profile

Environment Variables#

VariablePurpose
LETTA_API_KEYLetta API key
LETTA_BASE_URLConnect to external Docker server
LETTA_ENABLE_LSPEnable LSP infrastructure for type checking
LETTA_CODE_TELEMTelemetry control (0 to disable)

Configuration File Locations#

TypePath
Global Config~/.config/letta/settings.json
Local Project Config.letta/settings.local.json

Skills System#

ConfigDescription
Skills Directory.skills directory for reusable modules
Skill Sourcesall, bundled, global, agent, project (default: all)
Disable Skills--no-skills or --no-bundled-skills

Architecture Comparison#

Session-Based Tools (Claude Code / Codex / Gemini CLI):

  • Sessions are independent
  • No learning between sessions
  • Context = current session messages + AGENTS.md

Letta Code (Agent-Based):

  • Use same agent across sessions
  • Persistent memory and continuous learning
  • /clear starts new session but memory persists

Use Cases#

  • Code Development & Maintenance: Write code, edit and organize files, run programs
  • Project Management: Agent remembers codebase structure and historical decisions
  • Knowledge Management: Accumulate project knowledge, preferences, and interaction history
  • Continuous Iteration: Agent improves over time without repeating context
  • Local Computer Operations: Run in terminal, execute any local operations

Design Patterns#

PatternImplementation
Modular ArchitectureClear separation of concerns (agent, tools, cli, auth, etc.)
Plugin-based Skill SystemExtensible skill directory with multiple sources
Multi-level Config ManagementGlobal config + project-level config
Hierarchical MemoryLayered memory system

Related Projects

View All arrow_forward

STAY UPDATED

Get the latest AI tools and trends delivered straight to your inbox. No spam, just intelligence.

rocket_launch