Multi-Agent Architecture Design: Protocol Layer Optimization in Practice

    This article examines why combining multiple agents often fails to deliver the sum of their capabilities, and traces the root causes to the communication layer rather than model quality. It covers four underlying issues—repeated schema transmission, missing caller identity, semantics deferred to inference time, and inconsistent error semantics—then proposes a five-layer protocol design and a practical checklist. Readers will also find the open questions that remain unresolved, along with a recommendation to start from reproducible measurement rather than universal numbers.

    1. Where the Problem Starts: Why Chaining Two Agents Together Breaks Down

    When teams first attempt a composite agent architecture, the initial idea is usually straightforward: one agent is good at multi-turn dialogue and task planning, another is good at interacting with external systems and executing actions, so wiring them in series should combine their strengths. In practice, the result often falls short of the sum of the two capabilities, and three typical symptoms appear:

    1. The same content is injected into the context repeatedly, and inference cost climbs quickly.
    2. The execution side cannot tell who the caller is or where the permission boundary lies.
    3. The same field is given different interpretations across turns, so the planning side and the execution side end up talking past each other.

    The root cause of these symptoms is not model capability but a communication layer between agents that is designed too coarsely. This article does not revolve around any specific framework or tool. Instead, it abstracts the problem into a general engineering topic: the protocol for agent-to-agent and agent-to-service communication.

    2. Re-examining Four Underlying Issues

    2.1 Repeated Schema Transmission

    When an agent accesses a data interface through a generic request-response pattern, field names, type descriptions, and enum meanings are repeated with every record and every page of results. Structure the model already “learned” in the first turn still has to be re-parsed byte by byte afterward. In field-dense directory, ledger, and feed-style workloads, this redundancy often consumes a substantial share of the context budget. It is worth stressing that the exact share is strongly tied to the workload, and any “universal number” detached from the workload has no reference value. The rigorous approach is to first establish a reproducible measurement method, then discuss the gains from optimization.

    There are three layers of feasible mitigation. First, separate the schema definition from the data payload, and negotiate the schema only once with a version number attached. Second, replace repeated per-record key names with a compact record encoding. Third, trim fields on the server side so that only the columns the current task actually needs are returned.

    2.2 Nowhere to Put the Caller’s Identity

    Generic authentication mechanisms were originally designed for human users or for “services disguised as humans.” When an agent makes a call on behalf of a user, the protocol offers no standard place to express who issued it, which scopes were granted, whether it has been revoked, and when it expires. The common workaround in practice is to stuff everything into a generic token header and let the gateway parse it on its own. The result is that every team reinvents the wheel, and the wheels are mutually incompatible.

    A more reasonable direction is to make the identity assertion a first-class citizen within the protocol, with fields for the issuer identifier, subject identifier, scopes, validity period, and revocation checkpoint, while allowing minimal pass-through along the call chain so credentials are not copied endlessly across multiple hops.

    Illustrative structure (pseudocode, expressing field semantics only):

    1. PrincipalAssertion {
    2. issuer: string
    3. subject: string // which user is being represented
    4. agent_id: string // which agent instance
    5. scopes: string[]
    6. issued_at: timestamp
    7. expires_at: timestamp
    8. revocation_ref: string // reference for revocation lookup
    9. }

    2.3 The Semantic Layer Pushed Entirely to Inference Time

    The interface returns only structured data and not the meaning of the fields, so the model has to improvise a crash course through the system prompt: whether a given time field is in seconds or milliseconds, what business stage a given status code represents. This kind of knowledge should be declared once in the protocol or in the capability description, yet it is consumed repeatedly at every inference, which is both unstable and expensive.

    The engineering answer is to bind semantic descriptions to capability declarations, forming a capability manifest that can be cached and versioned, and to let clients load only what a task requires.

    2.4 Inconsistent Error Semantics

    In a composite architecture, failures are often compressed into one vague status code plus a piece of free text, leaving the planning side unable to distinguish “retryable,” “needs a different path,” and “needs human confirmation.” The protocol should define structured error categories, a retryable flag, backoff suggestions, and a correlation tracking identifier.

    3. Layered Design Recommendation

    Split the communication capability into five layers, each with a single responsibility and the ability to evolve independently:

    1. Transport and connection layer: handles the byte stream, multiplexing, and backpressure.
    2. Schema negotiation layer: negotiates structure, version, and compression strategy once.
    3. Identity and authorization layer: carries subject assertions and scope validation.
    4. Semantics and capability layer: field meanings, enums, capability manifests, and matching rules.
    5. Orchestration and error layer: task decomposition, retry strategy, structured errors, and tracing.

    The key benefit of layering is that schemas and semantics can be cached and reused, identity can be audited independently, and errors can be handled uniformly in the orchestration layer, instead of every agent implementing all of it separately.

    4. Implementation Checklist

    • Have you reduced schema transmission from “per record” to “once per session”?
    • Have you introduced compact encoding and field trimming to cut useless context?
    • Have you replaced ad-hoc token assembly with a declarative identity structure?
    • Have you distilled field semantics and enum meanings into a versioned capability description?
    • Have you unified structured errors and retry semantics?
    • Have you established a reproducible measurement standard before evaluating how much optimization achieves?

    5. What Is Still Unclear

    Honestly marking the unknowns is part of protocol design. There are at least three open questions right now: how to establish trust and signing for capability descriptions in cross-organization scenarios; how to balance minimal pass-through of identity assertions against auditing in long call chains; and how to prevent old clients from silently misreading when semantic versions evolve. None of these has a once-and-for-all answer, and all of them need continuous validation under real traffic.

    If you observe similar redundancy and semantic drift in your own scenarios, you are welcome to start the discussion from the “measurement method” rather than from “conclusion numbers.” That is more valuable than arguing over the merits of one particular implementation.