A2A Protocol in Practice for Multi-Agent Collaboration

    This article explains why multi-agent systems need standardized communication and how the A2A (Agent-to-Agent) protocol addresses three core problems: capability description, interaction patterns, and discovery and governance. It outlines six common gaps in visual agent orchestration platforms, then presents a practical architecture combining a central registry with bidirectional protocol adapters. You will also find guidance on dynamic semantic routing, a reliability and governance checklist, and a phased adoption roadmap.

    1. From Monolithic Agents to a Collaboration Network: Why Standardized Communication Matters

    As large model applications move from “Q&A assistants” to “business execution agents,” the capability limits of any single agent become increasingly obvious. Real business workflows often span data retrieval, code generation, process approval, and report analysis at the same time, and no single agent can realistically deliver an end-to-end outcome on its own. Multi-agent collaboration is therefore a natural architectural direction: agents with different specialties divide the work, negotiate, and aggregate results.

    Collaboration, however, depends on a shared way to communicate. The early approach was usually point-to-point hardcoding: agent A contains the hardcoded endpoint and parameter format for calling agent B. This works when there are only a few agents, but as the number grows it degrades into an N×N web of glue code, where interface changes, version upgrades, and fault localization all become painful. The industry has gradually converged on a shared conclusion: a protocol layer decoupled from specific frameworks is needed to standardize three things: discovery, description, and invocation.

    2. Three Core Problems That A2A Addresses

    The value of a protocol such as A2A (Agent-to-Agent) can be abstracted into three layers of standardization.

    The first is standardized capability description. Each agent publishes a structured capability declaration externally (commonly called an AgentCard) that includes an identity, a list of executable skills, input and output schemas, the authentication method, and the invocation endpoint. Callers can determine “what this agent can do and how to call it” without reading source code or communicating privately.

    The second is standardized interaction patterns. Tasks are not always a single request followed by a single response. Long-running tasks require asynchronous submission, status queries, and result delivery; streaming scenarios require incremental updates; error scenarios require structured error semantics. The protocol expresses synchronous, asynchronous, and streaming modes in a unified way, so callers do not need to write special logic for every downstream agent.

    The third is standardized discovery and governance. When agents are deployed across different environments, teams, and versions, a centralized registration and discovery plane is needed to handle registration, health checks, tag-based routing, canary releases, and access control.

    3. Typical Platform Gaps: Six Concrete Pain Points

    Consider a visual agent orchestration platform that lacks native protocol support. Developers tend to run into the following problems:

    • Protocol incompatibility: the platform cannot parse capability declaration documents or handle standard message bodies, leaving it naturally isolated from the external agent ecosystem.
    • Difficult discovery: agents are scattered across different places, and every new integration requires a hand-written adapter, so the marginal cost never goes down.
    • Rigid selection: the platform can only call a single, preconfigured downstream agent and cannot dynamically choose based on task semantics.
    • Bloated orchestration: multi-agent collaboration requires stacking large numbers of conditional branches and routing checks on the canvas, which hurts readability.
    • No registry: without a unified inventory, version governance, permission auditing, and capacity planning are impossible.
    • No external exposure: agents built inside the platform can only be used internally and are hard for external systems to discover and invoke in a standard way.

    Together, these six points lead to the same outcome: protocols do not connect, integration is expensive, extension is poor, and external interoperability is missing.

    4. The Solution: A Registry Plus Bidirectional Protocol Adapters

    A workable architecture has two parts: a unified agent registration and discovery service, and a protocol adapter plugin on each side of the orchestration platform.

    The outbound plugin handles “calling external agents.” It has built-in protocol parsing and message conversion, abstracts each node inside the platform as a standard task submission, and automatically handles capability declaration retrieval, parameter validation, authentication, and result write-back.

    The inbound plugin handles “being called by external agents.” It wraps an application orchestrated inside the platform as a standard agent, publishes its capability declaration externally, receives remote tasks, and writes status back, so external agents can call it just like any other standard node.

    With both directions in place, the platform changes from an “island” into a “network node.”

    A sample capability declaration structure is shown below (it only expresses field semantics and is not a specific product interface):

    1. {
    2. "name": "report-agent",
    3. "skills": [
    4. { "id": "build_report", "input": "dataset_uri", "output": "report_uri" }
    5. ],
    6. "auth": { "type": "bearer" },
    7. "endpoint": "https://internal.example/agent"
    8. }

    The abstract outbound invocation flow:

    1. card = registry.resolve(name="report-agent", tags=["finance", "prod"])
    2. task = client.submit(card, skill="build_report", payload={"dataset_uri": uri})
    3. state = client.poll(task.id) # Poll long-running tasks or subscribe to incremental events
    4. result = client.fetch(state.result_uri)

    5. Dynamic Selection: From Hardcoding to Semantic Routing

    With a registry and a unified description in place, routing can move from “hardcoded” to “matched by tags and capabilities.” A three-layer strategy is recommended in practice: the first layer filters coarsely by business tags (environment, region, data sensitivity); the second layer matches precisely by skill and input/output schema; the third layer selects the best option based on real-time metrics (latency, error rate, remaining quota) while keeping a fallback node.

    1. candidates = tag_filter(registry.list())
    2. candidates = capability_match(candidates, task.required_skill)
    3. target = rank_by_score(candidates, metrics[latency, error_rate, quota])[0]

    This design turns canary releases, fault isolation, and cost optimization into configuration changes rather than code changes.

    6. Reliability and Governance Checklist

    Cross-agent calls expand the fault domain, so the following mechanisms must be in place:

    1. Timeouts and retries: distinguish retryable errors from semantic errors, and use exponential backoff with jitter to avoid retry storms.
    2. Idempotency keys: generate a unique key for each task so downstream systems can deduplicate and avoid duplicate charges or duplicate writes.
    3. Circuit breaking and fallback: quickly remove nodes with high error rates and fall back to a simplified flow or cached results.
    4. Observability: use a unified trace across the call chain, record task state transitions and latency distributions, and collect logs and metrics centrally.
    5. Permissions and auditing: authorize at agent granularity and record who invoked which skill and when.
    6. Version compatibility: mark versions in the capability declaration and let callers declare an acceptable range, avoiding parse failures caused by field drift.

    First, inventory existing agents and add structured capability descriptions. Second, deploy the registration and discovery service and connect health checks and a tagging system. Third, enable outbound calls first and validate with a small number of read-only scenarios. Fourth, open inbound exposure and pilot with low-risk applications. Fifth, gradually introduce dynamic routing, canary releases, and quota governance. In related practice, Baidu AI Cloud typically recommends proceeding in the order of “standardize descriptions first, unify registration next, and enable dynamic scheduling last” to avoid the risks of a one-time rewrite.

    8. Summary

    The bottleneck in multi-agent collaboration is not model capability but communication and governance. Standardizing capability description, task interaction, and registration and discovery, and connecting them to an existing orchestration platform through bidirectional adapters, allows agent applications to both consume external capabilities and provide services externally, building a collaboration network that can scale sustainably at a controlled cost.