Quickstart
Use Letta Code with the desktop app, in the CLI, or deploy in the cloud
Start using Letta Code for free by connecting your existing API keys and coding plans (like the ChatGPT/Codex and zAI coding plans).
You can also upgrade your Letta account for centralized access to all frontier model providers and increased quota on Letta Auto.
-
Download and install Letta Code
Download for macOS -
Open Letta Code and sign in
Launch the app and sign in with your Letta account. If you don’t have one, you’ll be prompted to create a free account.
Click “Connect model providers” in the bottom-left menu to add external API keys and coding plans.
-
Select your agent and conversation
The app will start with a default agent called “Letta Code” - you can also create a new one. To start chatting with an agent, enter the main chat, or create a new conversation.
-
Send your first message
You’re ready to chat! Try asking your agent to explore your codebase or run
/initto bootstrap its memory.
-
Install Letta Code
npm install -g @letta-ai/letta-code -
Log in to your account
Launch Letta Code and follow the prompts to authenticate:
lettaA browser window will open to sign in or create a free Letta account. Your credentials are stored locally.
Use
/connectto connect external API keys and coding plans. -
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.
-
Install Letta Code on your remote machine
SSH into your remote instance (e.g. AWS, GCP, Railway) and install:
npm install -g @letta-ai/letta-code -
Start the server
Run
letta serverto start Letta Code in server mode. On first run, it will print an OAuth authorization URL — open it in your browser to approve the connection:letta serverOn subsequent runs, your credentials are reused automatically.
-
Connect from chat.letta.com or the desktop app
Open chat.letta.com (works on mobile) or the Letta Code desktop app. In the bottom-left corner, click the environment selector and select your remote machine from the list in External.
-
Send your first message
You’re ready to chat! Tools execute remotely on your cloud machine — giving you access to cloud GPUs, production environments, or any machine you can SSH into.
First steps
Section titled “First steps”Try one of the following prompts to get a feel for your agent’s capabilities:
> /init> What do you know about me so far?> Create a user profile on my by looking at my downloads folder> What active projects am I working on? Which one do you think you could help with?> Re-tool your memory to be just like the AI from the movie Her, operate as my AI OS companionTrain your agent
Section titled “Train your agent”The more you use your agent, the more valuable it becomes. To get the most out of your Letta Code agent, encourage it to update its memory and search past history when relevant:
- Correcting your agent with
/remember: When your agent makes a mistake it should never repeat, use the/remembercommand to teach it (e.g./remember to never do that again) - Recall past interactions when relevant: Your agent has full access to all prior conversation data, which it can access via tools, skills, and subagents. If you’ve discussed something before, your agent can find it (e.g. “We definitely fixed a similar bug before, do you remember what the solution the last time was?”)
Each time you run letta, Letta Code resumes the default conversation with your last-used agent (by default, Memo).
This lets you pick up right where you left off.
Multi-threading: If you want to run parallel conversations (e.g., one refactoring your API while another writes tests), use letta --new to create a new conversation.
All conversations share the same agent memory and searchable message history.
Use /resume to swap conversations (the default conversation is always pinned to the top).
If you want the agent to wake up on its own later, see Scheduling.
Essential commands
Section titled “Essential commands”You’ll likely want to use the following essential commands when using Letta Code:
| Command | What it does | Example |
|---|---|---|
letta | Start interactive mode | letta |
letta -p "query" | Run a query in headless mode | letta -p "commit the changes and push" |
shift-tab | Toggle between modes (allow edits, plan, yolo) | Press Shift+Tab |
/init | Run deep memory initialization (or re-init) | > /init |
/doctor | Audit and refine memory structure | > /doctor |
/remember | Teach your agent something | > /remember always use pnpm |
/memory | View and manage memory blocks | > /memory |
/model | Switch the LLM model | > /model |
/search | Search past messages | > /search auth bug |
/clear | Clear context window (messages buffer) | > /clear |
/new | Start a new conversation | > /new |
/pin | Pin agent for easy access | > /pin |
/agents | Swap between agents | > /agents |
/feedback | Report issues or give feedback | > /feedback |
! | Enter bash mode to run a bash command directly | ! git status |
exit or Ctrl+C | Exit Letta Code | > exit |
Next steps
Section titled “Next steps”Read more about Letta Code’s memory, skills, and subagents, which are essential to getting the most out of your agent:
- Memory - Understand the hierarchical memory system
- Skills - Create reusable modules to extend your agent
- Subagents - Letta Code can spawn other (sub)agents
- Scheduling - Run one-time or recurring prompts while a remote environment is connected
- Headless mode - Run Letta Code non-interactively
Getting help
Section titled “Getting help”- Join our Discord: The best way to get help is to join our Discord server and chat with other community members and devs on the Letta team.
- Ask Letta Code: Letta Code is capable of browsing the web, which includes these docs!