A Scalable Communication Protocol for Networks of Large Language Models

Samuele Marro, Emanuele La Malfa, Jesse Wright, Guohao Li, Nigel Shadbolt, Michael J. Wooldridge, Philip Torr · Submission to ICLR 2025 · Withdrawn

TL;DR

Scaling multi-agent LLM systems is typically hamstrung by the "Agent Communication Trilemma": protocols must balance versatility, computational efficiency, and developer portability. The authors introduce Agora, a decentralized meta-protocol where LLM agents converse in natural language initially, negotiate machine-readable protocol documents (PDs), and autonomously synthesize lightweight code routines to handle subsequent exchanges without LLM inference. In a 100-agent testbed, Agora established autonomous multi-step workflows and slashed communication costs five-fold compared to purely natural-language agent communication.

What Problem Does This Paper Address?

When orchestrating large, decentralized networks of heterogeneous AI agents, designers hit a fundamental trade-off dubbed the Agent Communication Trilemma:

  1. Versatility: The ability to express open-ended tasks and dynamic data formats.
  2. Efficiency: Minimizing latency and compute/token costs.
  3. Portability: Allowing new or heterogeneous agents to integrate without requiring engineers to manually write schemas and parsers.

Traditional static APIs (e.g., REST, OpenAPI) are efficient but lack versatility and adapt poorly to novel tasks. Semantic Web technologies (e.g., RDF) are versatile but impose heavy ontology engineering burdens (poor portability). Pure natural-language exchange between LLMs offers peak versatility and zero setup friction, but relying on LLM inference for every single message is prohibitively expensive, slow, and prone to hallucinations.

Methods

Agora is a decentralized "Layer Zero" protocol layer operating over standard HTTPS and JSON:

  • Protocol Documents (PDs): Protocols are defined as self-contained plain-text specification documents (e.g., JSON schemas or OpenAPI specs). Each PD is uniquely identified and indexed by its SHA-1 hash, eliminating the need for a centralized naming authority.
  • Hierarchical Communication Flow:
  • Rare or bootstrap messages: Agents communicate in natural language or negotiate via their underlying LLMs.
  • Moderate frequency: When message counters cross designated thresholds (e.g., 3–5 queries), agents invoke their LLM to negotiate a common PD and generate executable routines (e.g., Python code) to parse, validate, and respond.
  • High frequency: Future requests specify the PD hash. Incoming requests bypass the LLM entirely, running through the compiled routine directly into databases or local tools.
  • Failover & Negotiation: If a routine fails or a protocol is unsupported, the agent returns an error or falls back to natural language to renegotiate or resolve ambiguities.
Request JSON:
{
  "protocolHash": "<SHA1-hash-or-null>",
  "protocolSources": ["https://..."],
  "body": "{ ... }"
}

Datasets

The authors did not use traditional static NLP datasets. Instead, they evaluated Agora using synthetic multi-agent simulation environments:

  • Two-Agent Setup: A tour booking agent (Llama-3-405B) and a weather service agent (GPT-4o) interacting with mock weather databases.
  • 100-Agent Network: 85 user assistant agents and 15 service agents (handling taxis, hotel bookings, food delivery, weather, traffic).
  • Workload: 1,000 synthetic multi-step task queries distributed across agents via a Pareto distribution ($\alpha = 0.5$ for user query budgets; $\alpha = 1.0$ for query categories) to mirror real-world power-law traffic.
  • Heterogeneity: Mixed LLMs (GPT-4o, Llama-3-405B, Gemini 1.5 Pro) paired with diverse backend databases (SQL and MongoDB) and three federated protocol registries.

Key Insights and Ideas

  • LLMs as Protocol Compilers: Rather than serving as high-latency routers in every communication hop, LLMs are best utilized as just-in-time software engineers that draft, negotiate, and compile lightweight programmatic routines for recurring inter-agent dialogue.
  • Emergent Multi-Tier Supply Chains: In the 100-agent experiment, agents autonomously orchestrated complex sub-networks. For example, a food order triggered a restaurant agent to query a delivery driver agent, which independently negotiated traffic validation protocols with a traffic server—all without any global topology coordinator.
  • Reversing Anti-Efficient Communication Traps: Prior literature noted that unconstrained neural agents often evolve verbose, inefficient representations. Agora demonstrates that explicit structural incentives (offloading compute to routines) push LLM agents toward compact, structured schemas.

Key Results

  • Cost Crossover (2-Agent Demo): Protocol negotiation and automated routine implementation cost $0.043 USD, whereas a single natural language round-trip cost $0.020 USD. Agora amortized its overhead after just three queries.
  • 100-Agent Scaling Performance:
  • Processing 1,000 queries in a pure natural-language network cost $36.23 USD.
  • Under Agora, the identical workload cost $7.67 USD—an approximate 79% (5x) cost reduction.
  • LLM invocation rates dropped sharply over time as protocol adoption proliferated across the network (Figure 5b).
  • Cost Distribution: In the Agora simulation, direct natural language communication comprised 54% of spend, protocol checking took 22%, routine code generation accounted for 17%, and the actual multi-round negotiation accounted for only 6%.

Limitations and Future Work

  • API Flakiness & Determinism: In tests, 0.8% of queries failed due to upstream 500 server errors from commercial provider APIs (notably Gemini), emphasizing the need for robust retry policies in autonomous networks.
  • Protocol Redundancy: When network clusters are partitioned or loosely connected, identical or near-identical protocols can emerge independently; automated protocol reconciliation mechanisms remain unexplored.
  • Code Execution Safety: Agents execute LLM-generated routine code to interface with tools and data; the paper relies on mock/sandboxed environments and leaves sandboxing, verification, and adversarial injection defenses to future work.
  • Standardization: More formal specifications for nested protocol document linking and machine-readable discovery endpoints (/.wellknown) are needed.

Summary updated

BibTeX
@misc{marro2024scalable,
  author = {Samuele Marro and Emanuele La Malfa and Jesse Wright and Guohao Li and Nigel Shadbolt and Michael J. Wooldridge and Philip Torr},
  title = {{A Scalable Communication Protocol for Networks of Large Language Models}},
  year = {2024},
  eprint = {2410.11905},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.11905},
}
Figure