Letta Code CLI
Run Letta Code from your terminal
Letta Code is a memory-first agent that can run from your terminal. The CLI supports both Letta Cloud agents and Local mode.
Install the Letta Code CLI
Requires Node.js 18+
npm install -g @letta-ai/letta-code 
Getting started
Section titled “Getting started”-
Install Letta Code
npm install -g @letta-ai/letta-codeTo launch Letta Code, run:
lettaIf you’re running Letta Code for the first time, a new local agent will be auto-created for you. This default local mode stores agent state on your machine and does not require a Letta login.
-
Connect to LLM providers
Use
/connectto connect external API keys, coding plans, and local inference servers. -
Navigate to your project
cd your-projectletta -
Send your first message
You’re ready to chat! Try asking your agent to explore your codebase or run
/initto bootstrap its memory.Use
/newto start a new conversation (orletta --new),/resumeto swap conversations,/agentto swap agents, and/modelto swap models. View the CLI reference to see the full list of CLI commands. -
Optional: login to Constellation
Run
/loginif you want Constellation-managed state and access fromchat.letta.com, the desktop app, other machines, and messaging integrations.Read more about Constellation here.