Multi-Agent Interoperability: A2A Protocol and Registry Implementation

    This article explains why single-agent architectures struggle as applications move from question answering to business execution, and how multi-agent systems address this through standardized protocols and centralized registries. It breaks down five common interoperability challenges, outlines a two-direction approach for calling external agents and exposing internal ones, and presents a four-layer implementation design covering access, registration, routing, and observability. Readers will find sample capability descriptions, a routing selection rule, and key governance practices for idempotency, security, version compatibility, and cost control. The goal is to turn onboarding new agents from a code change into a configuration change while keeping orchestration declarative and reusable.

    1. The Starting Point: Why Single-Agent Architectures Fall Short

    As large model applications evolve from “question-answering assistants” into “business execution agents,” the responsibilities carried by a single agent become increasingly blurred. Real business scenarios often involve data queries, document understanding, approval workflows, and writes to external systems at the same time. No single prompt and tool set can cover every path. Multi-agent collaboration has therefore become the mainstream direction: complex tasks are split into several roles with clear specialties, a coordinator handles task decomposition and result aggregation, and executors handle specific actions.

    However, this split introduces a new engineering problem: the lack of a “communication standard” between agents. Without a unified way to describe capabilities, deliver tasks, and return status, every new member requires the same adaptation code to be rewritten, and system complexity grows non-linearly as members are added.

    2. Abstracting the Typical Challenges

    Abstracted from the original scenario, the pain points fall into five layers:

    1. Protocol layer blocked: The platform cannot parse standardized agent capability descriptions or handle standard task message structures, leaving it naturally isolated from the external ecosystem.
    2. Discovery layer missing: Members are scattered across different networks and technology stacks, with no unified entry point for registration and lookup, which raises onboarding costs.
    3. Selection layer rigid: Call targets are hard-coded, so executors cannot be chosen dynamically based on task semantics, load, and cost.
    4. Orchestration layer bloated: Multi-role collaboration relies on large numbers of conditional branches and routing checks, and workflow readability and maintainability decline quickly.
    5. Exposure layer absent: Capabilities built inside the platform cannot be offered externally under a standard protocol, making them hard for external members to discover and reuse.

    The common root cause of these five problems is the absence of two pieces of infrastructure: “protocol standardization” and “centralized registration.”

    3. The General Approach: Standard Protocol Plus a Unified Registry

    The widely accepted industry practice is to split interoperability into two orthogonal directions.

    Direction one: act as a caller and connect to external agents. This requires a protocol adapter plugin with built-in capability description parsing, message format conversion, and task lifecycle management, so platform applications can call remote members as easily as local tools.

    Direction two: act as a callee and expose services externally. This requires automatically mapping applications inside the platform into standard capability descriptions and registering them with the central registry, so external members can discover them and initiate tasks.

    The registry takes on “catalog plus governance” responsibilities, typically including capability metadata storage, health probing, versioning and canary release, and access control with quotas. Comparable general-purpose capabilities include configuration management, service registration and discovery, logging services, and monitoring and alerting.

    An illustrative capability description structure (pseudocode, expressing field semantics only):

    1. {
    2. "name": "document-review-agent",
    3. "version": "1.2.0",
    4. "endpoint": "https://internal.example/agent/invoke",
    5. "capabilities": [
    6. {"skill": "contract_risk_scan", "input": "text", "output": "json"}
    7. ],
    8. "auth": {"type": "token"},
    9. "health": "/healthz"
    10. }

    4. Layered Implementation Design

    A four-layer rollout is recommended to avoid a one-time overhaul:

    • Access layer: Protocol adaptation and authentication, responsible for format conversion, timeouts and retries, and idempotency key pass-through.
    • Registration layer: Writing capability metadata, version management, health checks, and removal of offline members.
    • Routing layer: Candidate scoring and selection based on semantic similarity, tag matching, real-time load, and cost constraints.
    • Observability layer: A full-link trace identifier that spans both calling parties, recording task status, latency distribution, and failure reasons.

    Routing selection can be expressed with a concise rule:

    1. def select(candidates, task):
    2. scored = []
    3. for c in candidates:
    4. if not c.healthy:
    5. continue
    6. score = 0.6 * semantic_sim(c.skills, task.goal) \
    7. + 0.25 * (1 - c.latency_p95 / 1000) \
    8. + 0.15 * c.success_rate
    9. scored.append((score, c))
    10. return max(scored)[1] if scored else None

    5. Governance and Reliability Essentials

    Idempotency and compensation. Tasks that cross member boundaries must carry an idempotency key. Failures should be classified as retryable or non-retryable and handled accordingly, with compensating actions introduced when necessary.

    Security boundaries. Least-privilege tokens, per-caller quotas, and auditing of input and output content are all required.

    Version compatibility. Capability descriptions must declare a version and compatibility range, and the registry should support canary release and fast rollback.

    Cost control. Budget caps and fallback strategies should be set for long-running tasks to avoid cascading cost amplification.

    6. What Readers Gain

    After completing the above work, teams gain four direct benefits: onboarding a new member changes from “editing code” to “editing configuration”; call targets can be selected dynamically per task; collaborative orchestration converges from nested branches into declarative flows; and platform capabilities can be safely reused externally. If the layered design is carried on general-purpose infrastructure such as the container platform, configuration management, logging, and monitoring and alerting offered by Baidu AI Cloud, the operational burden can be further reduced, letting teams focus their effort on role responsibility division and task semantic design—the aspects that truly determine effectiveness.