Guide

Grok API multi-agent: what it is and how it differs from Grok Bot

Last checked:

A crowned Grok Bot leader at a round table collecting ideas from four small helper bots

Short answer

Grok API multi-agent is a model you call from code, grok-4.20-multi-agent, that sends one question to a team of 4 or 16 AI agents. They research and discuss it together, and a leader agent returns a single answer. It’s a developer tool in beta, not something you set up in the Grok Bot app.

Who it’s for

  • Developers who want deep, well-sourced research answers inside their own app or script.
  • Not for people who want an assistant that does tasks for them. That’s Grok Bot.

How it differs from Grok Bot

Grok API multi-agentGrok Bot
What you getOne answer per requestNamed Bots that keep working on jobs
How you use itAn API call with an xAI API keyMessages in the Grok Bot app
MemoryNone of its own. You chain turns with previous_response_idEach Bot keeps memory, files and preferences
Can it act?Only built-in tools (web search, X search, code execution, collections search) and remote MCP toolsUses a cloud computer, a browser and connected apps, with approvals
How you payPer token, for every agent, plus tool callsIncluded with plans that include Grok Bot

How it works

From xAI’s docs:

  1. You send a request with the model name grok-4.20-multi-agent.
  2. Several agents start at once. Each brings its own reasoning and findings, and can use the tools you enabled.
  3. A leader agent combines the discussion and writes the final answer.
  4. You get back only the leader’s answer and tool calls. The other agents’ work is encrypted and included only if you turn on use_encrypted_content in the xAI SDK.

4 agents or 16?

SettingxAI SDKOpenAI SDK, Vercel AI SDK, REST
4 agents: quick, focused questionsagent_count=4reasoning effort low or medium
16 agents: deep, many-sided researchagent_count=16reasoning effort high or xhigh

xAI says 16 agents use “significantly more tokens” and take longer. Start with 4.

A minimal request

curl https://api.x.ai/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $XAI_API_KEY" \
  -d '{
  "model": "grok-4.20-multi-agent",
  "reasoning": {"effort": "low"},
  "input": [{"role": "user", "content": "Compare the top 3 EV makers by battery tech, range and charging."}],
  "tools": [{"type": "web_search"}]
}'

Limits to know (as of Oct 2026)

  • Beta: the API and its behavior may change.
  • No custom tools: your own function calling and client-side tools aren’t supported. Built-in tools and remote MCP tools are.
  • Responses API or xAI SDK only: it doesn’t work with the Chat Completions API.
  • No max_tokens parameter.
  • Cost adds up: every agent’s input, output and reasoning tokens are billed, plus every tool call. xAI’s models page lists grok-4.20-multi-agent-0309 at $1.25 per million input tokens and $2.50 per million output tokens for prompts under 200k tokens. Check the usage and server_side_tool_usage fields in each response.

Prompting tips from xAI

  • Name the exact angles to cover (“compare by battery tech, range and charging”) instead of a broad topic.
  • Ask for a table or other structure.
  • Say which sources you trust.
  • Break deep topics into a conversation of follow-up questions.

FAQ

Is Grok API multi-agent the same as Grok Bot?

No. Multi-agent is one API model that returns an answer. Grok Bot gives you lasting Bots that do work on a cloud computer. See Grok agents explained.

Is it the same as Grok Build subagents?

No. Subagents are child sessions inside xAI’s coding agent, Grok Build. See Grok Build subagents.

Can I choose how many agents run?

Yes: 4 or 16. In the xAI SDK set agent_count; elsewhere use reasoning effort (low/medium for 4, high/xhigh for 16).

Can I see what each agent said?

Not by default. Only the leader’s answer and tool calls come back. The other agents’ work is included, encrypted, when you set use_encrypted_content in the xAI SDK.


Swarm School is an independent site. We’re not affiliated with xAI.

Sources

Swarm School is independent and not affiliated with Grok Bot’s makers. Features change; check the official docs for current details.

Next step: Grok agents explained →

Free Grok Bot power-user guide (PDF). Get it by email.

Get the free 18-page setup guide.

The 9 setups most Grok Bot users skip, with a copy-paste prompt for each. Free PDF.

Send me the free PDF