How dhruva-31/tripmate-ai works
TripMate AI turns a natural-language travel request into a reviewed travel plan. A browser submits the request to the FastAPI app, which invokes a LangGraph workflow: guardrail and supervisor routing, selected flight, hotel, weather, and budget research, itinerary drafting, human approval or revision, and final response formatting. PostgreSQL persists workflow state. The README documents the main travel-agent stages; sampled backend excerpts also show weather, budget, and approval behavior. The separate MCP client and direct-search tools are represented, but unsampled backend sections limit some call-level detail.
Main entry points: backend.py Guardrail and routing · mcp_client.py MCP client · app.py FastAPI endpoints · script.js Web interface
Components 20
Web experience
- Web interface
static/script.js - FastAPI endpoints
app.py
Travel workflow
- LangGraph workflow
backend.py - Guardrail and routing
backend.py - Flight research
backend.py - Hotel research
backend.py - Weather research
backend.py - Budget analysis
backend.py - Itinerary planning
backend.py - Plan approval
backend.py - Final response
backend.py
Research integrations
- MCP client
mcp_client.py - Weather MCP server
custom_weather_mcp_server.py - Flight search tool
tools/flight_tool.py - Tavily search tool
tools/travily_tool.py
Workflow state
- PostgreSQL checkpoint
backend.py
Other components
- Traveler
- AviationStack
- Tavily search
- OpenWeather
Connections 26
- Traveler → Web interface: enters request
static/script.js - Web interface → FastAPI endpoints: posts travel request
static/script.js - FastAPI endpoints → LangGraph workflow: runs workflow
app.py - FastAPI endpoints → LangGraph workflow: resumes approval
app.py - LangGraph workflow → Guardrail and routing: routes request
README.md - Guardrail and routing → Flight research: selects agent
README.md - Guardrail and routing → Hotel research: selects agent
README.md - Guardrail and routing → Weather research: selects agent
backend.py - Guardrail and routing → Budget analysis: selects agent
backend.py - Guardrail and routing → Itinerary planning: selects agent
README.md - Flight research → MCP client: requests flight data
backend.py - Hotel research → MCP client: searches hotels
backend.py - Weather research → MCP client: requests conditions
backend.py - MCP client → AviationStack: calls aviation tools
mcp_client.py - MCP client → Tavily search: searches web
mcp_client.py - MCP client → Weather MCP server: launches server
mcp_client.py - Weather MCP server → OpenWeather: fetches weather
custom_weather_mcp_server.py - Flight research → Itinerary planning: informs itinerary
README.md - Hotel research → Itinerary planning: informs itinerary
README.md - Itinerary planning → Plan approval: requests review
backend.py - Plan approval → Itinerary planning: revises draft
backend.py - Plan approval → Final response: approves plan
backend.py - Itinerary planning → Final response: formats result
README.md - LangGraph workflow → PostgreSQL checkpoint: checkpoints state
backend.py - LangGraph workflow → Flight search tool: may use direct search
backend.py - LangGraph workflow → Tavily search tool: may use direct search
backend.py