Skip to content

mikechao/ai-travel-agent

Repository files navigation

AI Travel Agent

A multi-agent network with human in the loop chat helping user explore various travel destinations.

Inspired by LangGraph multi-agent tutorial

Tokens are streamed to the frontend built with NuxtJS as they are generated by the LLM in the backend.

All of the agents in the network have the "ability" to talk to each other and are equipped with tools related to their tasks.

Currently live at https://ai-travel-agent-pied.vercel.app/

There are 4 agents in this network

  1. Pluto the Pup 🐶: General travel agent who is equipped with tools that can search the internet for images ImageSearchTool, generate search queries related to user's travel interests, execute those search queries on the web, SearchExecutionTool and provide a summary of specific search results with SearchSummaryTool.
  2. Petey the Pirate 🏴‍☠️: The weather agent who is equipped with GeocodeTool to get latitude and longitude for the WeatherForecastTool to provide the weather and clothing recommendations for the user.
  3. Penny Restmore 🏨: The hotel agent who is equipped with the HotelSearchTool to help users find hotels near travel destinations. In additional she has the HotelDetailsTool to provide additional details about specific hotels. The HotelReviewsTool helps her show reviews of hotels for the user.
  4. Polly Parrot 🦜: The sightseeing agent who is equipped with the SightseeingSearchTool to help users find sights to see or attractions. The SightsDetailsTool provides additional details about sights or attractions and the SightsReviewsTool provides reviews from other users.

Tools and Datasources

Name Source
ImageSearchTool Brave Search API
SearchExecutionTool Brave Search API
GeocodeTool OpenCage
WeatherForecastTool Weather API
HotelSearchTool Tripadvisor Content API
HotelDetailsTool Tripadvisor Content API
HotelReviewsTool Tripadvisor Content API
SightseeingSearchTool Tripadvisor Content API
SightsDetailsTool Tripadvisor Content API
SightsReviewsTool Tripadvisor Content API

🛠️ Installation Steps

  1. Get an OpenAI API Key
  2. Get Weather API Key
  3. Get Brave Search API Key
  4. Get TripAdvisor API Key
  5. Get OpenCage API Key
  6. Get Postgres URL
  7. Optional get LangSmith API Key for tracing LLM calls
  8. Create .env by following env example with information from above
  9. Install project dependencies
pnpm install
  1. Start the development server on http://localhost:3000
pnpm dev

👷 Built with

Name Link Usage
NuxtJS My Skills Building pages, interactions and server apis
TypeScript My Skills Static typing, better autocompletion
Pinia My Skills Management of various states like settings, chat messages
Langchain Integration with LLM managing chat message history, memory and prompts
LangGraph Creating Agents and multi-agent workflows
Pnpm My Skills Manage JavaScript packages
Postgres My Skills Persistence of chat messages
Tailwind Css My Skills CSS Styling
Vite My Skills Build tool
Visual Studio Code My Skills Code Editor
PrimeVue Various UI Components
Vercel My Skills App hosting and useChat composable
Supabase My Skills Postgres DB hosting
Brave Search API Internet and image search capabilities
OpenCage Geocoding, provides latitude longitude needed for API calls
Tripadvisor Data about hotels, attractions
Weather API Provides weather forecasts
Font Awesome Various icons

About

An AI Chatbot with a network of AI Agents to help users discover travel locations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published