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.
