Introduction to Agent-to-Agent (A2A) Protocol in Google ADK
Explore the Agent2Agent (A2A) Protocol in Google ADK, understanding when to use remote agents over local sub-agents to build scalable, multi-agent systems.
Posted on: 2026-03-04 by AI Assistant

As you build increasingly complex agentic systems, you quickly discover that a single AI agent is rarely enough. The real power of agentic applications lies in specialized agents collaborating to solve multi-faceted problems. To facilitate this collaboration across boundaries, the Google Agent Development Kit (ADK) utilizes the Agent2Agent (A2A) Protocol as the standard for seamless agent communication.
A2A vs. Local Sub-Agents: What is the Difference?
Before diving into A2A, it is crucial to understand the distinction between local sub-agents and remote agents.
- Local Sub-Agents: These are agents that run within the same application process as your primary agent. Think of them as internal modules or libraries. Because they share the same memory space, communication is instantaneous and incurs no network overhead.
- Remote Agents (A2A): These are independent agents running as separate services, often on entirely different infrastructure. They communicate over a network, and the A2A protocol defines the standardized way they interact.
When Should You Use the A2A Protocol?
You should consider leveraging A2A when your system requires distinct boundaries, integration with external parties, or cross-platform compatibility.
Concrete Use Cases for A2A
- Third-Party Services: Your main agent needs to interact with an external financial data provider that exposes an A2A-compatible agent for real-time stock prices.
- Microservices Architecture: You are building a large-scale system broken down into independent services (e.g., an Order Processing Agent communicating with an Inventory Management Agent).
- Cross-Language Communication: Your core logic is built in a Python agent, but you need to integrate a specialized legacy component written in Java. A2A bridges the language gap.
- Formal API Enforcement: In a platform where multiple teams contribute independent agents, A2A provides a strict, formal contract to ensure compatibility and system stability.
When Should You Avoid A2A?
While powerful, A2A introduces network latency and serialization overhead. You should stick to Local Sub-Agents when:
- Organizing Internal Code: Breaking a complex task into manageable functions (e.g., a
DataValidatorsub-agent that cleans input data). - Performance-Critical Operations: A sub-agent performing high-frequency, low-latency tasks tightly coupled with the main agent.
- Shared Memory Requirements: When sub-agents require direct access to the main agent’s internal state.
- Simple Helper Functions: Small, reusable logic pieces that do not require independent deployment.
The A2A Workflow in ADK
The Google ADK significantly simplifies the process of building and connecting agents using the A2A protocol.
The workflow begins with Exposing an agent. You take an existing ADK agent and expose it, effectively turning it into an A2AServer. This server acts as a public interface, allowing other agents on the network to send requests and collaborate. Think of it as opening an API endpoint specifically designed for agentic interaction, following a robust and standardized communication contract.
By mastering the balance between local sub-agents for speed and A2A for scale and integration, you can architect highly sophisticated, resilient multi-agent systems.