[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [Grok 4.20 Multi-Agent](https://spiral.ai/integrations/opencode/grok-4-20-multi-agent)

# How to Use Grok 4.20 Multi-Agent in opencode

Grok 4.20 Multi-Agent is built for research questions that need several perspectives and one combined answer. Compared with Grok 4.20, it runs collaborating agents in parallel, making it a useful choice for comparing evidence and weighing technical trade-offs.

|  |  |
| --- | --- |
| Model | Grok 4.20 Multi-Agent |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.01337 per run at the default inputs. $1.625 per 1M input tokens, $3.25 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Grok 4.20 Multi-Agent in opencode

- Use Grok 4.20 Multi-Agent at high reasoning effort to review this project's architecture notes and dependency manifests. Compare keeping the current monolith with extracting the job runner, covering deployment, failure isolation, and maintenance. Return a recommendation tied to specific project evidence.
- Use Grok 4.20 Multi-Agent at medium reasoning effort to analyze the failing test output and relevant source files. Compare the three most plausible causes, cite the supporting lines, and propose a diagnostic check for each before changing code.
- Use Grok 4.20 Multi-Agent to review the database migration proposal against the schema and query code. Compare consistency, rollback, and recovery risks. Return a table of concerns and a prioritized verification plan.
- Use Grok 4.20 Multi-Agent at high reasoning effort to compare the caching approaches described in this repository. Evaluate invalidation, stale reads, and behavior during outages, then recommend an approach using the project's stated requirements.
- Use Grok 4.20 Multi-Agent to compare the implementation with the acceptance criteria in the project notes. Return structured findings containing the requirement, relevant file and line, observed gap, and suggested check. Mark requirements that cannot be assessed from the available code.

## How to set up Grok 4.20 Multi-Agent in opencode

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the server**: Leave out `--global` to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

```bash
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
```

2. **Sign in**: Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, `/mcps` starts the same sign-in.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
opencode mcp list
```

### Use the Spiral skill

1. **Send opencode this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run Grok 4.20 Multi-Agent**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "openrouter",
    "model": "x-ai/grok-4.20-multi-agent",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: opencode finds Grok 4.20 Multi-Agent on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/opencode

## Grok 4.20 Multi-Agent tools and prices

- [SpaceXAI: Grok 4.20 Multi-Agent](https://spiral.ai/tools/openrouter/x-ai/grok-4.20-multi-agent) (OpenRouter): Up to $0.01337 per run at the default inputs. $1.625 per 1M input tokens, $3.25 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| seed |  | — |  |
| top_p | … to 1 | — |  |
| reasoning |  | — | Reasoning effort; reasoning tokens count toward max_tokens. |
| max_tokens | 1 to 1800000 | — | The most output tokens to generate. |
| temperature | 0 to 2 | — |  |
| response_format |  | — |  |

## What can you do with Grok 4.20 Multi-Agent in opencode?

Grok 4.20 Multi-Agent can help turn project evidence into architecture comparisons and debugging hypotheses. Have the coding agent gather relevant excerpts and use the resulting analysis to guide implementation.

### Architecture decision reviews

Compare proposed architectures against explicit requirements. Ask for failure modes, operational trade-offs, and the evidence that would change the recommendation.

### Research synthesis

Turn supplied study excerpts into a comparison of methods, findings, and disagreements. Request a separate list of questions the evidence leaves unanswered.

### Vendor shortlist analysis

Compare supplied product documentation against a fixed set of requirements. Separate documented capabilities from claims that still need verification.

### Incident hypothesis reviews

Evaluate competing explanations using a supplied incident timeline and log excerpts. Ask what supports each hypothesis and which diagnostic check would distinguish them.

### Product decision briefs

Weigh proposed features against customer evidence and delivery constraints. Request the strongest case for each option and a recommendation with stated assumptions.

### Recurring evidence digests

Compare each new batch of supplied reports with the previous summary. Highlight changed conclusions, conflicting evidence, and questions requiring follow-up.

### Structured comparison records

Convert a research comparison into consistent records containing the option, evidence, trade-offs, and unanswered questions for downstream review.

## Overview

- [OpenRouter](https://spiral.ai/providers/openrouter)
- [All opencode guides](https://spiral.ai/integrations/opencode)

## Grok 4.20 Multi-Agent in other agents

- [Amp](https://spiral.ai/integrations/amp/grok-4-20-multi-agent)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/grok-4-20-multi-agent)
- [Claude](https://spiral.ai/integrations/claude-desktop/grok-4-20-multi-agent)
- [Claude Code](https://spiral.ai/integrations/claude-code/grok-4-20-multi-agent)
- [Cline](https://spiral.ai/integrations/cline/grok-4-20-multi-agent)
- [Codex](https://spiral.ai/integrations/codex/grok-4-20-multi-agent)
- [Cursor](https://spiral.ai/integrations/cursor/grok-4-20-multi-agent)
- [Devin](https://spiral.ai/integrations/devin/grok-4-20-multi-agent)
- [dots](https://spiral.ai/integrations/dots/grok-4-20-multi-agent)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/grok-4-20-multi-agent)
- [Gemini](https://spiral.ai/integrations/gemini/grok-4-20-multi-agent)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/grok-4-20-multi-agent)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/grok-4-20-multi-agent)
- [goose](https://spiral.ai/integrations/goose/grok-4-20-multi-agent)
- [Grok](https://spiral.ai/integrations/grok/grok-4-20-multi-agent)
- [Grok Build](https://spiral.ai/integrations/grok-build/grok-4-20-multi-agent)
- [Hermes](https://spiral.ai/integrations/hermes/grok-4-20-multi-agent)
- [Instinct](https://spiral.ai/integrations/instinct/grok-4-20-multi-agent)
- [Manus](https://spiral.ai/integrations/manus/grok-4-20-multi-agent)
- [Muse](https://spiral.ai/integrations/muse/grok-4-20-multi-agent)
- [Muse Code](https://spiral.ai/integrations/muse-code/grok-4-20-multi-agent)
- [n8n](https://spiral.ai/integrations/n8n/grok-4-20-multi-agent)
- [Notion](https://spiral.ai/integrations/notion/grok-4-20-multi-agent)
- [OpenClaw](https://spiral.ai/integrations/openclaw/grok-4-20-multi-agent)
- [Perplexity](https://spiral.ai/integrations/perplexity/grok-4-20-multi-agent)
- [Raycast](https://spiral.ai/integrations/raycast/grok-4-20-multi-agent)
- [VS Code](https://spiral.ai/integrations/vscode/grok-4-20-multi-agent)
- [Windsurf](https://spiral.ai/integrations/windsurf/grok-4-20-multi-agent)
- [Zapier](https://spiral.ai/integrations/zapier/grok-4-20-multi-agent)

## More opencode guides

- [Grok 4.20](https://spiral.ai/integrations/opencode/grok-4-20)
- [Grok 4.3](https://spiral.ai/integrations/opencode/grok-4-3)
- [Granite 4.2 8B](https://spiral.ai/integrations/opencode/granite-4-2-8b)
- [Grok 4.5](https://spiral.ai/integrations/opencode/grok-4-5)
- [Gemma 4 31B](https://spiral.ai/integrations/opencode/gemma-4-31b)
- [Grok 4.6](https://spiral.ai/integrations/opencode/grok-4-6)

## Questions about Grok 4.20 Multi-Agent in opencode

**Can opencode use Grok 4.20 Multi-Agent?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Grok 4.20 Multi-Agent like any built-in tool.

**How much does Grok 4.20 Multi-Agent cost in opencode?**

Up to $0.01337 per run at the default inputs. $1.625 per 1M input tokens, $3.25 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

**Do I need an OpenRouter account to use Grok 4.20 Multi-Agent in opencode?**

No. Spiral runs Grok 4.20 Multi-Agent on its own OpenRouter account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Grok 4.20 Multi-Agent in opencode?**

About two minutes: add the server, then sign in, then check it.

**Does opencode wait while Grok 4.20 Multi-Agent runs?**

Grok 4.20 Multi-Agent runs in the background. opencode starts the run, checks on it and gives you the text, json when it's ready.

**What is Grok 4.20 Multi-Agent useful for?**

Use it for research that requires comparing evidence, considering competing explanations, or weighing several trade-offs. Its parallel collaboration is suited to questions with multiple dimensions.

**What does reasoning effort change?**

It changes the number of collaborating agents: low and medium use four, while high and extra high use 16. Choose based on how many perspectives the question needs.

**Can I read every agent's separate answer?**

The returned response is the leader agent's combined answer. Ask that answer to explain disagreements, supporting evidence, and unresolved questions.

**How much material can Grok 4.20 Multi-Agent consider?**

xAI documents a one-million-token context window, while OpenRouter lists two million. For conservative planning, keep the source material below one million tokens; the published limits differ.

**How should I phrase a research request?**

Name the decision you need to make and the exact dimensions to compare. For example, ask for a database comparison covering recovery, consistency, and operational complexity, then request a table and recommendation.

