Step 1 · Mental model · Mental model · AgentSwarm entry ENPT
Kimi CLI AgentSwarm · Visual Course

AgentSwarm is not kimi swarm

By the end you'll know swarm is a TUI mode + built-in tool — not a CLI subcommand — and which entry points actually start it.

Read the plain version, or open the technical layer on any section.
1

The big idea


AgentSwarm is Kimi Code CLI's structured parallelism primitive. The main agent fans out work to up to 128 subagents, each with an isolated context, then fans results back in as XML <agent_swarm_result>. Subagents don't talk to the user and don't nest swarms.

Here's the surprise from reverse engineering kimi 0.18.0: there is no kimi swarm subcommand. Swarm is three things working together:

  • Swarm Mode — TUI state entered via /swarm on, /swarm off, or /swarm <prompt>
  • Built-in toolAgentSwarm, available to the main agent
  • Local runtimeSubagentBatch in the binary: launches subagents with a controlled ramp, waits for all, aggregates results

Don't confuse this with Kimi K2.5 Agent Swarm (the product/blog capability with 100–300 subagents and PARL). The CLI tool is a local, verifiable executor — same philosophy, different API.

Think of it like… a project manager who hires temporary contractors. You don't run a separate kimi swarm app — you flip the office into "swarm mode" with /swarm, then the manager issues one AgentSwarm work order listing each contractor's scope. Contractors work in parallel in separate rooms (agents/agent-N/), report back, and the manager synthesizes. It's orchestrator → fan-out → fan-in, not a peer mesh.

Under the hood

Real subcommands in v0.18.0: export, provider, acp, server, web, login, doctor, vis, migrate, upgrade — no swarm.

On /swarm on, runtime logs swarm_mode.enter and injects enter-reminder.md ("## Swarm Mode") into context. Main agent may explore briefly, then must call AgentSwarm alone in one tool turn.

ConceptWhat it is
Kimi CLI AgentSwarmLocal tool: prompt_template + items[], max 128 subagents, agents/<id>/wire.jsonl
Kimi K2.5 Agent Swarm (product)Model/blog capability: 100–300 subagents, PARL, 1500+ tool calls — not the same API
2

In one picture


User /swarm on /swarm <prompt> swarm_mode.enter enter-reminder injected Main Agent tool: AgentSwarm SubagentBatch agent-0 … agent-N wire.jsonl each <agent_swarm_result> kimi swarm ✗
Left → right: /swarm activates Swarm Mode; main calls AgentSwarm; SubagentBatch fans out and aggregates. Dashed box = what does not exist.
3

In the code


Three real ways in — slash commands. One built-in tool. One command people expect but isn't there.

kimi --help (v0.18.0)
# TUI slash commands (Swarm Mode)
/swarm on              # activate Swarm Mode
/swarm off             # exit mode
/swarm <prompt>        # activate + send task

# These do NOT exist:
kimi swarm             # ✗ no subcommand
kimi agent-swarm       # ✗ no subcommand
wire.jsonl — swarm_mode.enter (session 30e21381)
{
  "type": "swarm_mode.enter",
  "trigger": "manual",
  "time": 1781645840546
}

Reproducible checks

kimi --version
kimi --help   # confirm no swarm subcommand
strings -a ~/.kimi-code/bin/kimi | rg 'AgentSwarm|SubagentBatch|agent-swarm-exclusive'
rg 'swarm_mode.enter' ~/.kimi-code/sessions/*/session_*/main/wire.jsonl
4

Try it: pick an entry point


Click each button. Watch what the CLI would do — and which paths are dead ends.

Questions welcome — bring your own kimi --help output if versions differ. Next: the AgentSwarm schema and exclusive-deny policy that governs every swarm call.