A multi-agent AI system for comprehensive trip planning with specialized agents for country selection, route planning, accommodation search, and transportation organization.
- 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
- 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
- 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
- Docker Compose: Local development environment
- Web Search Integration: Real-time information gathering
- Multi-agent Communication: Orchestrated workflow between agents
- Docker and Docker Compose
- API keys for:
- OpenAI GPT-4
- Booking.com (optional)
- Google Maps
- OpenWeather
-
Clone the repository
git clone <repository-url> cd trip-planner
-
Set up environment variables
cp .env.example .env
Edit
.envand 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 -
Start the application
docker-compose up -d
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
- Go to OpenAI Platform
- Create an account and navigate to API Keys
- Create a new API key
- Add to
.envfile
- Go to OpenWeather
- Sign up for a free account
- Get your API key
- Add to
.envfile
- Start Planning: Click "Start Planning My Trip" on the home page
- Destination Preference: Choose whether you already have a country in mind or need help selecting one
- Country Selection (Optional): If you need help, consult with the Country Selection Agent about your preferences
- Plan Route: Work with the Route Planning Agent to create your itinerary
- Find Accommodations: Get recommendations from the Accommodation Agent
- Organize Transportation: Plan travel with the Transportation Agent
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
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
-
Backend Development
cd backend pip install -r requirements.txt uvicorn app.main:app --reload -
Frontend Development
cd frontend npm install npm start -
Database
docker-compose up postgres -d
- 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)
docker-compose up -dFor production, consider:
- Container orchestration (Kubernetes)
- Managed databases (AWS RDS, Google Cloud SQL)
- Load balancing
- SSL certificates
- Environment-specific configurations
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
For questions or issues:
- Check the API documentation at http://localhost:8000/docs
- Review the logs:
docker-compose logs -f - Open an issue on GitHub