← Back to Projects

WanderAI — Multi-Agent AI Travel Planner

An autonomous multi-agent travel system that builds spatially coherent day-by-day itineraries. It combines LangGraph state machines with K-means++ coordinate clustering, Reddit community sentiment scoring, and an interactive drag-and-drop timeline with Playwright PDF export.

LangGraph Next.js 16 FastAPI Gemini 3.5 Flash Groq (Qwen 3.6 27B) ChromaDB Leaflet Playwright PDF LoRA Llama 3.2 Python 3.12

🌌 01 · Main Home & Exploration Studio

WanderAI Nocturnal Voyager Landing Studio

💡 The Problem

Standard AI travel planners are simple wrappers around single LLM prompts. They often hallucinate attractions, generate geographically chaotic routes (causing zig-zag transit across cities), push generic tourist traps, and lack persistent state for iterative editing.

🎯 The Solution

WanderAI is a multi-agent state machine built with LangGraph. Four specialized agents (Intake, Ranker, Planner, Editor) parse requirements with dynamic clarifying questions, surface authentic hidden gems using sentiment-scored Reddit discussions, group attractions using K-means++ geographic clustering, and provide interactive timeline drag-and-drop editing with instant Playwright PDF export.

⚡ Key Engineering Highlights

🤖

Dynamic Clarifying Questions

Detects brief prompts (e.g., "3 days in Kyoto") and leverages Gemini 2.0/3.5 Flash to generate context-specific preference chips (vibe, dietary needs, pace) before execution.

💎

Log-Normalized Hidden Gem Engine

Cross-references Google Places popularity with Reddit and travel blog sentiment via VADER intensity and Tavily search to surface verified, under-the-radar local gems.

🗺️

K-means++ Spatial Clustering

Partitions attractions into geographically coherent daily clusters with maximally-spread centroid initialization and regional multi-zone dispersion for wide destinations (Goa, Rajasthan, Bali).

🔄

Multi-Turn Conversational Editor

Autonomous Editor Agent classifies user feedback (swap_stop, remove_stop, adjust_pace, tell_me_more) and performs live state patching with transit recalculations.

⏱️

Timeline & Drag-and-Drop Reordering

Interactive dual view (Cards 🗂️ vs Timeline ⏱️) with concrete time-slot scheduling (09:00 AM – 10:15 AM), drag handles ⋮⋮, and live sequential transit recalculations.

📸

4-Tier Real Photography Cascade

Zero-auth image pipeline: Wikipedia REST Summary → Wikipedia OpenSearch → Generator PageImages → Wikimedia Commons direct search, ensuring 100% verified real landmark photos.

🧠

Fine-Tuned Local LoRA Narration (Llama 3.2)

Custom atmospheric travel narration model fine-tuned on Llama 3.2 3B Instruct via Unsloth/PEFT with GGUF export and zero-latency local Ollama inference fallback.

📄

Playwright PDF & iCalendar Export

Headless Playwright PDF brochure generation with Google Fonts & hero covers, RFC 5545 .ics calendar sync, and public shareable /trip/[slug] routes.

🎒

Smart Packing Checklist & Weather

Activity- and climate-aware packing checklist generator with interactive checkboxes, live Open-Meteo forecasts, and Google Maps turn-by-turn navigation deep links.

📸 Chronological System Walkthrough

Follow the multi-agent travel planning journey from initial landing and preference intake to real-time agent reasoning and final interactive map generation.

📐 Log-Normalized Hidden Gem Scoring

hidden_gem_score = clamp(
    (min(mention_count, 20) / 20) * ((avg_sentiment + 1) / 2)   # Niche community signal
  + (0.2 if source_diversity >= 2 else 0)                        # Cross-platform bonus (Reddit + Tavily)
  - log(review_count + 1) / log(max_review_count + 1),          # Log-normalized popularity penalty
  min=0.0, max=1.0
)
  • Log-normalization prevents 10k vs 50k reviews from looking equally "popular".
  • Source diversity bonus rewards spots mentioned independently on multiple platforms (Reddit threads + local food blogs).
  • Sentiment weighting prioritizes enthusiastic recommendations over casual passing mentions (7/7 unit tests passing).

🏗️ Multi-Agent Architecture (LangGraph)

💬 Intake Agent Groq + Gemini Clarifications
→
🔍 Ranker Agent OTM + Reddit Niche Scraper
→
📍 Planner Agent K-means++ Clustering
→
🔄 Editor Agent Multi-Turn State Patching
→
🗺️ Next.js 16 UI Leaflet Map + SSE Stream

LangGraph Multi-Agent Backend

  • intake_agent.py — Extracts destination, dates, budget; invokes dynamic clarifying questions
  • ranker_agent.py — Concurrently pulls OpenTripMap POIs and Reddit/Tavily community gems, blending by niche weight
  • planner_agent.py — Performs K-means++ clustering (k = num_days), assigns day themes, and attaches Open-Meteo weather
  • editor_agent.py — Handles user adjustments (swap, remove, adjust pace) and updates itinerary state with SQLite checkpoints
  • ollama_narrator.py — Connects to local LoRA fine-tuned Llama 3.2 3B model for atmospheric, non-cliché stop descriptions

Frontend Visuals & Production Services

  • Next.js 16 (React 19) — Nocturnal Voyager glassmorphic design system with Aurora animated background mesh
  • MapView.tsx — Leaflet interactive map with CartoDB Dark Matter tiles, marker popups, and route polylines
  • pdf_generator.py — Headless Playwright service rendering print-ready multi-page travel brochures
  • history_store.py — SQLite trip database with dual-layer auto-saving and slide-over history drawer
  • currency.ts — Smart currency engine rendering ₹ INR for Indian destinations and $ USD internationally

🛠️ Comprehensive Tech Stack

Orchestration & Backend

LangGraph StateGraph, FastAPI (async), SQLite checkpoints, Pydantic v2 schemas, Python 3.12.

Frontend & Maps

Next.js 16 App Router, TypeScript, React 19, Leaflet, CartoDB Dark Matter, HTML5 Canvas live wallpaper.

LLMs & Model Routing

Gemini 3.5 Flash (themes & narrations), Groq Qwen 3.6 27B (fast slot-filling), Fine-Tuned Llama 3.2 3B (LoRA / Ollama).

Data & Vector Storage

ChromaDB embedded vector store (v7 cache), OpenTripMap, Nominatim, Reddit JSON API, Tavily, VADER.