All pages

Lesson 2.1 · Work with the agent · 8 min

Connect a model

Add an API key or point TRMNLY at a local model.

Listen

The agent needs a model to think with. In this lesson you connect one, either a hosted model on your own API key or a model running locally on your Mac, and choose which model new conversations start on.

Time: 8 minutes · Works on: macOS app

Your options

Option What you need Where it's set
Anthropic, OpenAI, Google Gemini or OpenRouter An API key from that provider Settings → API Keys
A local model through Ollama, or LM Studio or another OpenAI-compatible server The server running on your Mac The Local LLM tab
Claude Code, Codex or Gemini CLI The CLI installed and signed in The model picker

The terminal works without any of these. Only the Agent tab needs a model.

Add an API key

  1. Get a key from your provider's dashboard.
  2. Open Settings with ⌘, and choose API Keys.
  3. Under Agent Providers, find your provider's row: Anthropic, OpenAI, Google Gemini or OpenRouter. The link beside each row opens that provider's key page.
  4. Paste the key and press Save.

Keys are stored in the macOS Keychain, never in a plain file. Settings export leaves them out, so on a new Mac you paste them again.

With your own key, every request goes straight from your Mac to the provider.

Or run a model locally

  1. Open the right sidebar with ⇧⌘\, then choose More → Local LLM.
  2. Check the endpoint at the top. It defaults to http://127.0.0.1:11434, where Ollama listens.
  3. If Ollama isn't running, press Start Ollama. If it isn't installed, the button reads Install Ollama and opens the download page.
  4. Under Pull a model, type a model tag such as qwen3-coder:30b and press Pull. Large models take a while to download.
  5. When it appears under Installed, open the row's menu and choose Set as agent default. The model gets a Default badge.
  6. Try it in Try a model, a throwaway chat at the bottom of the tab.

A local model gets a smaller set of 15 core tools instead of the full catalog, because it has far less room for context. Pointing the endpoint at an OpenAI-compatible /v1 server, such as LM Studio, works too, but pulling and deleting models only work against Ollama.

Pick the model for a conversation

  1. Open the Agent tab.
  2. Open the model menu in the header. It lists Your CLI subscription (no API credits) first, then a section per provider.
  3. Pick a model. Only this conversation changes.

Set the default for new chats

New conversations start on the default model.

  • To change it everywhere, open Settings → AI Agent and use Default model.
  • To promote the model you're using now, open the header's model menu and choose Use as default for new chats.
  • To pin a different default for one project, open the agent's gear menu, choose Providers, routing & spend…, and set Default for new chats there.

Spend and limits

The footer under the transcript shows what the session has cost and how many tokens it used. Beside it, an allowance pill such as 82% · 4m shows how much of the provider's rate limit is left and when it refills. It fills in after your first turn, because providers report it with each response.

The Providers, routing & spend… sheet also sets daily and per-session spending caps.

Check yourself

  • The Agent tab no longer asks you to add a key.
  • The header's model menu shows the model you chose.
  • A new chat (⇧⌘N from the gear menu's New chat) starts on your default model.

Go further