The Travel prebuilt playbook allows users to search for points of interest (POI), get travel recommendations, and book hotels. The agent uses user profile data to customize recommendations for the user, if provided.
Sample dialogs
The following sample dialogs demonstrate common scenarios handled by this prebuilt playbook.
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 would like to take their family on a ski trip. The agent suggests some ski destinations in the United States, and 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. Finally, the user asks the agent to book a stay at one of the destinations and the agent presents a list of hotels nearby.
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 playbook:
- Import the prebuilt playbook.
- 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. You can use the prebuilt tool installer to deploy sample code and data for your prebuilt playbook.
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
installer
folder. - Review README.md for a detailed overview of the installer and its requirements.
- Run
pip install -r requirements.txt
to install requirements. -
Run
gcloud auth application-default login
to 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:
Agent Builder console
- If you have not yet imported the prebuilt agent, import the agent into your project.
- Go to the Agent Builder console.
- 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
servers
field with the endpoint logged by the installer. - Click Save.
Places search
The places_search
tool is used to get information about points of interest,
including points of interest near a location.
Hotel search
The hotel_search
tool is used to get information about hotels, including
hotels near a location.
Hotel booking
The hotel_booking
tool is used to create and get information about hotel
bookings.
Get user profile
The get_user_profile
tool is used to retrieve user profiles that can be used
to customize recommendations for the user.
Complete
Your agent and its integrations should now be set up and ready to test.