AI-Trip-Planner is an intelligent, agentic travel assistant that helps users plan their trips efficiently. Leveraging advanced LLMs (via GROQ and Google APIs) and a suite of specialized tools, it guides users through city selection, itinerary generation, hotel and restaurant recommendations, map route planning, and even shares itineraries via email—all through a conversational, user-friendly Streamlit interface.
- Conversational Trip Planning: Interact with an AI agent to plan your trip step-by-step.
- Smart City & Landmark Selection: Suggests top tourist places in any city.
- Personalized Itinerary Generation: Creates day-wise itineraries with optimal sequencing and meal breaks.
- Hotel & Restaurant Recommendations: Finds top-rated hotels and food spots near your destinations.
- Google Maps Route Planning: Generates optimized routes and Google Maps links for your trip.
- Itinerary Sharing via Email: Sends your itinerary as a professional HTML email using Gmail integration.
- Visual Experience: Displays images and details of places and hotels.
- Agentic Framework: Modular, tool-based agent using LangGraph and LangChain for robust, extensible reasoning.
- User starts a conversation with the AI agent via the Streamlit web interface.
- The agent collects:
- City of interest
- Preferred places to visit
- Trip duration
- Itinerary Generation: The agent creates a detailed, day-wise plan, including meal breaks and local food recommendations.
- Hotel & Restaurant Suggestions: For each place, the agent can suggest nearby hotels and restaurants.
- Route Planning: Generates Google Maps links for daily routes.
- Itinerary Sharing: Optionally, the agent can send the itinerary to your email using the Gmail tool.
This project uses an agentic framework built on LangGraph and LangChain:
- Agent Executor: Orchestrates the conversation, memory, and tool usage.
- Tools: Each major function (landmarks, hotels, maps, Gmail, restaurants) is a modular tool, invoked as needed.
- Memory: Maintains conversation context for a seamless, multi-turn experience.
- LLMs: Uses GROQ-hosted models and optionally Google Gemini for reasoning and content generation.
AI-Trip-Planner/
├── main.py # Streamlit app and agent orchestration
├── requirements.txt # Python dependencies
├── demo.gif # Demo video
├── Prompts/
│ └── prompts.py # System and tool prompt templates
├── Tools/
│ ├── GoogleGmailTool.py # Gmail tool for sending emails
│ ├── HotelsExtractionTool.py # Hotel search and image fetching
│ ├── LandmarksExtractionTool.py # Landmark search and image fetching
│ ├── MapTool.py # Google Maps route generation
│ └── RestaurantsTool.py # Restaurant/food spot search
└── .streamlit/
└── config.toml # Streamlit UI theme config
- Python 3.8+
- pip
- GROQ API Key
- Google Cloud Platform Project & API Key
- Gmail API credentials (OAuth 2.0 client)
- Clone the repository:
git clone https://github.com/Saad-Shakeel/AI-Trip-Planner.git cd AI-Trip-Planner - Install dependencies:
pip install -r requirements.txt
- Set up environment variables:
- Create a
.envfile in the root directory:GROQ_API_KEY=your_groq_api_key_here GOOGLE_API_KEY=your_google_api_key_here
- Create a
- Sign up at GROQ Console.
- Go to API Keys and create a new key.
- Add it to your
.envfile asGROQ_API_KEY.
- Go to Google Cloud Console.
- Create a new project (or use an existing one).
- Enable the following APIs:
- Maps JavaScript API
- Places API
- Gmail API
- Go to APIs & Services > Credentials and create an API Key.
- Add it to your
.envfile asGOOGLE_API_KEY.
To send emails, you need OAuth 2.0 credentials for the Gmail API:
-
- Go to APIs & Services > Credentials.
- Click Create Credentials > OAuth client ID.
- Choose Desktop app.
- Download the
credentials.jsonfile and place it inTools/Credentials.json.
-
First-time Gmail Tool Use:
- When you use the Gmail tool for the first time, a link will be printed in the console.
- Open the link in your browser, log in to your Gmail account, and grant access.
- This will generate a
token.jsonfile in theTools/directory for future use.
Note: The Gmail tool is only used when you choose to share your itinerary via email.
streamlit run main.py- Open the provided local URL in your browser.
- Start chatting with the AI Trip Planner!
This work is a part of ATS's projects catalog.
