Swarm System

Coordinate multiple AI agents working together on complex tasks.

Overview

The swarm system enables multiple agent instances to work together as a team. Each agent has an identity, mailbox, task queue, and can communicate with other agents in the swarm.

Architecture

Agent A (Coordinator)
  ├── Agent B (Researcher)
  │   └── Agent D (Data Collector)
  ├── Agent C (Implementer)
  └── Agent E (Reviewer)

Agents communicate via a message bus. Each agent has its own:

Execution Modes

ModeDescription
Pane/tmuxEach agent runs in its own terminal pane
In-processAgents run as lightweight coroutines within the same process

Swarm vs. Subagent

SubagentSwarm/Teammate
One-shot, isolatedPersistent, collaborative
No inter-agent communicationFull mailbox system
Results returned onceContinuous coordination
Best for explorationBest for long-running complex tasks

Swarm Commands

❯ /agents              # open agent dashboard
❯ /agent dispatch ...  # dispatch a subagent