How trevorphix001/travelmate works
TravelMate AI converts a trip request into a cited, budget-checked, map-ready itinerary. The browser submits requests to the API, which uses a LangGraph workflow for extraction, location resolution, research, weather and transport enrichment, day scheduling, budget adjustment, and validation. Plans can also be edited and saved. The README documents the workflow and its major capabilities; the graph wiring is supported by the sampled graph builder, while some agent internals are unsampled, so those relationships are shown only where documented or indexed.
Main entry points: build.py Workflow graph · plans.py Plans API · itinerary.py Day scheduling · app.js Browser app
Components 23
Web client
- Browser app
web/js/app.js - Plan view
web/js/views/plan.js
API and workflow
- Plans API
app/api/plans.py - Workflow graph
app/graph/build.py - Workflow state
app/graph/state.py
Trip planning
- Request extraction
app/agents/supervisor.py - Place resolution
app/agents/geo_node.py - Attraction research
app/agents/research.py - Weather enrichment
app/agents/weather_node.py - Transport options
app/agents/transport.py - Day scheduling
app/agents/itinerary.py - Budget adjustment
app/agents/budget.py - Plan validation
app/agents/aggregator.py - Plan editor
app/agents/editor.py - Plan data models
app/schemas/plan.py
Data sources
- Place discovery
app/tools/attractions.py - Road routing
app/tools/routing.py - Weather data
app/tools/weather.py
Shared services
- Structured LLM client
app/llm/client.py - External-call cache
app/core/cache.py - Data repository
app/db/repo.py - Postgres
app/db/pool.py
Other components
- Traveler
Connections 29
- Traveler → Browser app: enters trip request
README.md - Browser app → Plans API: submits plan request
README.md - Plans API → Workflow graph: runs planning workflow
- Workflow graph → Request extraction: dispatches
app/graph/build.py - Workflow graph → Place resolution: dispatches
app/graph/build.py - Workflow graph → Attraction research: dispatches
app/graph/build.py - Workflow graph → Weather enrichment: dispatches
app/graph/build.py - Workflow graph → Transport options: dispatches
app/graph/build.py - Workflow graph → Day scheduling: dispatches
app/graph/build.py - Workflow graph → Budget adjustment: dispatches
app/graph/build.py - Workflow graph → Plan validation: dispatches
app/graph/build.py - Workflow graph → Workflow state: uses state
app/graph/build.py - Request extraction → Structured LLM client: extracts request
app/agents/supervisor.py - Attraction research → Place discovery: gathers candidates
app/agents/research.py - Attraction research → Structured LLM client: ranks candidate IDs
app/agents/research.py - Day scheduling → Structured LLM client: assigns days
app/agents/itinerary.py - Day scheduling → Road routing: computes travel legs
app/agents/itinerary.py - Budget adjustment → Day scheduling: requests replanning
README.md - Plan validation → Plan data models: validates plan
app/agents/aggregator.py - Day scheduling → Plan data models: builds day plans
app/agents/itinerary.py - Weather enrichment → Weather data: fetches forecasts
- Transport options → Road routing: gets route estimates
- Structured LLM client → External-call cache: caches responses
app/llm/client.py - External-call cache → Data repository: reads and writes cache
app/core/cache.py - Data repository → Postgres: executes SQL
app/db/repo.py - Plans API → Plan editor: edits saved plans
app/api/plans.py - Plans API → Data repository: saves and loads plans
app/api/plans.py - Browser app → Plan view: renders itinerary
web/js/app.js - Plans API → Browser app: returns plan data