How codewithaarohi/ai-travel-planning-system-using-langgraph works
This is a LangGraph travel-planning app: a user submits a trip request through the Streamlit interface or terminal, then a sequential agent workflow gathers flight and hotel information, creates an itinerary, and produces a final response. PostgreSQL checkpoints conversation state, while AviationStack, Tavily, and Groq provide external data and language-model services. The source excerpts show the graph and tool calls; some Streamlit execution details are unsampled, so those links rely on README evidence.
Main entry points: main.py LangGraph workflow · frontend.py Streamlit interface · flight_tool.py Flight search tool · tavily_tool.py Hotel search tool
Components 15
User interfaces
- Streamlit interface
frontend.py - Terminal entry
main.py
Planning workflow
- LangGraph workflow
main.py - Flight agent
main.py - Hotel agent
main.py - Itinerary agent
main.py - Final response agent
main.py
External integrations
- Flight search tool
tools/flight_tool.py - AviationStack API
- Hotel search tool
tools/tavily_tool.py - Tavily Search API
- Groq LLM
Memory and output
- PostgreSQL checkpoints
- Saved travel plan
frontend.py
Other components
- Traveler
Connections 16
- Traveler → Streamlit interface: submits request
README.md - Traveler → Terminal entry: enters request
main.py - Streamlit interface → LangGraph workflow: runs workflow
README.md - Terminal entry → LangGraph workflow: invokes workflow
main.py - LangGraph workflow → Flight agent: starts at
main.py - Flight agent → Hotel agent: dispatches next
main.py - Hotel agent → Itinerary agent: dispatches next
main.py - Itinerary agent → Final response agent: dispatches next
main.py - Flight agent → Flight search tool: searches flights
main.py - Flight search tool → AviationStack API: requests flight data
tools/flight_tool.py - Hotel agent → Hotel search tool: searches hotels
main.py - Hotel search tool → Tavily Search API: searches web
tools/tavily_tool.py - Itinerary agent → Groq LLM: generates itinerary
main.py - Final response agent → Groq LLM: generates response
main.py - LangGraph workflow → PostgreSQL checkpoints: checkpoints state
main.py - Streamlit interface → Saved travel plan: saves plan
frontend.py