Built during Wingie / Enuygun Wegathon 2025
An intelligent travel planning system that generates personalized, day-by-day itineraries using multi-agent orchestration powered by LangChain, LangGraph, and Enuygun MCP (Model Context Protocol).
Cokuygun is an AI-driven travel planner that creates optimized, preference-aware multi-day itineraries. The system combines:
- LangChain/LangGraph agents for intelligent orchestration and reasoning
- Enuygun MCP for real-time travel data (flights, hotels, activities, weather)
- Rule-based solver for constraint satisfaction and optimization
- React frontend with modern, responsive UI for seamless user experience
The platform was developed during the Wingie / Enuygun Wegathon 2025 hackathon, and this repository contains the final form of the project.
- Multi-Day Itinerary Generation: Create detailed day-by-day plans with activities, timing, and logistics
- Intelligent Orchestration: LangChain-powered agents coordinate flight search, hotel selection, activity recommendations, and weather forecasting
- Real-Time Data via MCP: Fetch live flight prices, availability, weather forecasts, and points of interest through standardized MCP tools
- Preference-Aware Planning: Budget levels (LOW/MID/HIGH/LUXURY), travel styles (relaxed/balanced/packed), interests, dietary restrictions, mobility needs
- Revision & Day-End Feedback: Modify plans on-the-fly; adjust next day's intensity based on traveler feedback (tired / normal / energetic)
- Bilingual Support: Turkish and English UI with i18n
- Timeline Awareness: Handles flight check-in, boarding, airport transfers, and transit buffers automatically
┌─────────────────────────────────────────────────────────────────────┐
│ User Interface │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ Frontend (React + TypeScript + Tailwind + shadcn-ui) │ │
│ │ • Trip form (city, dates, preferences) │ │
│ │ • Generated plan display (markdown + interactive UI) │ │
│ │ • Revision interface │ │
│ │ • Day-end survey (feedback collection) │ │
│ └───────────────────────────────────────────────────────────────┘ │
└──────────────────────────┬───────────────────────────────────────────┘
│ HTTP/REST
▼
┌─────────────────────────────────────────────────────────────────────┐
│ API Layer (Node + Fastify) │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ Routes: │ │
│ │ • POST /api/plan/generate → orchestrate new plan │ │
│ │ • POST /api/plan/revise → modify existing plan │ │
│ │ • POST /api/survey/dayEnd → process feedback │ │
│ │ • GET /api/profile → user preferences │ │
│ └───────────────────────────────────────────────────────────────┘ │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ Services: │ │
│ │ • planner.ts → rule-based plan builder │ │
│ │ • mcpBridge.ts → MCP client wrapper │ │
│ │ • mcpClient.remote.ts → remote MCP connection │ │
│ └───────────────────────────────────────────────────────────────┘ │
└──────────────────────────┬───────────────────────────────────────────┘
│ spawn Python subprocess / HTTP
▼
┌─────────────────────────────────────────────────────────────────────┐
│ Python Agents (LangChain + LangGraph) │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ travel_agent.py (Master Orchestrator) │ │
│ │ • Coordinates all satellite agents │ │
│ │ • Generates/revises/day-end plans │ │
│ │ • OpenAI GPT-4o-mini for reasoning │ │
│ │ • Context squeezing (≤4k tokens input, ≤1.2k output) │ │
│ │ • PII masking for logs │ │
│ └───────────────────────────────────────────────────────────────┘ │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ Satellite Agents: │ │
│ │ • flight_agent.py → flight search + MCP integration │ │
│ │ • hotel_agent.py → hotel/stays recommendations │ │
│ │ • activities_agent.py → POI and activity suggestions │ │
│ │ • bus_agent.py → ground transportation │ │
│ │ • master_agent.py → user profile integration │ │
│ └───────────────────────────────────────────────────────────────┘ │
└──────────────────────────┬───────────────────────────────────────────┘
│ HTTP (MCP JSON-RPC)
▼
┌─────────────────────────────────────────────────────────────────────┐
│ MCP Server (Node + Express + stdio bridge) │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ HTTP Server (http-server.ts) │ │
│ │ • POST /tools/search_flights │ │
│ │ • POST /tools/search_stays │ │
│ │ • POST /tools/search_activities │ │
│ │ • POST /tools/weather │ │
│ │ • POST /tools/search_ground_transport │ │
│ │ • POST /tools/maps_search, /tools/get_route │ │
│ └───────────────────────────────────────────────────────────────┘ │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ MCP Server (server.ts – stdio mode) │ │
│ │ • Tool definitions and JSON-RPC handlers │ │
│ │ • Integrates with real Enuygun APIs or mock data │ │
│ └───────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘
- User Input: User fills out trip form (city, dates, preferences) in the React frontend
- API Request: Frontend calls
POST /api/plan/generatewith trip parameters - Python Orchestrator: API spawns
travel_agent.py(or calls it via subprocess/HTTP) - Agent Coordination:
travel_agent.pyorchestrates satellite agents:flight_agent.py→ calls MCP/tools/search_flightsactivities_agent.py→ calls MCP/tools/search_activities- Weather, hotels, ground transport similarly fetched via MCP
- LLM Reasoning: Master orchestrator uses OpenAI GPT-4 to synthesize data into a coherent, preference-aware plan
- Plan Generation: Output is markdown + JSON (days, slots, timing, costs)
- Return to Frontend: API returns structured plan; frontend renders markdown and interactive UI
- React 18 + TypeScript
- Vite (build tool)
- Tailwind CSS + shadcn-ui (component library)
- React Router (navigation)
- Recharts (optional charts/graphs)
- i18n (Turkish/English support)
- Node.js 18+ + TypeScript
- Fastify (web framework)
- Zod (schema validation)
- pnpm workspace (monorepo structure)
- Shared packages:
@trip/shared(schemas/enums),@trip/solver(constraint solver)
- Node.js + TypeScript
- Express (HTTP wrapper)
- @modelcontextprotocol/sdk (MCP protocol)
- stdio transport (MCP server runs in stdio mode, wrapped by HTTP bridge)
- Python 3.10+
- LangChain + LangGraph (agent orchestration)
- langchain-openai (OpenAI GPT-4 integration)
- httpx (async HTTP client for MCP calls)
- python-dotenv (environment management)
The main orchestrator that:
- Coordinates all satellite agents (flight, hotel, activities, weather, bus)
- Synthesizes multi-source data into a unified day-by-day plan
- Uses LangChain ChatOpenAI for LLM calls
- Implements context squeezing (≤4k prompt tokens, ≤1.2k output tokens)
- Supports three modes:
- generate: Create new plan from scratch
- revise: Modify existing plan (for example, flight delay or preference change)
- day_end: Adjust next day's tempo based on feedback (tired, normal, or energetic)
- Outputs markdown plan plus machine-readable JSON (
<APPEND_JSON>block)
| Agent | Purpose | MCP Tool(s) Used |
|---|---|---|
flight_agent.py |
Flight search and selection | search_flights |
hotel_agent.py |
Hotel/stay recommendations | search_stays |
activities_agent.py |
Points of interest, tours, museums | search_activities |
bus_agent.py |
Ground transportation (bus, train, transfer) | search_ground_transport |
master_agent.py |
User profile integration, preferences | (API calls, not MCP) |
- LangChain: Used for LLM abstraction (
ChatOpenAI), message formatting, and prompt engineering - LangGraph: Originally used for workflow/state machine orchestration (for example,
workflow.py) - Agentic Patterns: Tool calling, context management, retry logic, structured output parsing
Model Context Protocol (MCP) is used to provide real-time travel data to the agents.
- HTTP Bridge:
http-server.tsexposes MCP tools as REST endpoints (for example,POST /tools/search_flights) - MCP Server:
server.tsruns in stdio mode, handles JSON-RPC requests - Tools: Defined in
tools/directory:flights.ts– flight searchstays.ts– hotel searchactivities.ts– activity searchweather.ts– weather forecastground.ts– bus/train/transfer searchmaps.ts– map search, route calculation
This project was developed during Wingie / Enuygun Wegathon 2025, a hackathon focused on innovative travel tech solutions.
- LangChain & LangGraph: For building intelligent, orchestrated AI agents
- Model Context Protocol (MCP): For standardized, tool-based data access
- Enuygun MCP: For real travel data APIs (flights, hotels, activities)
- Tuğrap Efe Dikpınar
- Ahmet Mert Tezcan
- Alperen Sari
- Special thanks to Wingie / Enuygun for hosting the hackathon
bizce cokuygun