Build an agent-powered travel planning app with Generative AI

Google for DevelopersAbout 3 min readApr 18, 2025Watch original
THE SUMMARYAI-generated

AI-Powered Travel Planning App Walkthrough: Flutter, Firebase, Vertex AI, Gemini, and Places API

Key Concepts:

  • Agentic Apps: Applications with agents that can act independently on behalf of the user.
  • Genkit: A framework providing powerful AI capabilities, including defining agents and tools.
  • Firebase Data Connect: Schema and query management using GraphQL, integrating with Firebase Authentication.
  • Retrieval-Augmented Generation (RAG): A technique leveraging external knowledge to enhance LLM responses.
  • Vector Similarity Search: Finding relevant locations based on vector embeddings.
  • Places API: Google's API for retrieving detailed location information.
  • Zod: A library for defining input and output schemas for validation.
  • Dotprompt: A Genkit plugin for crafting effective prompts.
  • Firebase Hosting: A service for deploying web applications and microservices.

1. Introduction and Overview

  • Tom Greenaway from Google's Solutions team introduces an AI-powered travel planning app built with Flutter, Firebase, Vertex AI, Gemini, and the Places API.
  • The video aims to demonstrate how to leverage Google's technologies to create intelligent, data-connected apps.
  • The app is an example of an "agentic app," where an agent independently acts on the user's behalf.

2. App Functionality and User Experience

  • The travel planning app allows users to describe their desired vacation through text, image, or voice.
  • AI generates a list of potential travel suggestions based on the user's input.
  • Travel suggestions are sourced from a pre-generated database using Gemini and Imagen.
  • The demo uses Firebase Studio for code exploration and integration of Google products.
  • Two pre-recorded video walkthroughs are presented:
    • Simple Search: A user journey with a basic search interface displaying pre-generated travel suggestions.
    • AI-Assisted Multimodal Search: A user provides a text prompt and an image, which Gemini interprets to generate travel suggestions.

3. Technology Behind the Scenes

  • Data Connection with Genkit and Data Connect API:
    • Genkit is used to define agents that can call tools.
    • Tools enable agents to interact with the environment (e.g., searching for restaurants).
    • The app integrates with a fully managed PostgreSQL database powered by Cloud SQL.
    • Firebase Data Connect provides schema and query management using GraphQL.
    • Example: "get nearest places" query utilizes vector similarity search.
  • Extending Agent Functionality with Genkit and Places API:
    • Tools are defined to gather data from external sources like restaurant information.
    • Zod is used to define input and output schemas for validation.
    • The Places API is called directly from the code to retrieve detailed location information.
  • Generating Personalized Trip Suggestions with Genkit and Gemini:
    • Users can input their dream trip using text, speech-to-text, or uploaded images.
    • The Gemini API is leveraged with Retrieval-Augmented Generation (RAG) to provide tailored trip overviews.
    • Firebase Data Connect and embeddings are used for nearest neighbor search.
    • Trip suggestions and images were pre-generated using Gemini and Imagen.

4. Flutter Application and Firebase Genkit Integration

  • The Flutter application communicates with Firebase Genkit.
  • Genkit enables defining schemas for validating LLM outputs, ensuring reliable data consumption within the Flutter app.
  • Requests are serialized and responses are deserialized using Dart, aligning with the Genkit schema.
  • Dotprompt Plugin:
    • Dotprompt is used for crafting effective prompts.
    • Prompts, input/output schema models, and configurations are organized in a single file.

5. Deployment with Firebase Hosting

  • The Flutter application is deployed to Firebase Hosting.
  • Firebase Hosting integrates with modern web frameworks like Flutter.
  • It provides a secure and managed server environment for applications and microservices.

6. Conclusion and Next Steps

  • The video provides a tour of an AI-powered travel planning app, showcasing the integration of Flutter, Firebase, Vertex AI, Gemini, and the Places API.
  • The presenter encourages viewers to explore the solution, inspect the architecture, quiz their knowledge, and check out the Compass project template in Firebase Studio.
  • The main takeaway is that Google's technologies can be leveraged to build intelligent, data-connected applications.

AI summaries can miss context or contain errors. Check important details against the original video.

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.