Agent Swarms, Byzantine Math, and the Cost of Coordination
To avoid the massive latency tax of distributed consensus, developers must isolate non-deterministic language models behind a deterministic control plane.
By Owen Tate
Sparked by Patterns and problems in emerging multi-agent systems · discussion

If you blur your eyes at the architectural diagrams for modern AI agent swarms, they look exactly like Leslie Lamport's classic 1982 paper on the Byzantine Generals Problem. I was re-reading Lamport recently while looking at recent Anthropic research on multi-agent systems, trying to map the theoretical foundations to the current industry excitement. It seems like everywhere you look, there are breathless Hacker News threads praising the magic of letting large language models collaboratively debate their way to the right answer. Strip away the generative AI gloss, however, and the reality is stark. A multi-agent swarm functions, in strict distributed systems terminology, as a consensus protocol running over an untrusted network where every node is inherently Byzantine (prone to hallucination, formatting errors, or catastrophic distraction).
So let's ask the critical structural question. Where is the hidden coordination? The naive intuition suggests that having multiple LLMs critique each other improves accuracy because they catch each other's mistakes. You can picture the diagram on a whiteboard. Agent A drafts code, Agent B reviews it, Agent C arbitrates, and Agent D summarizes. We assume the network is reliable, the agents are simply thinking, and we get better results linearly as we add more participants. In reality, we are asking fundamentally non-deterministic, faulty nodes to achieve consensus on a shared state. As any seasoned engineer working on databases knows, demanding synchronous agreement across independent nodes is precisely what throttles throughput. When you ask models to coordinate, you pay a massive latency tax for distributed agreement on top of the baseline inference costs.
Let's run the math to see exactly how this scales. To establish the mathematical floor for reaching safe agreement among untrusted nodes, we can look to Castro and Liskov's 1999 paper on Practical Byzantine Fault Tolerance (PBFT). The physics of distributed computing dictate that a fully connected mesh of non-deterministic nodes requires $O(N^2)$ message complexity to reach consensus. Forget the relatively breezy $O(N \log N)$ work of a highly optimized sorting algorithm. Instead, we are blindly broadcasting state across the entire mesh. Let's consider a highly modest $N=5$ agent swarm. To step through the standard prepare and commit phases safely, each agent must broadcast to every other agent. For five agents to actually agree on a final output, we are looking at roughly 25 messages crossing the wire.
In traditional database architectures, these 25 messages are UDP packets taking microseconds over a local Top-of-Rack switch. Production environments, however, are notoriously hostile to pristine theoretical models. In our AI system, every single message is a prompt generation. Let's assume each node takes a breezy 5 seconds of latency to reply and costs a penny in tokens. The math quickly goes from theoretical scaling limits to catastrophic operational reality. A simple five-node agreement protocol takes over two minutes of wall-clock time and burns a quarter just to decide on a valid JSON schema. Oof.
Now scale it up just slightly to handle a more complex task. What happens at $N=10$? What about $N=20$? The message count explodes quadratically, but the real killer is the operational failure modes. LLMs are not pristine state machines; they suffer from the AI equivalent of ambient thermal noise and errant cosmic rays. If Agent C hallucinates a malformed response or forgets the context window during the final commit phase (I thought we were generating Python, but here is a recipe for pie), it forces a completely new round of consensus. Retry storms trigger as the orchestration layer panics. The queue length inevitably approaches infinity as the agents argue in an endless loop, generating increasingly deranged tokens. We have inadvertently built the slowest, most expensive, least reliable state machine in computer science history.
Trying to fix this with clever prompt engineering or more tightly aligned models completely misses the underlying structural constraint. We must instead adopt standard cloud primitives—specifically, the heuristic of separating the control plane from the data plane. The LLM is a perfectly reasonable component for isolated text generation, but relying on it to mediate distributed consensus is a recipe for operational disaster.
We must define a strict target architecture. The control plane—responsible for routing, consensus, retry logic, and state management—must be entirely deterministic. It should be written in pure Python, Go, or Rust.[^1] The data plane—the actual generative work—is where the isolated LLM lives. You don't let the data plane decide how to route packets across your network, and you certainly don't let a non-deterministic LLM decide when distributed consensus has been reached. Open-ended agent swarms are an architectural dead end because they merge these concerns, allowing the chaos of the data plane to dictate the flow of the control plane (which, as any on-call engineer will tell you, guarantees an eventual outage). We must treat LLMs as isolated, tightly bounded components locked safely behind a rigid orchestrator.
By pulling the coordination burden out of the prompt and putting it into compiled code, we sidestep the $O(N^2)$ Byzantine tax entirely. We stop asking non-deterministic models to act like network engineers. Simplicity, as always, is a system property. If we want intelligent systems to scale, we have to stop asking models to coordinate; put the non-determinism in the data plane, and let boring, deterministic code drive the bus.
[^1]: This architectural isolation ensures that when the LLM inevitably outputs a hallucinated formatting error, the resulting exception is caught by a standard, predictable try/catch block, rather than initiating a cascading, multi-agent existential crisis.