# mesh-coordinator

mesh-coordinator — a coordinator subagent that links agents into a peer-to-peer mesh: decisions go through voting, peers find each other, and the network keeps going when a node drops.

- subagent · `type=agent` · Claude Code, Codex, Cursor · ★ 850 repo stars
- Author: ruvnet
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ruvnet/agentic-flow/tree/HEAD/agentic-flow/.claude/agents/swarm/mesh-coordinator.md
- Updated: 2026-10-26
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/mesh-coordinator

## What it does

Every agent here is a peer. It answers requests and sends them, with no node sitting above the rest. Two hooks bracket the work. Before the task, the coordinator raises a mesh topology capped at 12 agents on the distributed strategy, broadcasts a network-start message and proposes gossip with a 0.67 consensus threshold. When the task ends, it writes metrics into the `mesh` namespace and tells peers the network is shutting down.

Three ways of spreading work are laid out: taking queued tasks from busy neighbors, a DHT that keeps three copies of each task, and an auction where bids are scored on skill match, current load, past results and free resources. Resilience rests on gossip rounds every 2–5 seconds fanning out to 3–5 peers, tolerance for up to 33% failed nodes, and the phases of pBFT. A joining node bootstraps from seed nodes, then receives the peer list.

The hooks call `mcp__claude-flow__` tools such as `swarm_init`, `daa_communication`, `daa_consensus`, `memory_usage` and `performance_report`. Without the claude-flow MCP server connected, none of them fire and the file stays a plain instruction sheet.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/agents/mesh-coordinator.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/mesh-coordinator.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/mesh-coordinator.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/ruvnet/agentic-flow/tree/HEAD/agentic-flow/.claude/agents/swarm/mesh-coordinator.md

## When to use it
- split one job across several agents with no central controller
- keep the swarm alive after a node fails and move its work
- reach a decision when part of the agents disagrees
- pass queued work to a peer that has spare capacity
- dump network state to memory and pull a report afterwards

## Example prompts
- Spin up a mesh of 12 agents and split the refactor queue across them.
- Run a consensus round on the migration plan with a 0.67 threshold.
- Find the dead nodes in the mesh and move their tasks to live peers.

## Similar
- [hive-mind-advanced](https://affpapa.org/en/nevibecode/skills/hive-mind-advanced.md) — skill · 1100 installs
- [collective-intelligence-coordinator](https://affpapa.org/en/nevibecode/agents/collective-intelligence-coordinator.md) — subagent · ★ 189 repo stars
- [pixijs-scene-mesh](https://affpapa.org/en/nevibecode/skills/pixijs-scene-mesh.md) — skill · 6900 installs
- [mesh-generation](https://affpapa.org/en/nevibecode/skills/mesh-generation.md) — skill · ★ 95 repo stars
- [contour-to-mesh](https://affpapa.org/en/nevibecode/skills/contour-to-mesh.md) — skill · 1400 installs
- [texture-driven-mesh-fitting](https://affpapa.org/en/nevibecode/skills/texture-driven-mesh-fitting.md) — skill · 1300 installs

From the same set: [ruvnet/agentic-flow](https://affpapa.org/en/nevibecode/by/ruvnet/agentic-flow.md) — 76 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
