How shubham96001/bharatyatraai works
Bharat Yatra AI is a Streamlit travel-planning app. Users enter a trip request, the LangGraph workflow researches transport and hotels, builds an itinerary, and produces a final plan; the UI also offers destination browsing and PDF export. Destination detail pages can prefill the planner, and destination images are resolved from local assets. The graph follows the agent sequence and imports shown in the excerpts and documented UI flow. The flight-search tool is present but no connection from the planner is shown, so it is represented as a separate integration.
Main entry points: frontend.py Streamlit UI · state_detail.py Destination detail · main.py LangGraph planner · prefill_utils.py Prompt prefill
Components 17
User experience
- Streamlit UI
frontend.py - PDF export
frontend.py - Destination detail
state_detail.py - Prompt prefill
utils/prefill_utils.py
Trip planning workflow
- LangGraph planner
main.py - Transit agent
main.py - Hotel agent
main.py - Itinerary agent
main.py - Final response agent
main.py - Conversation checkpoint
main.py
Research integrations
- Tavily research
tools/tavily_tool.py - Groq LLM
- Flight search tool
tools/flight_tool.py - AviationStack API
Destination content
- Destination metadata
states_data.py - Local image resolver
image_utils.py
Other components
- Traveler
Connections 21
- Traveler → Streamlit UI: submits request
README.md - Streamlit UI → LangGraph planner: invokes planner
README.md - LangGraph planner → Transit agent: starts workflow
main.py - Transit agent → Hotel agent: dispatches next
main.py - Hotel agent → Itinerary agent: dispatches next
main.py - Itinerary agent → Final response agent: dispatches next
main.py - Transit agent → Tavily research: searches routes
main.py - Hotel agent → Tavily research: searches hotels
main.py - Itinerary agent → Groq LLM: generates itinerary
main.py - Final response agent → Groq LLM: summarizes plan
main.py - LangGraph planner → Conversation checkpoint: persists state
main.py - Final response agent → Streamlit UI: streams results
README.md - Streamlit UI → PDF export: exports plan
README.md - Streamlit UI → Destination detail: renders selection
frontend.py - Destination detail → Destination metadata: reads details
state_detail.py - Destination detail → Prompt prefill: builds prompt
state_detail.py - Prompt prefill → Streamlit UI: fills planner
- Destination detail → Local image resolver: resolves gallery
state_detail.py - Streamlit UI → Destination metadata: looks up imagery
frontend.py - Streamlit UI → Local image resolver: resolves images
frontend.py - Flight search tool → AviationStack API: requests flights
tools/flight_tool.py