Skip to content

1216-dev/TravelAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌍 AI Travel Planner

An intelligent, adaptive travel planning system powered by multi-agent AI orchestration, real-time data integration, and personalized recommendations. image

image image

🧠 Overview

This system transforms fragmented travel planning into an intelligent, dynamic experience using: image image

  • Llama-based Orchestrator for reasoning & planning
  • GNN Agent for personalized recommendations
  • Real-time API Integration for flights, hotels, and weather
  • Budget Optimizer for cost vs. comfort tradeoffs
  • Streamlit UI for dynamic user interaction
  • PDF Export for downloadable itineraries

πŸ—οΈ Architecture

ai-travel-planner/
β”œβ”€β”€ backend/               # Core AI agents and orchestration
β”‚   β”œβ”€β”€ orchestrator.py   # Llama model for intent parsing
β”‚   β”œβ”€β”€ api_manager.py    # Real-time/mock API integration
β”‚   β”œβ”€β”€ personalization_gnn.py  # GNN-based personalization
β”‚   β”œβ”€β”€ budget_optimizer.py     # Cost optimization
β”‚   β”œβ”€β”€ itinerary_agent.py      # Itinerary generation + PDF
β”‚   β”œβ”€β”€ utils/            # Utilities and configuration
β”‚   └── main.py           # Unified orchestrator entry
β”‚
└── frontend/             # Streamlit web interface
    β”œβ”€β”€ app.py           # Main Streamlit app
    β”œβ”€β”€ components/      # UI components
    └── styles/          # Custom CSS and theming

πŸš€ Quick Start

Easy Way (Recommended) 🎯

# Just run this - it does everything!
./run.sh

Then choose option 1 for the Web UI.

Manual Setup

Step 1: Install Dependencies

pip install -r requirements.txt

Step 2: Set Up API Keys (REQUIRED for flight and hotel data)

Create a .env file:

# REQUIRED for flights and hotels
SERPAPI_API_KEY=your_key_here  # Get from serpapi.com (100 searches/month free)

# Optional for weather
OPENWEATHER_API_KEY=your_key_here  # Free from openweathermap.org

# Optional for activities
YELP_API_KEY=your_key_here  # Free from yelp.com/developers

Step 3: Run the Application

# Web UI (Recommended)
streamlit run frontend/app.py

# Or test backend directly
python backend/main.py

πŸ“š Detailed Setup Guides

  • INSTALL.txt - Quick visual install guide (start here!)
  • SETUP.md - Comprehensive setup documentation
  • API_SETUP_GUIDE.md - API configuration details
  • QUICKSTART.md - Quick reference guide

πŸ§ͺ Verify Installation

# Test SERP API integration (flights + hotels)
python test_serpapi.py

# Test other APIs
python tests/test_apis.py

# Test workflow
python tests/test_workflow.py

# Test new features  
python tests/test_new_features.py

✨ Features

User Input

  • Destination selection
  • Date range picker
  • Budget slider
  • Preference tags (Adventure, Luxury, Nature, etc.)
  • Travel group size

Live Processing

  • Real-time agent progress updates
  • Multi-agent orchestration visualization
  • Animated loading states

Results Dashboard

  • ✈️ Flight recommendations with airline logos, real-time pricing, and carbon emissions
  • 🏨 Hotel options with images, ratings, reviews, and amenities
  • 🌀️ Weather forecasts for each day
  • πŸ—ΊοΈ Interactive map integration
  • πŸ’° Budget breakdown with detailed cost allocation
  • πŸ“₯ PDF itinerary download
  • πŸ—“οΈ Calendar export (.ics)

Feedback System

  • User satisfaction ratings
  • Itinerary accuracy feedback
  • Continuous improvement analytics

🎨 Design Philosophy

  • Theme: Deep blue + coral accents
  • Layout: Responsive grid-based design
  • Animations: Smooth transitions and loading states
  • UX: Intuitive, modern, and accessible

🧩 Backend Modules

Orchestrator (orchestrator.py)

  • Parses user intent using Llama model
  • Validates constraints
  • Coordinates agent workflow

API Manager (api_manager.py)

  • SERP API Google Flights - Real-time flight data with airline logos
  • SERP API Google Hotels - Hotel data with images and ratings
  • OpenWeatherMap - Weather forecasts
  • Budget-based filtering - Filters results by budget constraints

Personalization GNN (personalization_gnn.py)

  • Graph Neural Network for user preferences
  • Historical behavior analysis
  • Contextual recommendations

Budget Optimizer (budget_optimizer.py)

  • Pareto optimization for cost vs. comfort
  • Multiple itinerary options
  • Value scoring

Itinerary Agent (itinerary_agent.py)

  • Consolidates all recommendations
  • Generates PDF itineraries
  • Exports calendar events

πŸ“‹ Requirements

  • Python 3.9+
  • PyTorch
  • PyTorch Geometric
  • Streamlit
  • Transformers (Hugging Face)
  • ReportLab
  • Other dependencies in requirements.txt

πŸ”§ Configuration

Edit backend/utils/config.yaml to customize:

  • API keys and endpoints
  • Model configurations
  • Budget constraints
  • Personalization parameters

πŸ“ Testing

Sample input is provided in backend/utils/sample_input.json for testing the backend pipeline independently.

🀝 Contributing

This is a demonstration project showcasing AI orchestration and real-time travel planning capabilities.

πŸ“„ License

MIT License

About

An end-to-end AI-powered travel planning engine that generates personalized itineraries using real-time data sources. Supports budget optimization, activity discovery, and exports itineraries as **JSON, PDF, and ICS calendar files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors