DOCUMENTATION

LangGraph MCP Supervisor Routing HITL Workflows

Comprehensive technical guide to WayVify's multi-agent architecture, supervisor routing algorithms, live MCP tool adapters, and human-in-the-loop state interrupts.

What is WayVify?

WayVify is an autonomous multi-agent travel orchestration framework engineered with LangGraph and the Model Context Protocol (MCP). Unlike traditional single-prompt chatbot wrappers, WayVify operates as an intelligent multi-agent network: a central Supervisor Agent decomposes incoming user queries, enforces safety and domain guardrails, dynamically selects specialized domain agents (flights, hotels, weather, budget), and aggregates results into a structured draft itinerary for human review before finalization.

Evolution: From TripGenie to WayVify

WayVify evolved from my earlier TripGenie project—a React Native mobile application for AI travel planning—expanding the concept into a full-fledged multi-agent orchestration architecture featuring dynamic supervisor routing, live MCP server integration, and stateful human-in-the-loop approval checkpoints.

How WayVify Works

WayVify converts natural language travel requests into personalized itineraries through a stateful execution pipeline:

📝 User Input & Constraints Query, duration, budget & currency selection
🧠 Input Guardrail & Supervisor Agent Domain validation & dynamic specialist routing
✈️ Flight Agent (AviationStack)
🏨 Hotel Agent (Tavily MCP)
🌤️ Weather Agent (OpenWeather)
💰 Budget Agent (Feasibility)
🗺️ Itinerary Aggregation Agent Draft itinerary generation
👤 Human-in-the-Loop Interrupt User feedback & approval checkpoint
Final Polished Output Structured multi-category travel plan

Autonomous Agent Network

WayVify distributes tasks across dedicated specialist agents running within a unified state graph:

🧠

Supervisor & Guardrail Agent

Validates query safety and relevance, extracts travel constraints (origin, destination, budget, style), and determines optimal routing to specialist sub-agents.

✈️

Flight Specialist Agent

Interfaces via MCP to retrieve live airport metadata, airline routes, direct/connecting leg options, peak season alerts, and currency-adjusted airfare estimates.

🏨

Hotel Discovery Agent

Executes web search tool calls to query curated stays, safety assessments, luxury vs budget accommodations, and neighborhood location advice.

🌤️

Weather Specialist Agent

Queries custom OpenWeather MCP servers for real-time temperatures, five-period forecasts, seasonal advice, and packing suggestions.

💰

Budget Analyst Agent

Evaluates financial feasibility, identifies risk areas (overpriced stays, surge transport), recommends cost savings, and computes total estimates in preferred currency.

🗺️

Itinerary Aggregator Agent

Synthesizes flight, hotel, weather, and budget data into a cohesive day-by-day travel plan, resolving scheduling conflicts and optimizing flow.

👤

Human-in-the-Loop Agent

Leverages LangGraph state interrupts (`interrupt()`) to pause execution. Allows travelers to approve the draft or submit revision feedback before finalizing.

Engineering Architecture & Integrations

Built for high performance, state resilience, and strict domain control:

  • LangGraph State Graphs: Manages stateful cyclic transitions, checkpointer persistence (PostgreSQL / MemorySaver), and dynamic graph routing.
  • Model Context Protocol (MCP): Standardized client adapters (`MultiServerMCPClient`) connecting agents asynchronously to live Tavily, AviationStack, and custom FastMCP servers.
  • FastAPI & REST Endpoints: Exposes clean REST endpoints (`/api/travel`, `/api/travel/approve`, `/health`) with async execution handling.
  • Llama-3.3-70B via Groq: High-speed inference engine providing structured JSON extraction and rapid multi-turn reasoning.

Engineering Decisions & Safeguards

Key architectural choices behind WayVify's production design:

  • Stateful Graph Interruption: Pausing execution via `interrupt()` preserves full conversation state and past tool results across user approval cycles.
  • MCP Tool Decoupling: Tool servers (OpenWeather, AviationStack, Tavily) run as isolated FastMCP microservices, isolating core agent logic from third-party API changes.
  • Multi-Currency Normalization: Automatic currency conversion layer standardizes budget outputs across INR (₹), USD ($), EUR (€), and GBP (£).
  • Input Guardrailling: Front-line validation agent filters non-travel queries before invoking downstream agent networks, saving compute and preventing hallucinations.