OpenCode
OpenCode is an open-source terminal coding agent that works with many model providers. It’s Frontend’s default agent, and it runs on both the browser and server runtimes, on every plan.
Start OpenCode
Section titled “Start OpenCode”Click OpenCode in the sidebar’s Agents group. It opens in the left panel with the project as its working directory.
Connect a provider
Section titled “Connect a provider”The first time, run /connect and choose a provider:
- OpenCode Zen — a curated set of coding models tested by the OpenCode team, billed pay-as-you-go. Sign in at opencode.ai/auth, copy your API key and paste it into OpenCode.
- Another provider — OpenCode works with providers such as Anthropic, OpenAI, Google and OpenRouter, using a subscription login where the provider supports one, or an API key.
Pick a model with /models. Frontend saves your provider logins, encrypted, to your Frontend account, so OpenCode is ready on your other projects and on either runtime.
| Link | |
|---|---|
| OpenCode Zen and pricing | opencode.ai/zen |
| Supported providers | opencode.ai/docs/providers |
What’s set up for you
Section titled “What’s set up for you”- MCP servers. The project’s MCP servers are added to OpenCode’s config before it starts, so it can use the project’s database, media, image generation and connected integrations.
- Conversation history. Each project keeps its OpenCode sessions. Run
/sessionsto reopen one.
Project instructions
Section titled “Project instructions”OpenCode reads an AGENTS.md in the project for instructions such as commands to run and conventions to follow. See OpenCode rules.