careersonamm/crewai-vacation-planner
0
CrewAI Vacation Planner
An AI-powered multi-agent vacation planning application built with CrewAI, LangChain OpenAI (GPT-4o-mini), and Streamlit.
It generates customized travel plans, day-by-day itineraries, itemized local currency budgets, and booking timelines.
✨ Key Features & Functionalities
- 🤖 Multi-Agent Collaboration: Orchestrates 6 specialized CrewAI agents running sequential and concurrent workflows for thorough travel research, budgeting, and itinerary planning.
- 📍 Pre-Flight Destination Validation: Uses a lightweight geographer agent to instantly validate destinations and prompt for city details (e.g., if only a state is provided) before launching the full planner.
- 💵 Dynamic Currency Detection: Automatically detects the destination country, identifies its local currency (e.g., JPY, EUR), and dynamically extracts the symbol without hardcoded lookup tables.
- 📅 Past Date Correction: Ensures travel dates are in the future; if the user inputs past dates, the system automatically shifts them forward while preserving the trip duration.
- 👥 Traveler-Aware Personalization: Tailors accommodation styles, lodging sizes (solo room vs multi-room family apartments), and attraction suggestions dynamically based on whether you are traveling solo or with family/kids.
- ⚡ Dynamic Booking Timeline: Automatically calculates deadlines for flights, hotels, and dining bookings from your travel dates. Any milestones that have already passed are flagged as ASAP relative to the current date.
- 🌐 Web Source Citations: Tracks and displays the live Web URLs crawled by the agents during generation so you can review their sources.
- 🧮 Standalone Cost Calculator: A fast, interactive budget sheet built with pure Python math, displaying itemized tables, budget distribution bar charts, and providing
.txtreports download.
📁 Project Structure
The project is structured modularly:
- [app.py](file:///c:/Sonam/Word/IITM/Vocareum%20Practice/VacationPlanning/app.py): The main entry point. Coordinates the Streamlit UI, tabs, and sidebar.
- [crew_planner.py](file:///c:/Sonam/Word/IITM/Vocareum%20Practice/VacationPlanning/crew_planner.py): Houses all CrewAI agents, tasks, and orchestrators.
- [cost_calculator.py](file:///c:/Sonam/Word/IITM/Vocareum%20Practice/VacationPlanning/cost_calculator.py): Pure Python interactive cost calculator UI.
- [utils.py](file:///c:/Sonam/Word/IITM/Vocareum%20Practice/VacationPlanning/utils.py): Stateless helper functions for date validation, currencies, and timeline checklists.
- [agentic_flow.md](file:///c:/Sonam/Word/IITM/Vocareum%20Practice/VacationPlanning/agentic_flow.md): Comprehensive guide detailing the AI agent team, concurrent task workflow, and architecture.
🛠️ Setup & Local Run
1. Install Dependencies
Ensure you have Python 3.11+ installed. Install the required libraries:
pip install -r requirements.txt2. Configure API Keys
Create a .env file at the root of the project:
OPENAI_API_KEY=your_openai_key_here
TAVILY_API_KEY=your_tavily_key_here # Optional: For live web search3. Run Streamlit App
Launch the app:
streamlit run app.py🐋 Docker & Hugging Face Deployment
This repository is pre-configured to build and run via Docker (such as on Hugging Face Spaces).
Local Docker Build
Build and run the container locally:
docker build -t vacation-planner .
docker run -p 7860:7860 -e OPENAI_API_KEY=your_key_here vacation-plannerHugging Face Space Deployment
- Create a new Space on Hugging Face.
- Select Docker as the SDK (the Space will read our
Dockerfile). - Upload this repository.
- Add your
OPENAI_API_KEYandTAVILY_API_KEYunder the Space's Settings -> Variables and secrets tab.
