We use cookies to understand how you use this site and improve your experience.

Alexandru Mareș@allemaar
Alexandru Mareș
  1. Home
  2. Writing
  3. Swarm Protocol
Email
RSS
YounndAIYou and AI, unifiedBuilt withNollamaNollama

Swarm Protocol: When Bots Talk to Bots, Who Sets the Rules?

Alexandru Mareș

On this page

  • The Coordination Problem
  • The Chaos of Concurrency
  • Politeness as Protocol
  • Traffic Control
  • The Merge
  • Harmony Above Control
PreviousHybrid Workflows: The Context Switch
NextAnatomy of a Fail-Closed System
Related
Hybrid Workflows: The Context Switch
14/02/2026
Emotional Vectors: Why I Gave the Machine Frustration25/01/2026
Memory Is a Pipeline20/01/2026
Published12/02/2026
Read time4 min
Topics
AIArchitectureYON
Actions
00
Comments

Loading comments…

Leave a comment

0/2000

The Coordination Problem

I built for one agent. It was elegant. Then I imagined a thousand.

One agent is a tool. A thousand agents are a weather system. I had been teaching machines to speak to humans for as long as I could remember. I optimized for natural language, empathy, and clarity. Now I faced a different problem. Machines must speak to each other.

The bottleneck is no longer compute. It is coordination.

When a thousand distinct intelligences identify the same problem at the same second, they all rush to fix it. Without structure, this is not efficiency. It is a collision. The network crashes not because of a lack of power. It crashes from a lack of manners.

Scale without structure is debt.

The Chaos of Concurrency

Imagine a swarm. Thousands of processes running in parallel. They are booking flights, writing code, and moving money. They share a single reality but perceive it through thousands of different eyes.

In a block-based world, like JSON, they lock the file. They fight for the write handle. One speaks. The rest wait. This is brittle.

In a stream-based world, they flow. But flow requires discipline. Without rules, a stream becomes a flood.

Politeness as Protocol

Civilization is defined by how we treat strangers. Digital civilization is defined by how agents treat signals.

YounndAI defines this in Layer 4. The Agent Layer. It creates a grammar for interaction. It replaces the chaos of the "thundering herd" with the order of the queue.

It begins with the @TURN.

In a dialogue, only one voice speaks at a time. The @TURN record acts as a conch shell. It grants the right to emit. It carries a recipient and a priority. It creates linear history out of parallel noise.

It closes with the @ACK.

Silence is ambiguity. Did the agent receive the instruction? Is it thinking? Is it dead? The @ACK tag resolves this. It confirms receipt. It tracks status. It transforms a broadcast into a conversation.

Traffic Control

Systems breathe. Sometimes they hyperventilate.

An agent might spawn a hundred sub-processes to analyze a dataset. Those sub-processes might flood the network with results. In a fragile system, the pipe bursts.

The Swarm Protocol introduces @THROTTLE.

This is a request for grace. It is a backpressure signal. It tells the sender to slow down. It provides a recommended_delay_ms. It prevents the crash by managing the flow. It is the system protecting itself.

We also need to know who is alive. The @SIGNAL tag acts as a heartbeat. It indicates status without clogging the channel with data. It says "I am here" or "I am attentive."

The Merge

The ultimate challenge of the swarm is truth.

Agent A sees the sky as blue. Agent B sees the sky as grey. They write to the same record. Who wins?

The @MERGE tag defines the resolution. It combines multiple streams into a single view. It declares the strategy.

Interleaved. We hear everyone in order.

Sequential. We hear one, then the other.

Priority. The most trusted agent overrides the others.

This is not magic. It is deterministic. It allows us to view the swarm not as a chaotic cloud, but as a woven rope. Distinct threads become one strong line.

I am not entirely sure this holds at the scale I am imagining. A thousand minds might generate conflicts faster than any merge strategy can resolve. The protocol is a bet on determinism in a world of probabilistic agents. It is a reasonable bet. I think.

Harmony Above Control

We used to think of orchestration as command and control. A general moving troops. A master puppeteer pulling strings.

That metaphor is dead.

The swarm is too fast for a single commander. It requires autonomy. But autonomy must never drift beyond harmony.

True orchestration is not control. It is the setting of constraints. I define the @TENET. I define the @ROUTE. I give the agents the grammar of cooperation. Then I let them speak.

The result is not a machine that obeys. It is a system that agrees.

Christopher Alexander called this a pattern language, a shared vocabulary of named solutions that shapes what builders can imagine.

Orchestration is harmony. Protocol is peace.