Skip to content

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.

Click OpenCode in the sidebar’s Agents group. It opens in the left panel with the project as its working directory.

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 pricingopencode.ai/zen
Supported providersopencode.ai/docs/providers
  • 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 /sessions to reopen one.

OpenCode reads an AGENTS.md in the project for instructions such as commands to run and conventions to follow. See OpenCode rules.