Skip to content

CLI Commands Quick Reference

Fresh

Core Commands

CommandDescription
lettaStart interactive mode
letta -p "query"One-shot headless query
letta serverStart server (for cloud/channels/scheduling)
letta --versionShow version

Interactive Commands

CommandDescription
/initInitialize agent memory
/memoryManage memory blocks
/searchSearch past messages
/rememberDirect agent to store information
/doctorAudit and refine memory structure
/sleeptimeConfigure reflection settings
shift-tabToggle between modes

Agent Management

CommandDescription
letta -p "query" --newNew conversation
letta -p "query" --new-agentNew agent
letta -p "query" --agent <id>Use specific agent
letta -p "query" --conversation <id>Resume conversation
letta -p "query" -n "name"Resume by agent name

Model Selection

CommandDescription
--model sonnetUse Sonnet model
--model autoAuto-select model
-m gpt-5-codexSpecific model ID
--embedding letta/letta-freeEmbedding model (new agents)

Permission and Tools

CommandDescription
--yoloBypass prompts (except ExitPlanMode)
--tools "Read,Glob,Grep"Restrict available tools
--permission-mode acceptEditsAccept file edits automatically
--permission-mode planRequire plan approval

Output Formats

CommandDescription
--output-format textPlain text (default)
--output-format jsonStructured JSON with metadata
--output-format stream-jsonLine-delimited JSON events
--include-partial-messagesToken-level streaming

System Prompt

CommandDescription
--system letta-claudeUse preset prompt
--system letta-codexCodex-optimized preset
--system letta-geminiGemini-optimized preset
--system-custom "prompt"Custom system prompt

Channel Commands

CommandDescription
letta channels configure telegramSetup Telegram
letta channels configure slackSetup Slack
letta channels route add --channel <ch> --chat-id <id> --agent <id>Add route
letta channels route listList routes
letta channels bind --channel slack --agent <id>Bind Slack to agent
letta channels pair --channel telegram --code <code>Pair Telegram user
letta server --channels telegramStart with Telegram

Scheduling Commands

CommandDescription
letta cron add --name "task" --prompt "msg" --cron "0 9 * * *" --agent <id>Add cron task
letta cron add --name "task" --prompt "msg" --every 5m --agent <id>Add interval task
letta cron add --name "task" --prompt "msg" --at "in 45m" --agent <id>Add one-time task
letta cron listList all tasks
letta cron list --agent <id>List agent's tasks
letta cron get <id>Get task details
letta cron delete <id>Delete task

Advanced Flags

CommandDescription
--toolset codexOverride toolset
--toolset geminiGemini toolset
--import ./my-agent.afImport AgentFile
--import @author/agent-nameImport published agent
--init-blocks "persona,project"Initialize memory blocks
--block-value "persona=..."Set block value

SDK (npm)

bash
# Install SDK
npm install @letta-ai/letta-code-sdk

# Install CLI globally
npm install -g @letta-ai/letta-code