LatentCode
Getting started
The installer already connected LatentCode to your gateway — add your API key, open the TUI, and you're working.
1 · Add your API key
The installer already pointed LatentCode at your gateway, so there's just one thing left: your personal API key (it starts with ls- and lives on your Console account page). Add it either way:
From the terminal — LatentCode imports the models you're allowed to use automatically:
latentcode config set api-key ls-your-keyOr just start LatentCode: the first time you run it without a key, it shows a prompt asking you to paste your ls- key, and then you're connected.
Check the connection and the models available to your tier at any time:
latentcode config/v1:latentcode config set base-url https://latentstack.dev/v12 · Start the TUI
Run LatentCode from inside the project you want to work on:
latentcodeYou land in a session. Type what you want in plain language — "add pagination to the users endpoint", "why is this test flaky?", "explain how auth works here" — and press Enter. LatentCode reads the relevant files, proposes changes as diffs, and asks before running commands or editing.
3 · Choose the right agent
LatentCode ships with a few built-in agents. Switch between the two main ones with tab:
| Agent | What it does |
|---|---|
| build | The default. Full access — reads, edits, and runs commands (with your approval). |
| plan | Read-only. Investigates and proposes a plan without touching files — great for scoping work first. |
| general | A subagent for deep multi-file searches. Mention @general in a message to delegate to it. |
4 · Pick a model
Type /models in the chat (or press ctrl+x then m) to open the model picker and choose from the models your tier allows — your choice applies to the current session.
To set a default model for new sessions instead:
latentcode config set default-model anthropic/claude-sonnet-4-5Models are addressed as provider/model. To list everything your tier allows from the terminal:
latentcode modelsNext steps
- Learn the interface in Using the TUI — agents, keybindings, and slash commands.
- Automate runs from scripts with the CLI reference.
- Give the agent long-running objectives with Goals, on the Features page.