How sumanentc/travel-planner works
RoamWise is a Chainlit travel-planning chat application. A user query enters the LangGraph workflow, which validates intent, classifies travel queries, gathers trip details, and guides the user through transport, accommodation, and itinerary recommendations with approval and feedback loops. The workflow also supports decision routing and emailing a completed itinerary. Shared models, prompts, tools, and OpenAI configuration support the agents. The README documents SQLite chat-history persistence and the human-approval stages; source excerpts do not show their complete runtime wiring, so those links are omitted or marked unverified.
Main entry points: workflow.py Travel workflow · query_analyzer.py Query analyzer · prompts.py Agent prompts · agent_models.py Travel state models
Components 19
Chat interface
- Chat interface
app.py - Chat history
.chainlit/config.toml
Workflow orchestration
- Travel workflow
workflow.py
Travel planning agents
- Intent validator
agents/validator.py - Query analyzer
agents/query_analyzer.py - Entity identifier
agents/entity_identifier.py - Decision router
agents/decision.py - Transport planner
agents/transport.py - Accommodation planner
agents/accomodation.py - Itinerary planner
agents/itinerary.py - Itinerary email
agents/email_agent.py
Shared agent services
- Agent prompts
agents/prompts.py - Travel state models
models/agent_models.py - Search and research tools
tools/custom_tools.py - OpenAI model setup
utils.py
Other components
- Traveler
- OpenAI
- Web search services
- Brevo email service
Connections 39
- Traveler → Chat interface: submits queries
README.md - Chat interface → Travel workflow: starts planning
app.py - Traveler → Travel workflow: approves or revises
README.md - Travel workflow → Intent validator: dispatches
workflow.py - Travel workflow → Query analyzer: dispatches
workflow.py - Travel workflow → Entity identifier: dispatches
workflow.py - Travel workflow → Decision router: dispatches
workflow.py - Travel workflow → Transport planner: dispatches
workflow.py - Travel workflow → Accommodation planner: dispatches
workflow.py - Travel workflow → Itinerary planner: dispatches
workflow.py - Travel workflow → Itinerary email: dispatches
workflow.py - Travel workflow → Query analyzer: routes after validation
README.md - Travel workflow → Entity identifier: routes after analysis
README.md - Travel workflow → Transport planner: routes after entity approval
README.md - Travel workflow → Itinerary planner: routes after transport approval
README.md - Travel workflow → Itinerary email: routes for email
README.md - Intent validator → Agent prompts: uses prompt
agents/validator.py - Intent validator → Travel state models: uses state model
agents/validator.py - Query analyzer → Agent prompts: uses prompt
agents/query_analyzer.py - Query analyzer → Travel state models: uses intent model
agents/query_analyzer.py - Query analyzer → Search and research tools: uses search tool
agents/query_analyzer.py - Query analyzer → OpenAI model setup: gets model
agents/query_analyzer.py - Entity identifier → Agent prompts: uses prompt
agents/entity_identifier.py - Entity identifier → Travel state models: uses inquiry model
agents/entity_identifier.py - Transport planner → Agent prompts: uses prompt
agents/transport.py - Transport planner → Travel state models: uses state model
agents/transport.py - Transport planner → Search and research tools: uses research tools
agents/transport.py - Accommodation planner → Agent prompts: uses prompt
agents/accomodation.py - Accommodation planner → Travel state models: uses state model
agents/accomodation.py - Accommodation planner → Search and research tools: uses search tools
agents/accomodation.py - Itinerary planner → Agent prompts: uses prompt
agents/itinerary.py - Itinerary planner → Travel state models: uses itinerary model
agents/itinerary.py - Itinerary email → Agent prompts: uses prompt
agents/email_agent.py - Itinerary email → Travel state models: uses email model
agents/email_agent.py - Itinerary email → Brevo email service: sends itinerary
agents/email_agent.py - Search and research tools → Web search services: searches and researches
tools/custom_tools.py - Intent validator → OpenAI: queries model
- Query analyzer → OpenAI: queries model
- Traveler → Chat history: resumes conversations
README.md