Switch Models

Change what your agent thinks with, in one command. A model on your computer, free and private, or a provider's with your own key. Your agent keeps its files and channels. Which to pick: Models.

Switch in one command

lnk agent start --model qwen3:8b               # a model on this computer
ANTHROPIC_API_KEY=sk-ant-... lnk agent start   # a provider's, with your key

Start your agent again with the model you want. It replaces the saved model and restarts the agent, saying so. start names the model it uses, and so does lnk agent status.

A model on your computer

  • --model <name>: a local model (qwen3 finds qwen3:8b). Link Harness takes any runtime lnk model list finds. A harness from outside Link may take fewer: its own page says.
  • Run, install and remove them: On Your Computer.

A provider's, with your key

  • With a key and no --model, every harness gets claude-sonnet-5-5 on Anthropic, gpt-6-luna on OpenAI and openrouter/auto on OpenRouter. --model names another the provider has.
  • --key <key>: the key. Prefer the provider's own variable, ANTHROPIC_API_KEY, OPENAI_API_KEY or OPENROUTER_API_KEY, which Link reads when you start an agent with no model, and again at each start to renew the key of a hosted one: other users of this machine can see command-line flags. If more than one is set and the agent has no model yet, Link doesn't choose whom to bill: pass --key. Start it again with a new key to change it.
  • Your agent never sees the key: Model Provider.