How vishuu-patil-001/tripmind-ai works
TripMind AI turns a natural-language trip request into a structured travel plan through a FastAPI entry point and a LangGraph agent workflow. The workflow researches flights, hotels, and weather, then creates an itinerary and final response; destination research is also a documented capability. Supporting layers manage session credentials, LLM access, MCP tools, optional Redis caching, and PostgreSQL checkpoints. Some subsystem connections are documented rather than shown in sampled source, so those links are marked dashed.
Main entry points: graph.py Agent Orchestration · config.py MCP Registry · app.py FastAPI API · flight_agent.py Flight Research
Components 27
User Experience
- Web Interface
frontend/static/js/app.js - FastAPI API
app.py - Request Validation
src/api/validation.py - Session Credentials
src/api/sessions.py
Planning Workflow
- Workflow Runner
src/graph/runner.py - Agent Orchestration
src/graph/graph.py - Travel State
src/graph/state.py - Destination Research
src/agents/destination.py - Flight Research
src/agents/flight_agent.py - Hotel Research
src/agents/hotel_agent.py - Weather Research
src/agents/weather_agent.py - Itinerary Generation
src/agents/itinerary_agent.py - Plan Generation
src/agents/final_agent.py - Agent Prompts
src/agents/prompts.py
Research Integrations
- MCP Registry
src/mcp_servers/config.py - Local MCP Tools
src/mcp_servers/local.py - Remote MCP Tools
src/mcp_servers/remote.py
Runtime Services
- Groq Client
src/clients/llm.py - Redis Cache
src/clients/cache.py - Workflow Checkpointer
src/clients/checkpointer.py
Other components
- Traveler
- Groq Inference
- AviationStack
- Weather Data
- Tavily Research
- Redis
- PostgreSQL
Connections 30
- Traveler → Web Interface: submits trip
README.md - Web Interface → FastAPI API: sends request
- FastAPI API → Request Validation: validates input
app.py - FastAPI API → Session Credentials: loads credentials
app.py - FastAPI API → Workflow Runner: starts planning
app.py - Workflow Runner → Agent Orchestration: runs workflow
src/graph/runner.py - Agent Orchestration → Flight Research: dispatches first
src/graph/graph.py - Agent Orchestration → Hotel Research: dispatches next
src/graph/graph.py - Agent Orchestration → Weather Research: dispatches next
src/graph/graph.py - Agent Orchestration → Itinerary Generation: dispatches next
src/graph/graph.py - Agent Orchestration → Plan Generation: dispatches last
src/graph/graph.py - Workflow Runner → Travel State: initializes state
src/graph/runner.py - Agent Orchestration → Travel State: shares state
src/graph/graph.py - Flight Research → Local MCP Tools: requests aviation data
src/agents/flight_agent.py - Weather Research → Local MCP Tools: requests weather
src/agents/weather_agent.py - Hotel Research → Remote MCP Tools: requests hotel research
src/agents/hotel_agent.py - Local MCP Tools → MCP Registry: loads tools
src/mcp_servers/local.py - Remote MCP Tools → MCP Registry: loads tools
src/mcp_servers/remote.py - MCP Registry → AviationStack: connects locally
src/mcp_servers/config.py - MCP Registry → Weather Data: connects locally
src/mcp_servers/config.py - MCP Registry → Tavily Research: connects remotely
src/mcp_servers/config.py - Flight Research → Groq Client: generates guidance
src/agents/flight_agent.py - Itinerary Generation → Groq Client: generates itinerary
src/agents/itinerary_agent.py - Plan Generation → Groq Client: generates plan
src/agents/final_agent.py - Groq Client → Groq Inference: invokes model
src/clients/llm.py - Flight Research → Agent Prompts: uses templates
src/agents/flight_agent.py - Agent Orchestration → Workflow Checkpointer: configures persistence
src/graph/graph.py - Workflow Checkpointer → PostgreSQL: persists checkpoints
README.md - Local MCP Tools → Redis Cache: caches lookups
src/mcp_servers/local.py - Redis Cache → Redis: reads and writes
src/clients/cache.py