A Practical Guide to Multi-Agent Collaboration and Protocol Design
This article explains why a single AI agent often hits context, role, and semantic bottlenecks, and how splitting it into conversational and execution agents connected by a layered protocol can help. You will learn how to define a structured handoff, separate responsibilities across five protocol layers, reduce token costs by sending schema structures only once, issue short-lived credentials for agents, and measure system behavior with observability and evaluation practices. The guide closes with a practical rollout checklist and a controlled experiment approach for quantifying results.
1. The Starting Problem: Why a Single Agent Is Not Enough
In real engineering work, connecting one large language model to a set of business APIs quickly runs into three bottlenecks.
The first is wasted context. Structured data returned by APIs repeats field names on every page and in every record. The model already “learned” the structure the first time, but the transport layer has no concept of “you already know this.” The bytes are still sent, the tokenizer still splits them, and you still pay for them. On list APIs with dense fields, this repeated structure can account for a substantial share of response tokens. The exact proportion varies widely by business, so you should measure it with your own reproducible load tests.
The second is role overload. A single agent handles conversation, planning, retrieval, execution, and auditing at the same time. The system prompt grows to thousands of lines, instructions conflict with each other, and behavior becomes unpredictable.
The third is missing semantics. APIs return data but not meaning. Teams end up explaining in prompts, over and over, that “this field is a timestamp” or “this status code means shipped.” Every inference has to redo that explanation.
Taken together, these three problems point to a conclusion that is not “switch to a stronger model.” The conclusion is to split the monolithic agent into collaborating agents and add an explicit protocol layer between them.
2. Complementary Capabilities: Dividing Conversational and Execution Agents
A common approach is to split agents along the interaction surface and the execution surface.
- Conversational agents handle intent clarification, multi-turn follow-up questions, result explanation, and phrasing. They prioritize low latency and natural language.
- Execution agents handle tool orchestration, data retrieval, format conversion, retry on failure, and state write-back. They prioritize determinism and auditability.
The key difference is tolerance for uncertainty: the conversational layer allows ambiguity, while the execution layer must converge. That is why a structured handoff is needed in between, translating natural-language intent into a task description with types, constraints, and priorities. For example:
{"task_id": "t-20260901-0007","goal": "Query out-of-stock products from the last 30 days and generate restocking suggestions","constraints": {"page_size": 100,"max_pages": 5,"timeout_ms": 3000},"output_schema": ["sku", "stock", "eta_days"],"priority": "normal","trace": {"session": "s-42", "span": 3}}
Once this handoff format is standardized, the conversational layer no longer needs to understand what business fields mean, and the execution layer no longer needs to guess the user’s real intent.
3. Protocol Layers: Design Trade-offs in a Five-Layer Structure
To make different implementations interoperable, the protocol should be layered. Each layer solves one problem and can evolve independently.
- Transport layer: Reuse mature request/response semantics. Only define connection reuse, timeouts, retries, and idempotency keys. Do not introduce a new network stack.
- Description layer: Declare the input and output structure of an interaction in a machine-readable way, and support a cache identifier for “send the structure only once.”
- Semantic layer: Deliver field meanings, units, enum mappings, and the data dictionary along with the description, so the model does not have to rely on prompt memory.
- Identity layer: Issue verifiable credentials to agents, carrying the issuer, scope, validity period, and a way to query revocation status.
- Audit layer: Generate a correlatable trace identifier for every cross-agent call, linking logs, metrics, and sampled traces.
The direct benefit of layering is replaceability: you can swap the transport implementation, upgrade the semantic layer independently, and connect the identity layer to your organization’s existing credential system without rebuilding the whole chain.
4. Context and Cost Optimization: Send the Structure Only Once
For the repeated-structure problem, three techniques can be combined.
- Schema fingerprinting: Hash the described structure. Send the full structure on the first interaction, then send only the fingerprint and the data body afterward.
- Field projection: The caller declares the set of fields it needs, and the server projects the response to that set, avoiding “return everything and then discard.”
- Semantic caching: Cache the parsed result of “structure + data dictionary” in session-level context and reuse it across turns.
First call: { schema_hash: "a1b2", schema: {...}, data: [...] }Later calls: { schema_hash: "a1b2", data: [...] }
The gains depend heavily on the shape of the business. APIs with many fields, many records, and stable structures benefit most, while highly dynamic structures benefit little. It is therefore advisable to run a small controlled experiment on real traffic first: send the same batch of requests through both the pre-change and post-change paths, compare total tokens, time to first token, and failure rate, and then decide whether to roll out fully.
5. Identity and Permissions: Agents Need Credentials Too
When an agent calls business APIs on behalf of a user, the server needs to answer four questions: who issued the credential, what it can do, whether it is still valid, and how to revoke it. A workable approach is to issue short-lived credentials that carry scope and audience, validate them centrally at the gateway, and write the validation result to the audit log. There are three pitfalls to avoid: hardcoding long-lived keys in prompts or code; scopes that are too broad and allow privilege escalation; and verifying the signature without checking revocation status.
6. Observability and Evaluation: No Measurement, No Optimization
Failures in multi-agent systems are often not a wrong answer but a silent degradation at one hop in the chain. It is recommended to collect at least four kinds of metrics: hop count distribution, per-hop latency, repeated-structure ratio, and tool call failures and retry counts. Evaluation should be layered: contract consistency tests at the protocol layer, task completion rate and handoff loss tests at the collaboration layer, and a combination of human sampling and automated scoring end to end. All optimizations should keep a rollback switch.
7. Implementation Checklist
- Define the handoff structure before discussing model selection;
- Pilot schema fingerprinting and field projection on list-type APIs first;
- Keep identity credentials short-lived, revocable, and minimally scoped;
- Carry a trace identifier across both the conversational and execution layers;
- Quantify gains with controlled experiments and control risk with switches;
- State clearly what is not yet figured out (such as aligning cross-organization semantic dictionaries) and openly seek feedback.
Multi-agent collaboration is not about forcing two systems together. It is about using a protocol to spell out who speaks, who acts, how the handoff happens, and how accountability is traced. Once the boundaries are clear, improvements in model capability can truly translate into system-level stability and cost advantages.
