VoyageAI Planner turns a single natural-language request like
"Plan a 3-day honeymoon to Paris with $2000" into a validated, day-by-day itinerary.
Under the hood, a LangGraph state machine orchestrates specialized agents — a coordinator,
a task decomposer, a tool-using judge, a synthesizer, and a validator — that can retry, refine, and
self-correct before anything reaches the user. The frontend is a React chat UI streaming updates in real time
via Server-Sent Events; the backend is a FastAPI service that exposes a single
/chat/stream endpoint powering the whole experience.
A dedicated Security Check node sits at the entry point, filtering prompt-injection and off-topic requests before any LLM planning work runs — saving tokens and preventing misuse.
One endpoint, four behaviors: plan, refine, chat, or reply. The Intent Recognition node routes each message to exactly the sub-graph it needs — no wasted compute on simple small talk.
Tool → Judge → Tool. The Judgement Agent decides whether a sub-task is complete or needs another tool call, with a hard retry ceiling and a fallback path — no infinite loops, no silent failures.
Every synthesized itinerary passes through a Validator that checks duration, budget, and structural integrity against the original constraints before it ever reaches the user.
A dedicated Refine Plan branch lets users tweak an existing itinerary ("make day 2 cheaper") without re-running the full pipeline — faster and much lower cost.
The frontend shows live node progress — coordinator, judge,
synthesize — so users see the agent thinking instead of staring at a spinner.
Nodes, routers, core state, and utils live in separate packages. Adding a new capability is a matter of registering one node — no tangled monolith.
LLM-powered normalization extracts destination, duration, budget, and trip type from both English and Chinese natural-language requests with the same pipeline.