An intelligent travel companion powered by LangGraph, RAG (Retrieval-Augmented Generation), and the TravelPlanner dataset. TravelBot AI helps users plan their trips by providing information about destinations, weather, and some useful calculations through an interactive chat interface.
- 🔍 Knowledge Search: Access to comprehensive travel information from the TravelPlanner dataset
- 🌤️ Weather Information: Real-time weather data for any destination
- 🧮 Travel Calculator: Calculate costs, distances, and other travel-related math
- 🤖 Conversational AI: Powered by Hugging Face transformers with LangGraph workflow
- 📊 Vector Search: FAISS-powered semantic search across travel data
- 🎯 Interactive UI: Clean Streamlit interface with chat history and tool execution tracking
- LangGraph: Orchestrates the AI agent workflow with conditional routing
- RAG Pipeline: Combines retrieval from vector database with generative AI
- FAISS Vector Store: Efficient similarity search across travel documents
- Hugging Face Models: Local model execution with transformer support
- Streamlit: Modern web interface for user interaction
- GPU recommended for optimal performance
- API keys for enhanced functionality (required)
-
Clone the repository
git clone <https://github.com/37nomad/AI-Travel-Agent.git> cd AI-Travel-Agent
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
Create a
.envfile in the project root:HUGGINGFACE_TOKEN=your_huggingface_token_here OPENWEATHER_API_KEY=your_openweather_api_key_here
Getting API Keys:
- Hugging Face Token: Sign up at huggingface.co, go to Settings → Access Tokens
- OpenWeather API Key: Register at openweathermap.org for free API access
-
Run the setup script
python setup_script.py
This will:
- Create necessary directories
- Download and process the TravelPlanner dataset (500-1000 entries)
- Build the FAISS vector index
- Test the installation
-
Launch the application
streamlit run main.py
-
Open your browser and navigate to the displayed URL (typically
http://localhost:8501)
Try these example queries in the chat interface:
- "Find hotels in Paris for 2 nights"
- "What's the weather like in Tokyo?"
- "Calculate the total cost: flight ₹15000 + hotel ₹8000"
- "Tell me about restaurants in New York"
- "Find attractions in London"
The default model is microsoft/DialoGPT-medium. For better performance, consider upgrading to a paid/premium model by modifying the model_name parameter in agent.py:
agent = TravelAgent(model_name="your-preferred-model")Adjust the dataset processing limit in setup_script.py or when running directly:
# Process 500 entries (recommended for testing)
processor.process_and_save_dataset(limit=500)
# Process 1000 entries (maximum, better coverage)
processor.process_and_save_dataset(limit=1000)Search the travel database for information about:
- Hotels and accommodations
- Restaurants and dining
- Tourist attractions
- Destination information
Get current weather data for any city worldwide using OpenWeather API.
Perform travel-related calculations:
- Cost estimation
- Distance calculations
- Currency conversion
- General arithmetic
- GPU Usage: The application will automatically use GPU if available via
device_map="auto" - Memory: Vector index loading requires sufficient RAM
- First Run: Initial setup takes longer due to model and dataset downloads
- Batch Processing: Large dataset limits may require more processing time
- Additional travel APIs integration
- Enhanced Tool Scraping Capability Or Using Enhanced features for smooth tool extraction
- Multi-language support
- Performance optimizations
- TravelPlanner Dataset: OSU NLP Lab for the comprehensive travel dataset
