Airline support prebuilt agent

The airline support playbook-based prebuilt agent provides flight booking with geolocation.

Sample dialogs

The following sample dialogs demonstrate common scenarios handled by this prebuilt agent.

The user wants to search for flights. The agent asks the user for their origin city, destination, and departure date. The user responds with these details. The agent presents a list of flights, and prompts the user to select an option. The user chooses the cheapest flight. The agent confirms the booking and provides a booking number.

User input Agent response
Hi!
We are working on finding your location. This might take a moment.
Hi there, welcome to the Cymbal Air helpdesk! I can help you find a flight to anywhere in the world. Where would you like to go?
Budapest
Which city are you departing from?
New York
When would you like to fly out?
December 1st
[presents list of flights] Which of these flights would you like to book? Your cheapest option is a flight that leaves JFK at 11:00 am in the morning on December 1st, arrives in BUD at 11:00 pm in the evening on the same day, and costs $254.
I want to book the cheapest one
Excellent, your flight has been booked. Your flight departs from JFK at 11:00 AM and arrives in BUD at 11:00 PM the same day. Your booking number is 3W817T, you will receive an email with more details shortly. Is there anything else I can help you with?
That's all for now
Glad I could help!

Basic setup

To set up this prebuilt agent:

  1. Import the prebuilt agent.
  2. Configure the provided tools with your external services, see Tool setup.

Tool setup

This agent includes tools that are used to integrate with external services.

Flight Search

The getGeolocation tool uses a function call to determine the user's location to automatically input the origin city for the flight search. The output parameters for this tool include:

  • city (required): City where the user is currently located.
  • country (required): Country where the user is currently located.
  • state (required): State or province where the user is currently located.
  • road (optional): Closest major road to the user's approximate street address.
  • county (optional): County where the user is currently located, if it exists.
  • country-code (optional): Two-letter code associated with the country where the user is located.
  • postcode (optional): ZIP code associated with the user's approximate street address.
  • ISO3166-2-lvl4 (optional): Alphanumeric code used to identify the specific administrative subdivision (for example: state, province, territory) of the country where the user is currently located.

The getFlights tool generates a fictional list of flights based on the origin city, destination, and departure date. The tool returns a custom payload response which includes a table with flight timings and prices. This custom payload is used by the UI to display the flights in rich content form.

Complete

Your agent and its integrations should now be set up and ready to test.