The Travel playbook-based prebuilt agent lets users search for points of interest (POI), get travel recommendations, and book hotels. The agent uses user profile data to customize recommendations, if provided.
Sample dialog
This sample dialog shows common scenarios that this prebuilt agent handles.
POI search and hotel booking
- The user asks about restaurants in Washington DC.
- The agent recommends a few points of interest, and the user asks to book a hotel.
- The agent collects required information, including the hotel, check-in date, check-out date, number of travelers, and number of rooms.
- The user confirms the information and the agent books the stay, providing the user with a confirmation number.
| User Input | Agent Response |
|---|---|
| Hi, are there any good seafood restaurants in Washington DC? | |
| Here are some seafood restaurants in Washington DC: - The Oceanaire Seafood Room - Tony and Joe's Seafood Place - Joe's Seafood, Prime Steak & Stone Crab |
|
| Anything else I can help you with? | |
| I'd like to book a stay for four nights in DC | |
| Here are some hotels in Washington DC that I found. Which one would you like to book?: - Cambria Hotel Washington D.C. Navy Yard Riverfront - Beacon Hotel & Corporate Quarters - Holiday Inn Washington Capitol - Natl Mall, an IHG Hotel |
|
| Beacon Hotel sounds good | |
| Great, let me just confirm a few details. You'll be staying 4 nights, from 11-06 to 11-10 correct? | |
| actually I'll check in on the 8th | |
| Ok, so you'll be checking in on 11-08 and checking out on 11-12? | |
| yes that's perfect | |
| Great, let me just confirm your booking details Hotel Name = Beacon Hotel & Corporate Quarters Check In Date = November 8th Check Out Date = November 12th # Rooms = 1 # Travelers = 1 Is that correct? |
|
| my son will be coming with me | |
| Ok, so 2 travelers. Let me update your booking details Hotel Name = Beacon Hotel & Corporate Quarters Check In Date = November 8th Check Out Date = November 12th # Rooms = 1 # Travelers = 2 Is that correct? |
|
| yes, please book it for me | |
| Great! We've confirmed your booking and have Confirmation # 2UDVXUUV for your records. | |
| Anything else I can help you with? | |
| no that's it, thanks! | |
| Thanks for traveling with Google! Have a nice day. |
Travel inspiration
- The user says that they want to take their family on a ski trip.
- The agent suggests some ski destinations in the United States.
- The user asks if the agent has any recommendations out of the country.
- The agent presents a list of destinations outside of the United States.
- The user asks the agent to book a stay at one of the destinations.
- The agent presents a list of hotels near the destination.
| User Input | Agent Response |
|---|---|
| I'd like to take my family on a ski trip, any suggestions? | |
| I love skiing! Here's a few popular ski destinations in the United States: - Arapahoe Basin - Aspen Highlands - Beaver Creek - Breckenridge - Sun Peaks Resort |
|
| I was thinking somewhere outside of the states, do you have anything in mind? | |
| Of course! Here are some popular ski destinations outside of the United States: - St. Moritz - Niseko United - Hakuba Valley - Nozawa Onsen - Whistler Blackcomb - Big White Ski Resort - Sun Peaks Resort |
|
| great, thanks! can you book me a stay at Whistler Blackcomb? | |
| Here are some hotels in Whistler Blackcomb. Which one would you like to book?: - Blackcomb Lodge - Blackcomb Springs Suites - True Ski-in, Ski-out Resort - Pinnacle Hotel Whistler - Fairmont Château Whistler |
Basic setup
To set up this prebuilt agent:
- Import the prebuilt agent.
- Configure the provided tools with your external services. For more information, see Tool setup.
Tool setup
This agent includes tools that integrate with external services. Users can use the prebuilt tool installer to deploy sample code and data for their prebuilt agent.
To deploy and configure sample code and data for the Travel prebuilt agent, expand for instructions.
- Download the prebuilt tool installer to a local directory.
- Navigate to the local directory where you downloaded installer.zip.
- Unzip installer.zip and open the
installerfolder. - Review README.md for a detailed overview of the installer and its requirements.
- Run
pip install -r requirements.txtto install requirements. -
Run
gcloud auth application-default loginto authenticate using gcloud auth. -
Run the installer using
python installer.py --project-id=YOUR_GCP_PROJECT_ID --prebuilt-id=travel -
After deploying all required services, configure each tool in the prebuilt agent with the
provided URL(s) logged by the installer:
Generative AI App Builder
- If you have not yet imported the prebuilt agent, import the agent into your project.
- Go to the Generative AI App Builder.
- Select your project from the console drop-down.
- Select your app.
- Click on the icon for Tools.
-
For each tool in the agent, edit the schema to replace the URL in the
servers:field with the endpoint logged by the installer. - Click Save.
Dialogflow CX
- If you have not yet imported the prebuilt agent, import the agent into your project.
- Open the Dialogflow CX console.
- Choose your Google Cloud project.
- Select your agent.
- Click on the icon for Generative resources.
- Click Tools.
-
For each tool in the agent, edit the schema to replace the URL in the
serversfield with the endpoint logged by the installer. - Click Save.
-
Grant the Compute Engine service account
(
your-project-number-developer.gserviceaccount.com) the Cloud Datastore User role, so the newly deployed Cloud Run functions can access Firestore.
Places Search tool
The places_search tool gets information about points of interest,
including points of interest near a location.
Hotel Search tool
The hotel_search tool gets information about hotels, including hotels near a
location.
Hotel Booking tool
The hotel_booking tool creates and gets information about hotel bookings.
The tool uses the Application Integration to call the
HotelService.CreateBooking method.
Get User Profile tool
The get_user_profile tool retrieves user profiles that let them customize
recommendations.
Complete
Your agent and its integrations are set up and ready to test.