A sophisticated NLP-based multi-agent chatbot application that provides comprehensive travel assistance including flight searches, hotel bookings, and AI-powered itinerary generation using Retrieval-Augmented Generation (RAG).
βοΈ Flight Agent: Real-time flight availability using Amadeus API- π¨ Hotel Agent: Hotel search and booking via Booking.com RapidAPI
- π€ RAG Agent: AI-powered itinerary generation using Amazon Bedrock Titan
- π¬ Natural Language Processing: Intent recognition and entity extraction
- π Web Interface: Modern, responsive chatbot UI
- Multi-Agent Architecture: Coordinated communication between specialized agents
- Context-Aware Responses: Maintains conversation context across multiple turns
- Personalized Recommendations: Tailored suggestions based on user preferences
- Real-Time Data Integration: Live flight and hotel availability
- Fallback Mechanisms: Robust error handling and graceful degradation
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Backend API β β External APIs β
β (HTML/CSS/JS) βββββΊβ (FastAPI) βββββΊβ (Amadeus, β
β β β β β Booking.com) β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β
βΌ
ββββββββββββββββββββ
β Orchestrator β
β (Intent/Entity β
β Recognition) β
ββββββββββββββββββββ
β
βββββββββββΌββββββββββ
βΌ βΌ βΌ
ββββββββββββ ββββββββββββ ββββββββββββ
β Flight β β Hotel β β RAG β
β Agent β β Agent β β Agent β
ββββββββββββ ββββββββββββ ββββββββββββ
β
βΌ
ββββββββββββββββββββ
β AWS Bedrock β
β (Titan LLM + β
β Embeddings) β
ββββββββββββββββββββ
- Python 3.8+
- AWS Account with Bedrock access
- Amadeus API credentials
- Booking.com RapidAPI key
-
Clone the repository
git clone <your-repo-url> cd nlp-travel-chatbot
-
Set up virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
cd backend pip install -r requirements.txt -
Configure environment variables
cp env_template.txt .env # Edit .env with your actual API keys -
Start the backend server
uvicorn main:app --reload --host 0.0.0.0 --port 8000
-
Open the frontend
# Open frontend/index.html in your browser # Or serve it with a local server python -m http.server 3000 # From frontend directory
Create a .env file in the backend directory with the following variables:
# Amadeus API (Flight searches)
AMADEUS_API_KEY=your_amadeus_api_key
AMADEUS_API_SECRET=your_amadeus_api_secret
# Booking.com RapidAPI (Hotel searches)
BOOKING_API_KEY=your_booking_rapidapi_key
# AWS Bedrock (RAG functionality)
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_DEFAULT_REGION=us-east-1
BEDROCK_MODEL_ID=amazon.titan-text-express-v1- Amadeus API: Sign up at Amadeus for Developers
- Booking.com RapidAPI: Get your key from RapidAPI Booking.com
- AWS Bedrock: Enable Bedrock in your AWS account and configure IAM permissions
nlp-travel-chatbot/
βββ backend/
β βββ agents/
β β βββ flight_agent/ # Flight search functionality
β β βββ hotel_agent/ # Hotel search functionality
β β βββ rag_agent/ # RAG-powered itinerary generation
β βββ orchestrator/ # Multi-agent coordination
β βββ main.py # FastAPI application
β βββ requirements.txt # Python dependencies
β βββ env_template.txt # Environment variables template
βββ frontend/
β βββ index.html # Chatbot web interface
βββ .gitignore # Git ignore rules
βββ README.md # This file
User: "Find flights from New York to London on 2025-06-15"
Bot: [Shows available flights with prices and details]
User: "Show me hotels in Paris for 3 nights"
Bot: [Displays hotel options with ratings and prices]
User: "I need a 5-day travel plan for Tokyo with flights and hotels"
Bot: [Generates comprehensive itinerary with:
- Flight options
- Hotel recommendations
- Daily activities
- Sightseeing suggestions
- Travel tips]
POST /chat- Main chat interfaceGET /health- Health checkPOST /rag/integrated- Generate complete travel itinerary
POST /flight/search- Search flightsPOST /hotel/search- Search hotelsPOST /rag/generate- Generate itinerary
# Test individual components
python -m pytest tests/
# Test API endpoints
python test_api_endpoints.py- Create agent class in
backend/agents/ - Implement required methods
- Register with orchestrator
- Update API endpoints
- Modify intent patterns in
orchestrator/chatbot_orchestrator.py - Add new entity extraction rules
- Update response templates
# Build image
docker build -t travel-chatbot .
# Run container
docker run -p 8000:8000 --env-file .env travel-chatbot- AWS: Use ECS, Lambda, or EC2
- Google Cloud: App Engine or Cloud Run
- Azure: Container Instances or App Service
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Amadeus API for flight data
- Booking.com RapidAPI for hotel data
- Amazon Bedrock for AI capabilities
- LangChain for RAG implementation
- FastAPI for the web framework
For support, email amoosani123@gmail.com or create an issue in this repository.
Happy Traveling!