What OpenCode is

OpenCode is an open-source coding agent. You give it a goal in plain language, and it plans, reads and writes files, runs commands, and reports back. It lives in your terminal or in a browser interface, and it works the way a teammate would: open the repo, make the change, run it, fix what broke.

The detail that matters for this guide is how OpenCode talks to a model. It speaks to any endpoint that exposes an OpenAI-compatible API. That means it is not tied to a single cloud vendor. You point it at whatever model endpoint you want, including one running on your own machine.

That is the whole idea here. OpenCode for the agent loop, a local model for the intelligence, both on hardware you control.

Why local is the right default for a coding agent