Multi Agent AI System for Personalized Trip Planning
AI AgentsMulti Agent OrchestrationClaude Agent SDKFastAPIStructured OutputsServer-Sent Events
Built a full stack, multi agent AI system that converts natural language travel preferences into multiple personalized, validated day trip itineraries. Specialized LLM agents handle preference interpretation, activity and restaurant research, contextual reasoning, itinerary criticism, and iterative revision, exchanging schema validated outputs through Pydantic models while Python and AnyIO coordinate concurrent, dependency aware execution. A real time event bus streams agent status, tasks, and validation results to a React interface via Server-Sent Events.
The architecture separates probabilistic reasoning from factual retrieval and constraint enforcement. Google Places supplies verified venue details, coordinates, ratings, and hours; routing APIs provide real travel time and distance data; and Open-Meteo adds weather context specific to location and date. A deterministic scheduling engine combines these sources with user constraints, including budget, meal windows, transportation, pace, must do locations, and trip duration, to construct distinct itinerary variants. A Critic agent then evaluates each schedule for feasibility and experience quality, triggering bounded revision loops that remove problematic stops and rebuild the plan.
Designed a modular multi agent workflow (Coordinator, Activity Discovery, Food Discovery, Context, Critic, and Trip Briefing agents) using the Claude Agent SDK with structured JSON generation, retry handling, and Pydantic schema validation.
Used AnyIO task groups to run independent research agents and itinerary variant generation concurrently, reducing end to end planning latency.
Grounded model outputs in external, real world data via Google Places, traffic aware routing/geocoding, and Open-Meteo weather to reduce hallucinations and enforce real world constraints.
Built a deterministic, constraint aware scheduler that scores itinerary candidates across preference alignment, geographic efficiency, quality, diversity, budget fit, and weather suitability.
Implemented a revision loop between the Planner and Critic agents that validates generated schedules, identifies high severity problems, and automatically regenerates improved itineraries.
Built a FastAPI backend with asynchronous background execution, graceful task cancellation, structured error propagation, and Server-Sent Events streaming.
Created a real time React/Vite frontend that visualizes agent activity, communication between agents, validation outcomes, and multiple itinerary alternatives as they're generated.
Added a dedicated briefing agent that converts finalized itineraries into downloadable one page traveler handouts, with provider fallbacks so the app degrades gracefully without paid APIs.