An AI Travel Agent in Action: A Detailed Look at How Two Agents Plan a Trip
The future of Artificial Intelligence is intrinsically collaborative. Complex tasks are best handled by a decentralized team of specialized AI agents working together across boundaries.
In this technical breakdown published on Medium, I analyze a cross-agent travel scenario to show how two crucial industry standards—Google’s Agent-to-Agent (A2A) protocol and Anthropic’s Model Context Protocol (MCP)—join forces to create a highly interoperable system using a flight-booking scenario (New York to Paris).
Dual-Protocol Architectural Layout:
- The Scenario Setup: The system utilizes a user-facing Travel Planner Agent (the high-level strategist that lacks built-in search functions) and a specialized Flight Booker Agent (the technical execution specialist with access to live travel APIs).
- Step 1: The A2A Delegation Loop (Agent-to-Agent): To delegate work, the Travel Planner reads the Flight Booker’s machine-readable Agent Card—a digital business card specifying its endpoints and capability schemas (like
find_flights). The Planner issues an A2A work order over HTTP with a distincttask_id, structured payloads containing inputs (departure_city,arrival_city,date), and a target executioncallback_url. - Step 2: The MCP Execution Loop (Agent-to-Tool): Upon receiving the task, the Flight Booker needs to hit the live Airline Global Distribution System (GDS) API. Instead of fighting with a custom API wrapper, it acts as an MCP Client, reading the GDS API’s MCP Server capability manifests. It passes native parameters to the
search_one_way_flightstool layer, executing an open, universal communication cycle. - Step 3: Completion and Synthesis: The GDS tool returns raw seat JSON data via MCP to the Flight Booker. The Booker processes and cleanses the raw parameters, translates the list into an optimal user arrangement, and calls the original A2A callback URL to return a completed status string seamlessly to the root Planner.
Enjoy Reading This Article?
Here are some more articles you might like to read next: