CoolFace
Apppublic

careersonamm/crewai-vacation-planner

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes
App README

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 .txt reports 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:

bash
pip install -r requirements.txt

2. Configure API Keys

Create a .env file at the root of the project:

env
OPENAI_API_KEY=your_openai_key_here
TAVILY_API_KEY=your_tavily_key_here  # Optional: For live web search

3. Run Streamlit App

Launch the app:

bash
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:

bash
docker build -t vacation-planner .
docker run -p 7860:7860 -e OPENAI_API_KEY=your_key_here vacation-planner

Hugging Face Space Deployment

  1. 1.Create a new Space on Hugging Face.
  2. 2.Select Docker as the SDK (the Space will read our Dockerfile).
  3. 3.Upload this repository.
  4. 4.Add your OPENAI_API_KEY and TAVILY_API_KEY under the Space's Settings -> Variables and secrets tab.