An AI travel planning system that combines real-time API data with AI-powered analysis to create personalized travel itineraries. Built with CrewAI, featuring 11 external API integrations and RAG for travel knowledge.
- 3 AI Agents handle reasoning: parsing requests, cultural knowledge, and itinerary compilation
- 4 API Services fetch real-time data: flights, accommodation, activities, and logistics
- RAG Knowledge Base provides cultural tips, visa info, and practical advice via ChromaDB
- AI only does analysis â all travel data comes from real APIs, not hallucinated by the LLM
User Request
|
[AI] Travel Planning Manager --- parses request into structured params
|
[API] 4 services fetch in parallel (no AI, pure HTTP)
|--- Flights: Amadeus + SerpApi (fallback)
|--- Accommodation: Booking.com + Airbnb
|--- Activities: Google Places + Viator + Yelp
|--- Logistics: Google Maps + OpenWeatherMap + Currency + Country Info
|
[AI] Travel Knowledge Expert --- RAG for cultural/visa/practical info
|
[AI] Itinerary Compiler --- synthesizes ALL real data into day-by-day plan
|
Final Itinerary (with real prices, real hotels, booking links)
- Python 3.9+
- API keys (see API Keys Required below)
# Clone the project
cd "Multi Agent AI Travel Agent"
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # macOS/Linux
# or: venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Set up environment
cp .env.example .env
# Edit .env and add your API keysBackend:
uvicorn backend.app:app --host 0.0.0.0 --port 8000 --reload --reload-exclude "venv/*" --reload-exclude "data/*"Frontend (separate terminal):
cd frontend
npm install
npm run devCLI mode (no frontend needed):
python main.py| Key | Purpose | Get it from |
|---|---|---|
GEMINI_API_KEY |
AI agents (needs paid plan) | aistudio.google.com/apikey |
| Key | Purpose | Get it from |
|---|---|---|
AMADEUS_API_KEY + AMADEUS_API_SECRET |
Primary flight search | developers.amadeus.com |
SERPAPI_KEY |
Fallback flight search | serpapi.com |
| Key | Purpose | Get it from |
|---|---|---|
BOOKING_API_KEY |
Hotels (Booking.com via RapidAPI) | rapidapi.com |
AIRBNB_API_KEY |
Rentals (Airbnb via RapidAPI) | rapidapi.com |
| Key | Purpose | Get it from |
|---|---|---|
GOOGLE_PLACES_API_KEY |
Attractions & restaurants | console.cloud.google.com |
VIATOR_API_KEY |
Bookable tours | docs.viator.com |
YELP_API_KEY |
Dining (5,000 calls/day free) | yelp.com/developers |
| Key | Purpose | Get it from |
|---|---|---|
GOOGLE_MAPS_API_KEY |
Transport routes | console.cloud.google.com |
OPENWEATHER_API_KEY |
Weather forecast | openweathermap.org |
| Key | Purpose |
|---|---|
OPENAI_API_KEY |
RAG embeddings (only if using knowledge base) |
EXCHANGE_RATE_API_KEY |
Currency rates (fallback uses free API without key) |
Services gracefully skip any provider whose key isn't configured.
backend/
âââ app.py # FastAPI entry point
âââ config/
â âââ settings.py # All API keys & service URLs
âââ api/
â âââ routes.py # REST endpoints
â âââ websocket.py # WebSocket + progress updates
âââ services/ # Pure API calls, NO AI
â âââ flights/
â â âââ amadeus.py # Amadeus API (primary)
â â âââ serpapi.py # SerpApi Google Flights (fallback)
â â âââ service.py # FlightService coordinator
â âââ accommodation/
â â âââ booking.py # Booking.com via RapidAPI
â â âââ airbnb.py # Airbnb via RapidAPI
â â âââ service.py # AccommodationService coordinator
â âââ activities/
â â âââ google_places.py # Attractions & restaurants
â â âââ viator.py # Bookable tours
â â âââ yelp.py # Dining recommendations
â â âââ service.py # ActivityService coordinator
â âââ logistics/
â â âââ google_maps.py # Directions & routes
â â âââ weather.py # OpenWeatherMap
â â âââ currency.py # Exchange rates
â â âââ country_info.py # REST Countries + Travelbriefing
â â âââ service.py # LogisticsService coordinator
â âââ knowledge/
â âââ rag.py # ChromaDB RAG
âââ agents/ # Only 3 AI agents
â âââ llm.py # Gemini LLM factory
â âââ definitions.py # Travel Manager, Knowledge Expert, Compiler
â âââ tasks.py # Task definitions
â âââ tools.py # CrewAI tool wrapper (RAG only)
âââ crew/
â âââ orchestrator.py # Main pipeline
âââ models/
â âââ schemas.py # Normalized Pydantic models
frontend/ # React + Vite UI
data/
âââ travel_knowledge/ # RAG documents (.txt)
âââ chroma_db/ # Vector store (auto-generated)
main.py # CLI entry point
- AI Step 1 â Travel Manager parses natural language into structured parameters (destinations, dates, budget, interests)
- API Step â 4 services fetch real data in parallel via
asyncio.gather(flights, hotels, activities, logistics) â pure HTTP, no AI - AI Step 2 â Knowledge Expert queries RAG for cultural/visa/practical info
- AI Step 3 â Itinerary Compiler takes ALL real API data + knowledge and creates a personalized day-by-day plan
Add .txt files to data/travel_knowledge/. Delete data/chroma_db/ to force re-indexing. The RAG system automatically indexes new documents on next run.
- CrewAI â Multi-agent orchestration
- Google Gemini â LLM (via LiteLLM)
- FastAPI â REST + WebSocket API
- httpx â Async HTTP client for all API services
- ChromaDB â Vector database for RAG
- React + Vite â Frontend
- Pydantic â Data models and validation
Your Gemini free tier quota is exhausted. Enable billing at aistudio.google.com or wait for daily reset.
Generate a new key at aistudio.google.com/apikey and update .env.
Run with: uvicorn backend.app:app --reload --reload-exclude "venv/*" --reload-exclude "data/*"
Activate your venv and run: pip install -r requirements.txt
Delete data/chroma_db/ and run again.
MIT License â see LICENSE for details.
