A coordinator may need a data-preprocessing agent maintained by another team. Instead of rebuilding it or designing a custom API, the coordinator can send it work as an A2A agent. The Agent2Agent (A2A) protocol standardizes communication while leaving the agent’s internal logic opaque and independent of the caller’s framework. section 10.0 section 10.1.2
An A2A agent sits behind an A2A server and executes tasks in an external process. In contrast, a local subagent runs as a tool call in the coordinator’s process and event loop; its developer typically has access to its implementation. An A2A agent can use the same framework as its client or a different one. section 10.1.1 section 10.3.2
A client interacts with a remote agent in two exchanges:
- Discovery: request an AgentCard from the server’s well-known URI. The card describes the agent’s capabilities and where it can be reached. section 10.1.2
- Task execution: send a task to the server and receive a result or error. A2A uses JSON-RPC over HTTP; servers can also support streaming or push notifications for long-running tasks. section 10.1.2 section 10.5
A coordinator LLMAgent can hold an A2A agents registry and disclose available agents through a catalog. During TaskHandler.run_step(), it dispatches work using UseA2AAgentTool. An A2AAgentSpec represents each remote agent. To make an LLMAgent available to other clients, wrap it in LLMAgentA2AExecutor and expose that executor through an A2A server; standing up the server is application code. section 10.2.3 section 10.5
Delegating a hailstone task
A coordinator sends a CrewAI hailstone agent the request to compute a sequence starting at four. The remote agent asks for a positive integer; the coordinator can call the tool again with the supplied task ID and requested information to resume the same remote task. The resulting sequence is 4, 2, 1. section 10.2.3
The process boundary also affects observability: a remote agent’s logs need not appear in the coordinator’s log stream, even when both agents use the same framework. Inspect the server’s logs to see its execution. section 10.3.2
