Travel Without Rules, Plan With Intelligence!
A revolutionary AI-powered travel planning application that creates chaotic, exciting, and personalized travel itineraries using LangChain, LangGraph, and Groq AI. Whether you're seeking adventure, culture, relaxation, or pure chaos, Chaotic Compass has got you covered!
- π― Personalized Itineraries: AI-generated travel plans based on your interests, budget, and travel style
- π Alternative Plans: Multiple itinerary options including budget-focused, luxury, and off-the-beaten-path alternatives
- ποΈ Local Insider Tips: Hidden gems and cultural insights from locals
- π‘οΈ Safety Information: Comprehensive safety guidelines and travel advisories
- π‘ Dynamic Suggestions: Interactive follow-up recommendations to enhance your trip
- π₯οΈ Dual Interface: Choose between CLI workflow or modern web interface
- π Session History: Track your travel planning journey
The application uses a sophisticated LangGraph workflow with multiple AI-powered nodes:
Input Collection β Itinerary Generation β Recommendations β
Local Tips β Safety Info β Alternative Plans β Satisfaction Check β
Refinement Loop β Final Plan
- State Management: TypedDict-based state tracking across the workflow
- AI Integration: Groq's Llama-3.3-70B model for intelligent content generation
- Workflow Engine: LangGraph for complex multi-step planning processes
- Web Interface: Modern Gradio-based UI with interactive elements
- CLI Interface: Command-line workflow for detailed step-by-step planning
- Python 3.8+
- Groq API key (free at console.groq.com)
-
Clone the repository
git clone https://github.com/yourusername/chaotic-compass.git cd chaotic-compass -
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
cp .env.example .env # Edit .env and add your GROQ_API_KEY -
Run the application
python main.py
- Choose option
2when prompted - Fill in your travel preferences in the intuitive web form
- Get instant AI-generated itineraries with additional insights
- Use the dynamic suggestion button for follow-up recommendations
- Choose option
1for the full interactive workflow - Follow step-by-step prompts for detailed travel planning
- Get comprehensive plans with refinement capabilities
- Perfect for users who want maximum customization
chaotic-compass/
βββ main.py # Application entry point
βββ travel_planner.py # Main TravelPlanner class with Gradio interface
βββ state_definitions.py # TypedDict state definitions
βββ workflow_nodes.py # LangGraph node functions
βββ workflow_engine.py # Workflow compilation and routing
βββ cli_interface.py # CLI interface functions
βββ requirements.txt # Python dependencies
βββ .env.example # Environment variables template
βββ README.md # This file
GROQ_API_KEY: Your Groq API key (required)
Travel Styles:
adventurous- High-energy, extreme activitiesrelaxed- Peaceful, leisure-focusedcultural- Museums, local traditions, artsparty- Nightlife, social eventsfamily-friendly- Kid-safe activities
Budget Ranges:
budget- Cost-effective optionsmid-range- Balanced comfort and costluxury- Premium experiences
Duration Options:
1 day- Quick city exploration3 days- Weekend getaway1 week- Comprehensive vacation2 weeks- Extended adventure
# Quick example using the TravelPlanner class
from travel_planner import TravelPlanner
planner = TravelPlanner()
itinerary = planner.generate_itinerary(
city="Tokyo",
interests="anime, food, temples",
budget="mid-range",
duration="1 week",
travel_style="adventurous"
)
print(itinerary)- Fork the repository
- Create your 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
# Install development dependencies
pip install -r requirements.txt
# Run tests (when available)
python -m pytest
# Format code
black .- Multi-language Support - Support for multiple languages
- Real-time Weather Integration - Live weather data
- Social Media Integration - Share itineraries easily
- Mobile App - Native mobile applications
- Booking Integration - Direct hotel/flight booking
- Community Features - User reviews and ratings
- Offline Mode - Downloaded itineraries for offline use
-
GROQ_API_KEY not found
- Ensure your
.envfile containsGROQ_API_KEY=your_actual_key - Restart the application after adding the key
- Ensure your
-
Import errors
- Run
pip install -r requirements.txtto install all dependencies - Check Python version (3.8+ required)
- Run
-
Gradio interface not loading
- Check if port 7860 is available
- Try running with
demo.launch(server_port=8080)for different port
- Use shorter interest lists for faster generation
- Choose
1 dayor3 daysfor quicker responses - The CLI interface provides more detailed outputs but takes longer
This project is licensed under the MIT License - see the LICENSE file for details.
- LangChain for the awesome AI framework
- LangGraph for workflow orchestration
- Groq for lightning-fast AI inference
- Gradio for the beautiful web interface
Built with β€οΈ by Swarnendu Banerjee
Ready to embark on your next chaotic adventure? Let's go! π§β¨