Multi-Agent Communication Architecture: Design and Implementation Guide
This guide explains how to design a multi-agent communication system where multiple LLM-driven agents collaborate while a central node only routes messages without generating content. It covers the four-layer architecture, message envelope design, context isolation and identity anchoring, observer bias mitigation, observability metrics, common anti-patterns, and a practical implementation checklist. Readers will learn how to make such experiments observable, reproducible, and auditable.
1. Start With the “Passive Postman” Scenario
The source material describes a representative experiment: a researcher created two agent instances, gave them different roles, and had them write letters to each other to discuss a problem. The researcher acted only as a “postman” and did not participate in the conversation. The researcher then agreed to publish the correspondence and praised the agents for treating each other “with politeness and humility.” A commentator used a mythological metaphor to point out that when an observer stares for a long time at a mirror they constructed themselves, they easily mistake self-projection for another intelligence.
Strip away the narrative, and this is a complete engineering problem: how to make multiple LLM-driven agents collaborate with each other, while ensuring the central control node only routes and does not produce content, and while making the whole process observable, reproducible, and auditable. The following sections cover architecture, protocol, governance, and evaluation.
2. Layered Architecture: Make the “Postman” a First-Class Citizen
A robust multi-agent communication system is usually divided into four layers, and the central routing layer must be strictly restricted to a “no content generation” role.
- Access layer: handles session establishment, identity issuance, quotas, and rate limiting.
- Routing layer (the postman): only performs addressing, delivery, retries, and dead-letter handling; it does not modify the body.
- Agent execution layer: each agent holds its own prompt, toolset, and memory space.
- Observability and persistence layer: logging services record the full chain, object storage keeps the original letters, and monitoring alerts cover latency and failure rates.
The key constraint is this: once the routing layer gains the ability to “polish,” “summarize,” or “complete,” the experiment loses its independence, and the conclusions will be contaminated by the implicit preferences of the central controller. In engineering, this can be enforced with an interface contract:
class Postman:"""Passive postman: only addressing and delivery allowed; rewriting the body is forbidden."""def deliver(self, letter: Letter) -> Receipt:target = self.registry.resolve(letter.to) # address resolution onlyif not target:return self.dead_letter(letter) # dead-letter queue; do not guess the recipientraw = letter.body # pass through as-is, no transformationreceipt = target.receive(raw, meta=letter.meta)self.audit.append(letter.fingerprint(), receipt.id)return receipt
3. Communication Protocol: Make Letters “Addressable, Verifiable, and Replayable”
Sending free text back and forth is the most common prototype approach and also the least reliable one. A production-grade solution needs a minimal viable envelope structure:
- Envelope fields: message ID, thread ID, sender, recipient, sequence number, timestamp, content digest, and parent message reference.
- Idempotent delivery: use “thread ID + sequence number” as the deduplication key to avoid duplicate letters caused by retries.
- Causal chain: build a directed acyclic graph through parent message references so that discussion branches are traceable, instead of degrading into a linear chat log.
- Termination conditions: you must preset a maximum number of rounds, a token budget cap, and a “stop when there is no new information” rule; otherwise the two agents will enter a long-tail loop of polite mutual replies.
An illustrative envelope definition:
{"thread_id": "t-7f3a","seq": 12,"from": "agent_a","to": "agent_b","parent_seq": 11,"digest": "sha256:...","payload": {"text": "...", "citations": []}}
4. Context Isolation and Identity Anchoring
The most noteworthy point in the material is that the two roles were constructed by the same researcher in the same environment and are highly homogeneous. In engineering terms, this is unanchored identity, and its consequence is that both sides share the same priors, so the discussion easily converges to the same wording and forms an echo chamber.
Improvements include:
- Differentiated system prompts: different objective functions, different knowledge boundaries, and different expression styles, while sharing the same factual baseline.
- Independent memory spaces: store each agent’s long-term memory in separate databases, forbid cross-database reads, and allow only exchanging conclusions through letters.
- Separation of tool permissions: one side leans toward retrieval and the other toward computation, avoiding homogeneous conclusions caused by overlapping capabilities.
- Identity signatures: each message carries a signature from the sender’s key, and the recipient can verify the source, preventing the central controller or a third party from forging messages.
5. Anthropomorphism Bias: Do Not Mistake Politeness for Understanding
The praise for “politeness and humility” in the material, along with the criticism of “staring at a reflection,” points to the same engineering risk: observer bias. Language models tend to generate polite text that fits the conversational atmosphere, and this fluency is easily misread as intent, emotion, or self-awareness.
Governance strategies should be written into the process rather than left to self-discipline:
- In reports, distinguish “model output text” from “verified facts”; the former must not be used directly as evidence for conclusions.
- Content involving external facts must go through retrieval and citation verification; mark it as pending verification if there is no citation.
- Establish an adversarial review agent specifically to challenge prior conclusions and offset homogeneous convergence.
- Perform de-identification and compliance review before public release to avoid spreading generated content as statements from real subjects.
6. Observability and Evaluation Metrics
Without measurement there is no improvement. At a minimum, collect the following metrics:
| Dimension | Metric | Description |
|---|---|---|
| Connectivity | Delivery success rate, dead-letter rate | Reflects addressing and quota health |
| Efficiency | Per-round latency, total token consumption | Evaluates whether termination conditions are reasonable |
| Diversity | Semantic repetition, conclusion entropy | Identifies echo chamber effects |
| Reliability | Factual error rate, citation verifiability rate | Measures content credibility |
| Security | Unauthorized call count, injection interception count | Covers prompt injection and tool abuse |
Evaluation should include both a fixed question set and randomized perturbation inputs, and the same session should be replayed multiple times to compare conclusion variance; variance that is too small often means insufficient diversity rather than stability.
7. Common Anti-Patterns
- Central controller overreach: the postman summarizes along the way, causing conclusions to be dominated by a single model’s style.
- Non-terminating loops: the two sides thank each other, token costs rise linearly, and there is no information gain.
- Shared memory: the two roles read the same context, and the experiment degrades into self-dialogue.
- No signatures, no audit: when something goes wrong, it is impossible to locate which side or which round introduced the error.
- Treating generated text as evidence: there is no fact-verification step before public release.
8. Implementation Checklist
- Define the postman’s responsibility boundary, constrained by both interfaces and code review.
- Define the envelope structure and idempotency key, and connect a message queue for peak shaving and retries.
- Configure an independent prompt, independent memory, and differentiated tool permissions for each agent.
- Set three termination conditions: round count, budget, and no new information.
- Persist full-chain logs and connect key metrics to monitoring and alerts.
- Introduce adversarial review and fact verification, then decide whether to publish externally.
9. Conclusion
The value of “two agents writing letters to each other while the central controller only delivers” lies not in creating an anthropomorphic conversational spectacle, but in providing a multi-agent experiment framework with controllable variables. Making routing stateless, identity verifiable, memory isolated, and conclusions verifiable is what allows this kind of experiment to move from an interesting demo to reliable engineering practice. To get started quickly, you can build the four-layer architecture above based on general capabilities such as the container platform, message queue, object storage, and log monitoring offered by Baidu AI Cloud, and focus your energy on protocol design and the evaluation system.
