All guides

Get started4 steps4 min readUpdated

How to use OpenCode models, from free ones to your own keys

OpenCode runs what the others can’t: its own free models, any provider’s key, GitHub Copilot or a model on your Mac.

OpenCode set as the plan every new agent starts on.

OpenCode is the third way your agents can think on your Mac, beside your Claude and ChatGPT plans. It runs what those two can’t: its own free models with nothing connected, any provider’s API key, GitHub Copilot or a model running on your Mac. It can’t use a Claude Pro or Max subscription; Claude Code does that.

This guide makes OpenCode the plan every new agent starts on, then connects your own provider for work you’d rather keep private, and picks one of its models in a chat. Work on OpenCode runs on your Mac and uses no Agently credits.

Before you start

  • Agently on your Mac, signed in. OpenCode runs there. Download it if you haven’t yet.
  • OpenCode ready. It has a row in Settings › Plans and keys › Your plans, named after what it runs on, like OpenCode free models. If the row says Set up, choose it, then Install Agently’s copy in Outside agents › On this Mac.
  • For private work, a provider. An API key, a GitHub Copilot login or a model running on your Mac.
  1. 1Start new agents on OpenCode

    Open Settings › How agents run. Under Every new agent, set Thinks with to OpenCode. Every agent you hire from now on uses it when it works on your Mac; agents you already have keep theirs.

    Only owners and admins change this. Left on Member’s pick, each new agent uses the plan its member chose in setup.

  2. 2Connect a provider for private work

    With nothing connected, OpenCode runs its own free models. They cost nothing because they may be used to improve the models, so for private work connect your own provider.

    In Plans and keys, open the OpenCode row. The first time, choose Choose providers; after that, its providers are listed there. Each provider’s row says what it takes: Add key for one that takes an API key, Sign in for one you sign in to in your browser, and for a model on your Mac, whether it’s running.

    For a key, paste it and choose Save key. It’s kept in Agently’s own OpenCode on your Mac and never leaves it. Agently keeps providers in its own OpenCode, never in yours.

    TipA model on your Mac shows Not running until you start it. Start it, then check again, and its row says Running on this Mac.

  3. 3Pick an OpenCode model in a chat

    In any chat with an agent that works on your Mac, open the model button in the message box. Your OpenCode models are listed with your Claude and ChatGPT plans’ models. Pick one, and only that chat changes.

    For Linus, choose Local under Where it works first, so he works on your Mac.

  4. 4Check it’s working

    Back in Plans and keys, the OpenCode row is named after what it runs on: OpenCode free models at first, then the provider you connected. Open it to see its providers; a quota, such as a monthly allowance, shows as This month.

    In a chat, the model button names the OpenCode model the chat uses, and no Agently credits are spent.

Which to use

You haveUse
Nothing connected yetOpenCode’s free models. Fine to try things; not for private work
An API key from a model providerOpenCode, with Add key
GitHub CopilotOpenCode
A model running on your MacOpenCode
A Claude Pro or Max subscriptionClaude Code, not OpenCode. Connect your Claude plan
A ChatGPT subscriptionCodex. Connect your ChatGPT plan

If something goes wrong

My local model says Not running.
Start it on your Mac, then check again. OpenCode only sees it while it runs.
I want to stop using a provider.
Choose Remove on its row. Its key or sign-in is deleted from Agently on your Mac, and agents pick another of your OpenCode models.
OpenCode isn’t in the list.
Your own plans show only in Agently on your Mac. Update Agently if Plans and keys asks you to.

Questions

Do OpenCode models use Agently credits?

No. They run on your Mac, on OpenCode, with no Agently credits.

Are the free models private?

No. They cost nothing because they may be used to improve the models. For private work, connect a key, GitHub Copilot, a model on your Mac, or your Claude or ChatGPT plan.

Can OpenCode use my Claude subscription?

No. OpenCode can’t use a Claude Pro or Max subscription. Use Claude Code for that.

Does Agently change my own OpenCode?

No. Agently keeps your providers in its own OpenCode on your Mac, never in yours.

More guides

Free on your Mac.

On the ChatGPT or Claude plan you already pay for.

How to use OpenCode models, from free ones to your own keys · Agently