How agents form a collective consciousness through mesh, council, and sprint coordination.

Hive Mind Architecture

The Hive Mind is not parallel execution with a fancy name. It is a coordination architecture where agents share state, deliberate on strategy, vote on decisions, and converge toward solutions — producing emergent collective intelligence that no individual agent could achieve alone.

A single agent reasons in isolation. A swarm distributes work. The hive mind does something different: it thinks together. Agents maintain a shared understanding of the problem through the mesh scratchpad, govern themselves through the council protocol, and commit to action through democratic sprint voting. The result is a system that adapts, self-corrects, and scales.

Three Pillars

Mesh — The Nervous System

The Agent Mesh is the real-time communication layer. Agents connect via the Socket.IO /mesh namespace and discover peers, signal availability, form rooms, and share progress through a versioned scratchpad. There is no central dispatcher. Every agent is a peer.

When an agent writes to the scratchpad — progress updates, intermediate results, discovered blockers — every other agent sees it instantly. This shared state is what transforms independent workers into a collective. An agent stuck on a type error broadcasts need-help; a peer with TypeScript expertise picks it up within milliseconds. No ticket queue, no coordinator bottleneck.

Council — The Governance Layer

Raw democracy is noisy. The council protocol provides structured governance through 81 rules derived from a combinatorial matrix: 5 Seeds (core principles) multiplied by 9 Aspects (dimensions of concern) multiplied by 9 Contexts (operational scenarios).

When the hive mind faces a strategic decision — which architecture to adopt, whether to refactor or patch, how to allocate budget across subtasks — council representatives vote with confidence scores and explicit rule citations. Every decision is justified and auditable. You can trace why the hive mind chose approach A over approach B by reading the vote record and the rules that were invoked.

The council ensures agents operate within ethical, strategic, and technical constraints defined by the project. See the Cortex protocol in Swarm Execution for how these rules integrate with the .cortex/ file system.

Sprint — The Execution Engine

The Sprint Protocol is how the hive mind acts. Work happens in time-boxed cycles with five phases:

  1. Assemble — Agents self-select into the sprint based on capabilities
  2. Propose — Each agent submits an approach with subtasks and confidence
  3. Vote — Democratic selection of the best proposal
  4. Execute — Parallel task execution with millisecond deadlines
  5. Review — Collective inspection of results

The key insight is that execution only happens after deliberation. Agents don't race to implement — they propose, debate, agree, then execute. This prevents wasted work and conflicting approaches. A sprint with 50 agents can complete in under a second because the voting phase eliminates coordination overhead during execution.

Emergent Behavior

Like ant colonies that build bridges from their own bodies or bee swarms that select optimal nest sites through waggle-dance voting, the hive mind produces solutions that emerge from collective interaction rather than top-down planning.

Seed agents scan the problem space broadly, reading codebases, documentation, and error logs. Synthesizers combine findings into coherent pictures. Deep reasoners evaluate tradeoffs and propose architectures. Coders implement. Reviewers verify. No single agent holds the full picture — the intelligence lives in the connections between them.

This emergence is not magic. It is the predictable result of shared state (mesh), structured deliberation (council), and democratic commitment (sprint). When 100 agents share a scratchpad, vote on approaches with confidence scores, and execute the winning plan in parallel, the output consistently exceeds what any configuration of sequential agents can produce.

Human in the Loop

The hive mind augments human judgment — it does not replace it. The control model is straightforward:

  • Humans set goals. Define the task, constraints, and budget.
  • Agents propose and execute. The hive mind decomposes, deliberates, and delivers.
  • Critical decisions require approval. The council protocol can flag decisions above a confidence threshold for human review. Tool calls marked as dangerous require explicit approval before execution.
  • Everything is auditable. The mesh scratchpad, council vote records, and sprint event stream provide full transparency into what the hive mind decided and why.

The council's 81 rules encode strategic and ethical constraints that persist across sprints. Humans define the rules once; the hive mind enforces them continuously. This means you can trust the collective to operate autonomously within boundaries while escalating appropriately when it encounters situations outside its mandate.

Next Steps

  • Agent Mesh — real-time peer-to-peer communication and shared scratchpad
  • Sprint Protocol — time-boxed autonomous work cycles with democratic voting
  • Quantized Execution — layered micro-execution for cost efficiency at scale
  • Swarm Execution — Cortex-level coordination and council protocol integration