An enterprise architect is designing a multi-agent system using the Agent2Agent (A2A) protocol. The system has an Orchestrator Agent that receives complex employee onboarding requests and must delegate to three specialized sub-agents: an HR Data Agent (creates Dataverse employee records), an IT Provisioning Agent (calls Azure AD Graph API to create accounts), and a Facilities Agent (submits a workspace ticket to ServiceNow). The orchestrator must collect results from all three sub-agents before sending a final confirmation. Which A2A interaction pattern and task-management approach best supports this architecture?
Select an answer to reveal the explanation.
Short Explanation
You want the orchestrator to fan out all three independent tasks in parallel, track each by task identifier, and fan in only when every task hits a terminal state. If one fails, you can trigger compensating actions instead of pretending onboarding succeeded. Sequential dispatch just wastes time when the human resources, information technology, and facilities agents don't depend on each other.
Full Explanation
The Agent-to-Agent protocol is an open standard for agent-to-agent communication that defines task lifecycle states (submitted, working, input-required, completed, failed, cancelled), Server-Sent Events-based streaming for progress updates, and a JSON-RPC-style message format. For orchestration scenarios, the protocol supports both sequential and parallel task dispatch.
The pattern that uses the task/send endpoint to dispatch all three tasks in parallel with unique task identifiers, polls or subscribes to each task's status stream, and implements a fan-out/fan-in pattern where the final confirmation is only generated when all three task identifiers report a terminal state (completed or failed), allowing failed tasks to trigger compensating actions, is the best fit. The three sub-agents (human resources, information technology, and facilities) have no data dependencies on each other — the employee's onboarding information needed by each is available from the original request. There is no reason to serialize these tasks. Parallel dispatch using unique task identifiers allows all three sub-agents to work simultaneously, reducing total onboarding time from the sum of three durations to approximately the duration of the longest single task. The fan-in logic waits for all three task identifiers to reach a terminal state before generating the confirmation. Handling both completed and failed terminal states with compensating actions (for example, rolling back the Dataverse record if information technology provisioning fails) is a production-grade requirement for resilient orchestration.
The sequential pattern that sends requests to each sub-agent and waits for each to complete before calling the next, using the completed state to chain requests in series, works correctly but is suboptimal. When the three tasks have no dependencies on each other, serializing them triples the wait time unnecessarily. For an onboarding workflow, this could mean minutes of additional latency for each new hire. Sequential is appropriate when a later task depends on the output of an earlier task, which is not the case here.
The peer-to-peer pattern that promotes each sub-agent to orchestrator level, with each sub-agent directly sending requests to the other sub-agents and passing their combined results back to the original requestor, eliminating the need for a central orchestrator, creates circular dependency risks, makes the system harder to monitor and debug (there is no central point for status tracking), and violates the orchestrator pattern's core benefit: centralized task coordination and compensating action management. This approach is not recommended for production multi-agent systems.
The parallel dispatch pattern that sends requests to all three sub-agents concurrently, subscribes to each task's streaming updates, and aggregates task results only after all three reach the completed or failed state is functionally similar and is the main distractor. The key difference is that it stops at aggregation after terminal states and does not describe compensating actions or explicit task-identifier correlation needed for production failure handling. The more complete pattern specifies using task identifiers as the correlation mechanism, which aligns with protocol specifics.
Exam tip: For Agent-to-Agent questions, know the task lifecycle states (submitted to working to completed, failed, or cancelled), the difference between polling and streaming for status updates, and the fan-out/fan-in orchestration pattern. Know that parallel dispatch is appropriate when sub-tasks are independent, and that compensating actions (sagas) are required for distributed consistency when some sub-tasks may fail.