How harshbhanushali26/waypoint works
Waypoint turns a submitted trip request into a grounded, budget-aware itinerary, then pauses for user approval or edits. The documented workflow runs through normalization, planning, live data searches, budgeting, itinerary composition, validation, and review; edits are interpreted and selectively rerun. The graph captures the documented orchestration and major product capabilities. Several frontend-to-API and unsampled subsystem links are not established by the excerpts, so they are omitted or marked unverified.
Main entry points: build_graph.py Workflow graph · state.py Trip state · trips.py Trip endpoints · llm.py Structured LLM runtime
Components 29
User experience
- Trip form
frontend/js/form.js - Trip views
frontend/js/itinerary-render.js - Review UI
frontend/js/review.js - Calendar export
frontend/js/calendar-export.js
API and persistence
- FastAPI app
api/main.py - Trip endpoints
api/routers/trips.py - Trip records
db/models.py - Database sessions
db/session.py - Graph checkpoint
db/checkpointer.py
Trip workflow
- Workflow graph
graph/build_graph.py - Trip state
graph/state.py - Input normalization
agents/concierge.py - Search planning
agents/planner.py - Budget analysis
agents/budget.py - Itinerary builder
agents/itinerary_builder.py - Itinerary validator
graph/validator.py - Human review
graph/human_review.py - Review critic
agents/critic.py - Finalize trip
graph/finalize.py
Travel data
- Flight search
tools/search_flights.py - Train search
tools/search_trains.py - Hotel search
tools/search_hotels.py - Activity search
tools/search_activities.py - Weather search
tools/get_weather.py
Shared runtime
- Structured LLM runtime
core/llm.py - Typed schemas
models/schemas.py
Other components
- Traveler
- Travel data providers
- PostgreSQL
Connections 44
- Traveler → Trip form: enters trip
- Trip form → Trip endpoints: submits trip
- FastAPI app → Workflow graph: builds graph
api/main.py - FastAPI app → Trip endpoints: registers routes
api/main.py - Trip endpoints → Trip records: manages records
api/routers/trips.py - Trip endpoints → Workflow graph: invokes workflow
- FastAPI app → Graph checkpoint: sets up checkpoint
api/main.py - Workflow graph → Input normalization: runs
graph/build_graph.py - Workflow graph → Search planning: runs
graph/build_graph.py - Workflow graph → Flight search: dispatches search
graph/build_graph.py - Workflow graph → Train search: dispatches search
graph/build_graph.py - Workflow graph → Hotel search: dispatches search
graph/build_graph.py - Workflow graph → Activity search: dispatches search
graph/build_graph.py - Workflow graph → Weather search: dispatches search
graph/build_graph.py - Workflow graph → Budget analysis: runs
graph/build_graph.py - Workflow graph → Itinerary builder: runs
graph/build_graph.py - Workflow graph → Itinerary validator: runs
graph/build_graph.py - Workflow graph → Human review: pauses for review
graph/build_graph.py - Workflow graph → Review critic: routes edits
graph/build_graph.py - Workflow graph → Finalize trip: finalizes approval
graph/build_graph.py - Input normalization → Trip state: writes normalized input
agents/concierge.py - Search planning → Trip state: writes search plan
agents/planner.py - Budget analysis → Structured LLM runtime: requests structured output
agents/budget.py - Itinerary builder → Structured LLM runtime: requests structured output
agents/itinerary_builder.py - Review critic → Structured LLM runtime: requests structured output
agents/critic.py - Budget analysis → Trip state: reads trip data
agents/budget.py - Itinerary builder → Trip state: reads candidates
agents/itinerary_builder.py - Review critic → Trip state: reads review state
agents/critic.py - Human review → Trip state: pauses and updates
graph/human_review.py - Itinerary validator → Trip state: validates itinerary
graph/validator.py - Flight search → Travel data providers: fetches flights
- Train search → Travel data providers: fetches train fares
- Hotel search → Travel data providers: fetches hotels
- Activity search → Travel data providers: searches activities
- Weather search → Travel data providers: fetches forecast
- Activity search → Structured LLM runtime: extracts activities
tools/search_activities.py - Finalize trip → Database sessions: uses sessions
graph/finalize.py - Database sessions → Trip records: persists trip data
- Graph checkpoint → PostgreSQL: stores checkpoints
- Database sessions → PostgreSQL: connects to
db/session.py - Trip endpoints → Trip views: returns itinerary
- Trip endpoints → Review UI: accepts review
- Trip views → Calendar export: exports schedule
- Typed schemas → Trip state: defines typed outputs