How lagom-ta/journeypilot works
JourneyPilot is an evidence-backed travel-planning workspace: a traveler submits a brief, follows a fast-answer or multi-day research path, then reviews and refines a connected itinerary, evidence, map, report, and PDF. The graph preserves the documented planning stages and major capabilities, with backend run control and delivery as internal layers. Several backend stages are documented in the README but their implementation was not sampled, so those edges cite the README rather than implying source-level inspection.
Main entry points: dispatcher.py Parallel travel research · App.tsx Web application · app.py FastAPI application · run_control.py Run control
Components 22
Traveler workspace
- Web application
frontend/src/App.tsx - Session and chat state
frontend/src/context/AppContext.tsx - Session manager
frontend/src/hooks/useSessionManager.ts - API client
frontend/src/lib/api.ts - Trip workspace
frontend/src/components/workspace/TripWorkspaceShell.tsx
API and run control
- FastAPI application
src/travel_agent/api/app.py - Chat and trip routes
src/travel_agent/api/routes/chat.py - Run control
src/travel_agent/workflows/run_control.py
Planning and research
- Fast-answer workflow
src/travel_agent/workflows/fast_answer.py - Brief and constraints
src/travel_agent/agents/scope/node.py - Research query planning
src/travel_agent/services/research_query_planner.py - Research query plan
src/travel_agent/entities/research_query_plan.py - Parallel travel research
src/travel_agent/agents/orchestrator/dispatcher.py - Itinerary assembly
src/travel_agent/workflows/travel_planning.py
Data and evidence
- Knowledge retrieval
src/travel_agent/rag/retrieval_pipeline.py - Travel provider tools
src/travel_agent/tools/mcp_manager.py - Weather planning
src/travel_agent/services/weather_impact_engine.py
Trip delivery
- Delivery record
src/travel_agent/entities/delivery_bundle.py - Itinerary, map, report
frontend/src/components/workspace/DeliveryWorkspace.tsx - PDF export
src/travel_agent/services/pdf_export.py - PostgreSQL and pgvector
Other components
- Traveler
Connections 21
- Traveler → Web application: submits brief
README.md - Web application → Session and chat state: uses state
frontend/src/App.tsx - Web application → Trip workspace: shows trip view
frontend/src/App.tsx - Session manager → Session and chat state: restores session
frontend/src/hooks/useSessionManager.ts - Web application → API client: requests services
- API client → FastAPI application: calls API
- FastAPI application → Chat and trip routes: registers routes
src/travel_agent/api/app.py - Chat and trip routes → Run control: starts trip run
- Run control → Fast-answer workflow: routes simple questions
README.md - Run control → Brief and constraints: routes trip brief
README.md - Brief and constraints → Research query planning: plans research
README.md - Research query planning → Research query plan: produces plan
src/travel_agent/services/research_query_planner.py - Research query planning → Parallel travel research: dispatches research
README.md - Parallel travel research → Knowledge retrieval: retrieves knowledge
- Parallel travel research → Travel provider tools: queries providers
README.md - Parallel travel research → Weather planning: considers forecasts
README.md - Parallel travel research → Itinerary assembly: assembles itinerary
README.md - Itinerary assembly → Delivery record: creates delivery
README.md - Delivery record → Itinerary, map, report: powers workspace
README.md - Delivery record → PDF export: exports report
README.md - FastAPI application → PostgreSQL and pgvector: persists trip data
README.md