# OpenCode

Open-source AI coding agent that connects to 75+ AI providers and runs in your terminal, IDE, or desktop with LSP integration and multi-session support.

## Agent Decision Summary
- Risk level: elevated
- Source confidence: high
- Recommended workflows: Coding agent workflow, Connector or protocol layer, Local or private AI stack, Memory or RAG workflow
- Permission surface: shell/files, memory, external services
- Agent JSON: https://www.openagent.bot/agents/opencode.agent.json

## Summary
OpenCode is an open-source AI coding agent built in Go that connects to 75+ AI providers including Anthropic, OpenAI, Google, and local models via Ollama. It runs as a terminal TUI, VS Code extension, and desktop app with features like LSP integration, multi-session support, session sharing, and privacy-first design where no code or context data is stored.


## Guide
OpenCode is redefining what an open-source coding agent can be. With support for 75+ AI providers, a privacy-first architecture, and multi-surface availability (terminal, IDE, desktop), it has rapidly grown to 160K+ GitHub stars and 7.5M monthly active developers.

### What it is
OpenCode is an open-source AI coding agent built in Go that connects to 75+ AI providers. It runs in your terminal, as a VS Code extension, or as a desktop app, with LSP integration for deeper code understanding and multi-session support for parallel agent workflows.

### Why it matters
The coding agent space has been dominated by tools that lock you into a single model provider. OpenCode breaks that pattern by supporting 75+ providers, including the ability to use existing ChatGPT Plus and Copilot subscriptions. Combined with its privacy-first architecture (no code stored, no telemetry), it represents a new model for what an open-source coding agent should be.

### How it works
Start with one safe workflow for OpenCode. Inspect official setup instructions, required credentials, execution logs, approval points, and failure recovery before expanding from a sandbox task into production automation.


## Use Cases
- Cost-effective multi-model development: Use your existing ChatGPT Plus or Copilot subscription with OpenCode instead of paying for additional API access. Switch between models based on task complexity.
- Local-first development: Run OpenCode with Ollama and local models for fully offline coding assistance. Ideal for air-gapped environments or privacy-sensitive projects.
- Parallel agent workflows: Use OpenCode's multi-session support to run multiple agents on the same project simultaneously — one refactoring, one testing, one writing documentation.

## Alternatives
- Use Claude Code for deeper codebase reasoning with Anthropic models vs Claude Code: OpenCode offers model flexibility and privacy. Claude Code may handle complex multi-file reasoning better but locks you into Anthropic's ecosystem.
- Use Aider for deeper git integration vs Aider: Aider has best-in-class git integration with auto-commit. OpenCode offers broader provider support and multi-surface availability.

### Getting Started
- Read the documentation: https://opencode.ai/docs
- Inspect the repository: https://github.com/anomalyco/opencode

### FAQ
- What should I check before using OpenCode?
  - Start with one safe workflow for OpenCode. Inspect official setup instructions, required credentials, execution logs, approval points, and failure recovery before expanding from a sandbox task into production automation.
- Is OpenCode open source?
  - OpenCode is listed with MIT based on the official source links in this profile. Re-check the repository, model card, or docs before production use.
- Who should evaluate OpenCode?
  - OpenCode is most worth evaluating for developers who want a model-agnostic coding agent with maximum provider flexibility.
- Who should use OpenCode?
  - Developers who want a privacy-first, model-agnostic coding agent that works across terminal, IDE, and desktop, especially those who already have ChatGPT Plus or Copilot subscriptions.
- How does OpenCode compare to other coding agents?
  - OpenCode's main differentiators are its 75+ provider support, privacy-first design, and multi-surface availability. It trades deep single-provider integration for maximum flexibility.
## What It Does
OpenCode is an open-source AI coding agent built in Go that connects to 75+ AI providers. It runs in your terminal, as a VS Code extension, or as a desktop app, with LSP integration for deeper code understanding and multi-session support for parallel agent workflows.

## How To Evaluate
Start with one safe workflow for OpenCode. Inspect official setup instructions, required credentials, execution logs, approval points, and failure recovery before expanding from a sandbox task into production automation.

## Why It Matters
OpenCode is one of the fastest-growing open-source coding agents with 160K+ GitHub stars and 7.5M monthly developers. Its model-agnostic design lets developers use existing subscriptions (ChatGPT Plus, Copilot, etc.) or bring their own API keys, making it one of the most cost-effective and flexible coding agents available.


## Best For
- Developers who want a model-agnostic coding agent with maximum provider flexibility
- Teams that need a privacy-first agent with no code storage or telemetry
- Engineers who want both terminal and IDE-based agent workflows

## Not For
- Users who need a fully managed cloud-hosted coding agent
- Teams that prefer single-model deep integration over multi-provider flexibility

## What It Actually Does
- 75+ AI provider support: Works with any AI provider — Anthropic, OpenAI, Google, Groq, Ollama local models, and 70+ more through an extensible provider system.
  - Why it matters: Developers can use existing subscriptions (ChatGPT Plus, Copilot) or choose the best model for each task without being locked into a single provider.
- Multi-surface workflow: Available as a terminal TUI, VS Code extension, and desktop app with seamless session sync across all surfaces.
  - Why it matters: Developers can start a task in the terminal, refine it in the IDE, and share results via session links — all from the same agent.
- Privacy-first design: OpenCode does not store any code or context data. No telemetry, no data retention, and full local control.
  - Why it matters: Privacy-sensitive teams can use OpenCode in regulated environments without worrying about data leaving their control.
- LSP integration: Automatically loads the right Language Server Protocol configurations for the LLM, giving it deeper code understanding.
  - Why it matters: Better context leads to more accurate edits and fewer hallucinations when working with unfamiliar codebases.

## Typical Use Cases
- Multi-provider experimentation: Switch between Claude, GPT, Gemini, and local models mid-session to compare results for different coding tasks.
- Privacy-sensitive development: Use OpenCode with local models via Ollama for fully offline, zero-exfiltration coding assistance.
- Team collaboration via session sharing: Share session links with teammates for code review, debugging help, or reproducing issues.

## How It Compares
- Choose OpenCode for provider flexibility and privacy vs Claude Code: OpenCode supports 75+ providers and stores no code data. Claude Code offers deeper Anthropic model integration but locks you into a single provider.

## Fit Matrix
- Coding agent workflow: strong. OpenCode has multiple signals for coding agent workflow, including matching tags, capabilities, category, or positioning. Required check: Run a small repository change and inspect the diff, tests, and rollback path.
- Connector or protocol layer: strong. OpenCode has multiple signals for connector or protocol layer, including matching tags, capabilities, category, or positioning. Required check: Connect one low-risk service, then inspect schemas, auth scope, errors, and logs.
- Local or private AI stack: strong. OpenCode has multiple signals for local or private ai stack, including matching tags, capabilities, category, or positioning. Required check: Verify hardware requirements, data path, storage, and whether all calls stay in your environment.
- Memory or RAG workflow: strong. OpenCode has multiple signals for memory or rag workflow, including matching tags, capabilities, category, or positioning. Required check: Create, update, retrieve, correct, and delete memory or retrieval objects with real data.
- Reusable skill workflow: partial. OpenCode has at least one signal for reusable skill workflow, but should be checked against a real task before adoption. Required check: Run one skill end to end and check whether it produces evidence or structured output.
- Browser automation: weak. OpenCode is not primarily positioned for browser automation in the current metadata. Required check: Run one non-sensitive website task and inspect clicks, waits, retries, and changed URLs.

## Evidence
- verified: OpenCode is listed as open source. Source: License metadata: MIT
- verified: OpenCode has a recorded GitHub repository: anomalyco/opencode. Source: Resource facts and GitHub source link.
- inferred: OpenCode supports these recorded deployment modes: local, cloud. Source: OpenAgent decision signal metadata.
- inferred: OpenCode is tagged with mcp, local inference, workflow orchestration capabilities. Source: OpenAgent capability taxonomy.

## Missing Checks
- Repository freshness has not been recorded.

## Next Actions
- Inspect repository: https://github.com/anomalyco/opencode
- Open Homepage: https://opencode.ai
- Read setup docs: https://opencode.ai/docs
- Install OpenCode: curl -fsSL https://opencode.ai/install | bash

## Command Line
### Install OpenCode
Install via the official script, then run 'opencode' in any project directory. Supports 75+ providers and works with existing subscriptions.

```bash
curl -fsSL https://opencode.ai/install | bash
```

## Facts
- Category: agents
- Resource type: agent
- Open source: yes
- License: MIT
- Last verified: 2026-06-04
- GitHub repo: anomalyco/opencode
- GitHub stars: 160000

## Capabilities
- mcp
- local-inference
- workflow-orchestration

## Structured Use Case Tags
- local-ai
- developer-workflow

## Getting Started
- Open the GitHub repository: https://github.com/anomalyco/opencode
- Read the documentation: https://opencode.ai/docs
- Visit the project website: https://opencode.ai

## Links
- GitHub: https://github.com/anomalyco/opencode
- Homepage: https://opencode.ai
- Docs: https://opencode.ai/docs

## Structured Outputs
- JSON: https://www.openagent.bot/agents/opencode.json
- Markdown: https://www.openagent.bot/agents/opencode.md
- Agent JSON: https://www.openagent.bot/agents/opencode.agent.json
- Canonical: https://www.openagent.bot/agents/opencode
