Installation Guide

Get Started in 3 Minutes

Install OpenCode Swarm and start shipping production-ready code with a team of 9 AI agents.

Quick Start

Follow these simple steps to get up and running.

Step 01

Add to OpenCode Config

Add the plugin to your opencode.json configuration file.

{
  "plugin": ["opencode-swarm"]
}

OpenCode will automatically install the package from npm when it starts.

Step 02

Start OpenCode

Launch OpenCode as you normally would.

opencode

Swarm will initialize automatically with the default configuration.

Step 03

Verify Installation

Run the health check to ensure everything is wired up correctly.

/swarm diagnose

This validates config parsing, grammar files, checkpoint manifest, and more.

Optional Configuration

Configure Models

By default, Swarm uses free OpenCode Zen models. You can customize any agent's model by creating a configuration file.

Free Tier (OpenCode Zen)

No API key required

{
  "agents": {
    "coder":        { "model": "opencode/minimax-m2.5-free" },
    "reviewer":     { "model": "opencode/big-pickle" },
    "test_engineer":{ "model": "opencode/gpt-5-nano" },
    "explorer":     { "model": "opencode/trinity-large-preview-free" },
    "sme":          { "model": "opencode/trinity-large-preview-free" },
    "critic":       { "model": "opencode/trinity-large-preview-free" },
    "docs":         { "model": "opencode/trinity-large-preview-free" },
    "designer":     { "model": "opencode/trinity-large-preview-free" }
  }
}

Production Configuration

Mix providers for maximum quality

{
  "agents": {
    "architect": { "model": "anthropic/claude-opus-4-6" },
    "coder":     { "model": "minimax-coding-plan/MiniMax-M2.5" },
    "reviewer":  { "model": "zai-coding-plan/glm-5" }
  },
  "guardrails": {
    "max_tool_calls": 200,
    "max_duration_minutes": 30
  }
}

Save to .opencode/swarm.json in your project root or ~/.config/opencode/opencode-swarm.json for global config.

Useful Commands

Essential commands to control your Swarm.

/swarm status

Current phase & task progress

/swarm plan

Show the full project plan

/swarm diagnose

Health check for swarm state

/swarm evidence 2.1

Show results for a specific task

/swarm history

What's been completed so far

/swarm reset --confirm

Start over (clears all state)

Ready to Start Building?

Just tell OpenCode what you want to build. Swarm handles the rest.

> Build a REST API with user registration, login, and JWT auth
View Full Documentation