Skip to content

A multi-agent AI system for comprehensive trip planning with specialized agents for country selection, route planning, accommodation search, and transportation organization.

Notifications You must be signed in to change notification settings

RoniBam/Trip-Planner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Trip Planner

A multi-agent AI system for comprehensive trip planning with specialized agents for country selection, route planning, accommodation search, and transportation organization.

Features

  • Flexible Country Selection: Optional consultation with Country Selection Agent based on user preference
  • Route Planning Agent: Creates optimized itineraries with attractions and activities
  • Accommodation Agent: Finds 3 accommodation options per location
  • Transportation Agent: Plans car rentals, public transport, and inter-city travel
  • Interactive Chat Interface: Natural conversations with each specialized agent
  • Global Support: Plan trips to any country with real-time web search
  • Real-time APIs: Integration with web search and weather services

Architecture

Backend (Python/FastAPI)

  • FastAPI: Web framework with automatic API documentation
  • LangGraph: Multi-agent orchestration framework
  • PostgreSQL: Database for sessions and trip data
  • Redis: Caching for web search results
  • OpenAI GPT-4: Large language model for intelligent responses

Frontend (React/TypeScript)

  • React 18: Modern React with hooks and functional components
  • Material-UI: Professional UI components
  • TypeScript: Type safety and better developer experience
  • Axios: HTTP client for API communication

Infrastructure

  • Docker Compose: Local development environment
  • Web Search Integration: Real-time information gathering
  • Multi-agent Communication: Orchestrated workflow between agents

Getting Started

Prerequisites

  • Docker and Docker Compose
  • API keys for:
    • OpenAI GPT-4
    • Booking.com (optional)
    • Google Maps
    • OpenWeather

Installation

  1. Clone the repository

    git clone <repository-url>
    cd trip-planner
  2. Set up environment variables

    cp .env.example .env

    Edit .env and add your API keys:

    OPENAI_API_KEY=your_openai_api_key_here
    BOOKING_API_KEY=your_booking_api_key_here
    BOOKING_API_SECRET=your_booking_api_secret_here
    GOOGLE_MAPS_API_KEY=your_google_maps_api_key_here
    OPENWEATHER_API_KEY=your_openweather_api_key_here
    
  3. Start the application

    docker-compose up -d
  4. Access the application

API Keys Setup

OpenAI API Key

  1. Go to OpenAI Platform
  2. Create an account and navigate to API Keys
  3. Create a new API key
  4. Add to .env file

OpenWeather API Key (Optional)

  1. Go to OpenWeather
  2. Sign up for a free account
  3. Get your API key
  4. Add to .env file

Usage

Planning a Trip

  1. Start Planning: Click "Start Planning My Trip" on the home page
  2. Destination Preference: Choose whether you already have a country in mind or need help selecting one
  3. Country Selection (Optional): If you need help, consult with the Country Selection Agent about your preferences
  4. Plan Route: Work with the Route Planning Agent to create your itinerary
  5. Find Accommodations: Get recommendations from the Accommodation Agent
  6. Organize Transportation: Plan travel with the Transportation Agent

Agent Interactions

Each agent specializes in different aspects:

  • Destination Preference: Determines if you need help choosing a country or already have one in mind
  • Country Selection (Optional): Asks about interests, budget, climate preferences to recommend destinations
  • Route Planning: Considers trip length, must-see attractions, travel pace
  • Accommodation: Factors in budget, amenities, location preferences
  • Transportation: Evaluates car rental vs public transport options

Development

Project Structure

trip-planner/
├── backend/
│   ├── app/
│   │   ├── agents/          # AI agents
│   │   ├── models/          # Database models
│   │   ├── services/        # Business logic
│   │   └── main.py         # FastAPI app
│   ├── requirements.txt
│   └── Dockerfile
├── frontend/
│   ├── src/
│   │   ├── components/     # React components
│   │   ├── pages/          # Page components
│   │   ├── services/       # API services
│   │   └── App.tsx
│   ├── package.json
│   └── Dockerfile
├── postgres/
│   └── init.sql
├── docker-compose.yml
└── .env

Local Development

  1. Backend Development

    cd backend
    pip install -r requirements.txt
    uvicorn app.main:app --reload
  2. Frontend Development

    cd frontend
    npm install
    npm start
  3. Database

    docker-compose up postgres -d

Cost Estimates

Monthly Costs (Low Usage)

  • OpenAI API: ~$10-50/month (depends on usage)
  • OpenWeather API: Free tier available
  • Infrastructure: $0 (Docker Compose local deployment)

Total: ~$10-50/month (primarily OpenAI costs)

Deployment

Docker Compose (Local)

docker-compose up -d

Production Deployment

For production, consider:

  • Container orchestration (Kubernetes)
  • Managed databases (AWS RDS, Google Cloud SQL)
  • Load balancing
  • SSL certificates
  • Environment-specific configurations

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is licensed under the MIT License.

Support

For questions or issues:

  1. Check the API documentation at http://localhost:8000/docs
  2. Review the logs: docker-compose logs -f
  3. Open an issue on GitHub

About

A multi-agent AI system for comprehensive trip planning with specialized agents for country selection, route planning, accommodation search, and transportation organization.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published