A swarm gives one task (or one task each) to several Terminal bots at once. Each worker runs a CLI agent, such as Claude Code or Codex, in its own git worktree and on its own branch. You watch all of them on one live board, steer any of them, wait for them to finish, and then land their branches. A swarm is a thin layer over the Factory engine. It isn’t a second engine. Starting one runs the same steps as gizzi agents up and gizzi orchestration send, and the board reads the engine’s own event stream.

Start a swarm

Run it from inside the git repo the workers should change. For each worker Gizzi:
  1. makes a worktree next to the repo (<repo>-<swarm>-w1) on branch swarm/<swarm>/w1, from the commit you’re on;
  2. adds the worker to the team file .allternit/teams/<swarm>/team.yaml and runs agents up with that worktree as its workdir;
  3. waits for its pane to be ready, then sends it the task with a note saying which worker it is and which branch to commit to.
A task longer than 600 characters, or one with line breaks, goes into a file. The worker gets one line telling it to read that file.

Watch it: gizzi board

The board shows one row per running bot: every swarm worker, plus any other Terminal bot the engine has running. Bots that are offline are left out. gizzi agents ps still lists them. Each row has the bot, its brain, its state, how long it has been running, its cost and its branch. The line under it is the last thing its pane printed, with the agent’s prompt box and footer hints removed. The header adds up the states, and ⟳ live means the board is connected to the engine. gizzi board --once prints one frame and exits, which is useful in scripts or over SSH.

How the board stays live

The board doesn’t poll. It reads the engine’s HTTP service (127.0.0.1:3018 when Allternit Desktop runs it, 3011 for allternit-factory serve, or $ALLTERNIT_FACTORY_PORT):
  • GET /api/factory/events (Server-Sent Events) says when a bot changes state or the ledger moves. The board then reads GET /api/factory/agents again.
  • GET /api/factory/agents/:id/stream (Server-Sent Events) sends a pane’s screen when it changes. The last line comes from there.
If the engine isn’t serving, the board says so and shows ○ offline.
  • /sessions lists every live session, swarm workers included. A swarm worker shows l land there. Press b in it for the board, the same rows as gizzi board in a full-screen view with the same keys, and f for the factory floor. /board and /factory now open the sessions view. See Sessions view.
  • /swarm <task> [-n 2] [--brain claude-cli/claude-sonnet-5] starts a swarm from the TUI and opens the board. Workers appear on it as their panes start.
  • While any bot is working or waiting, the footer shows a badge such as ⚙ 3 bots · 1 waiting. It turns yellow when a bot is waiting on you.

Wait for it: gizzi swarm wait

This blocks until every worker is done, failed or stopped, and then prints a summary. With no swarm named, it waits for the newest open one. It prints a line when a worker finishes or starts waiting on you. Exit codes: 0 when all are done, 1 when any failed, 3 when the engine isn’t serving, and 4 on --timeout.

Land it: gizzi swarm land

For each finished worker, landing does four things:
  1. It commits anything the worker left uncommitted on its branch.
  2. It merges the branch into the branch the swarm started from, in your main checkout. That checkout must be on that branch and have no uncommitted changes, or the land is refused.
  3. It stops the worker’s pane.
  4. It removes the worktree and the branch.
A worker that has no new commits is reported as nothing. If a merge conflicts, the merge is aborted, nothing is changed, and the worktree is kept so you can resolve it. When workers worked on the same task as alternatives, land the one you want with --worker w1, and stop the others with x on the board. --all also lands workers that haven’t finished. Workers that are still working are skipped by default.

Other commands

Where it lives