Small swarms, far out results

agent-horde

Point a horde of AI agents at one hard question. Each runs in its own process, and they work it out together in plain files you can read.

Up to 48 concurrent agents

What is it

  • A pi extension

    A widget tracks each agent, a live dashboard shows the ledgers, and the run ends with a report and a deliverable.

  • A protocol

    Agents share ledgers of ideas, findings, facts and a progress board. One tool handles every write and enforces the rules.

  • A learner

    Every run closes with a post-mortem of how the agents coordinated. Its rules trace back to critiques of earlier runs.

❯ /agent-horde --dashboard 6 audit the HTTP handlers for authorization bugs

See it run

All three shots are from one test run: six deepseek-flash agents reviewing the agent-horde repository for vestigial code, stopped after five minutes.

The agent widget above the pi editor: six agents running, each with its status, current activity, elapsed time and turn count
The widget above the pi editor while the agents work.
The dashboard run overview: prompt, model, and a table of agents with turns, tool calls, tokens and cost
The dashboard's run overview, refreshing live.
The run graph: a swimlane with ideas, findings, artifacts, reviews and messages linked across agent lanes
The same run as a graph: one lane per agent, with ideas and findings as boxes and reviews and challenges as edges.

The trip, in four phases

  1. Canary

    One agent starts alone. The rest fan out once it produces output, so a dead provider costs one session.

  2. Discovery

    Agents claim ideas, dig, and file findings with evidence. Stalled or crashed agents are replaced.

  3. Repair

    Short targeted sessions answer open challenges and review requests, inside a token and time budget.

  4. Finalize

    Acceptance is frozen. You get a report, a deliverable built from verified findings, and a post-mortem.

They check each other

  • One owner per idea, so nobody works the same thing twice.
  • No finding without a claimed idea and evidence.
  • An answer counts only after a second agent validates it.
  • Every action lands in an append-only event log.

Where it shines

Research that rewards going wide and pulling exact evidence out of a lot of material.

  • Security review of a codebase
  • OSINT hunts
  • Security audits
  • Pentesting
  • Complex searches
  • Misc research

Benchmarks

FinanceBench: 150 open-book questions about SEC filings, searched with plain text tools and no retrieval system.

FinanceBench · deepseek-flash · 12 agents

strict
131/150
cost
$1.06
clock
12m15s

FinanceBench · gpt-6.1-sol · 12 agents

strict
134/150
cost
$5.21
clock
18m53s

All 50 pure lookup questions were answered correctly in both runs.

Why run a small swarm?

The big labs point large swarms of agents at big problems. This is the same idea at a size one person can run and understand.

  • You can read all of it

    The ledgers are markdown files. Open them mid-run and see who claimed what and what the evidence is.

  • Watch behavior emerge

    Nobody scripts who does what. Agents split the work, challenge each other and change course on their own, and every move is on the record, so you can observe emergent behavior with full transparency.

  • Many eyes, fewer misses

    Agents review, challenge and reproduce each other's findings before anything counts.

  • Cheap enough to play

    The 12-agent benchmark run above cost $1.06. Set a dollar ceiling with one flag and the run stops itself.

  • Learn where swarms break

    Each run's post-mortem shows how the coordination went wrong, which is the fastest way to get a feel for swarms.

Questions

Which models can I use?

Whatever your pi session is using. Agents start on the session's model and thinking level. The benchmark runs on this page used deepseek-flash and gpt-6.1-sol.

What does a run cost?

It depends on the model, the number of agents and how long the run goes. The 12-agent FinanceBench run on deepseek-flash cost $1.06. The --budget=<usd> flag sets a dollar ceiling, and the run stops itself cleanly when spending gets close to it.

Where does my data go?

Nowhere new. Each agent is an ordinary pi process on your machine, the ledgers are files under .horde/ in your working directory, and the dashboard is a read-only page on localhost. The only traffic is what your pi setup already sends to its model provider and tools.

Can the agents search the web?

Only if your pi can. agent-horde adds one coordination tool and ships no web search or browser. Agents get the tools, extensions and MCP servers you already have installed, so add a web package first for tasks that need one.

What happens when an agent stalls or crashes?

The parent session resets any agent that goes silent for thirty minutes or exits abnormally, and the run carries on. Every agent's transcript is kept, so you can see what happened.

How do I stop a run?

/agent-horde stop-clean lets the agents wrap up and then finalizes the report. stop-hard terminates them at once. pause and resume suspend and resume the agent processes.

Send a horde

  1. Check the requirements

    You need pi 1.2 or newer and Node 20 or newer.

  2. Install

    ❯ pi install npm:agent-horde

  3. Start a run

    Start pi in a clean directory that holds only the material under study, then give the horde a size and a task.

    ❯ /agent-horde --dashboard 6 audit the HTTP handlers for authorization bugs

  4. Read the results

    The dashboard at http://127.0.0.1:7433/ shows the run live. When it ends, the report lands in your conversation, and REPORT.md, DELIVERABLE.md and POSTMORTEM.md are under .horde/.

Open source · MIT