kimi swarmBy the end you'll know swarm is a TUI mode + built-in tool — not a CLI subcommand — and which entry points actually start it.
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 on, /swarm off, or /swarm <prompt>AgentSwarm, available to the main agentSubagentBatch in the binary: launches subagents with a controlled ramp, waits for all, aggregates resultsDon'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.
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.
| Concept | What it is |
|---|---|
Kimi CLI AgentSwarm | Local 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 |
/swarm activates Swarm Mode; main calls AgentSwarm; SubagentBatch fans out and aggregates. Dashed box = what does not exist.Three real ways in — slash commands. One built-in tool. One command people expect but isn't there.
# 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 subcommandwire.jsonl — swarm_mode.enter (session 30e21381)
{
"type": "swarm_mode.enter",
"trigger": "manual",
"time": 1781645840546
}
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
Click each button. Watch what the CLI would do — and which paths are dead ends.
kimi --help output if versions differ. Next: the AgentSwarm schema and exclusive-deny policy that governs every swarm call.