Cokuygun
Enuygun MCP ve Yapay Zeka AjanlarΔ± kullanΔ±larak geliΕtirilen kiΕisel seyahat planlayΔ±cΔ±sΔ± (uΓ§uΕ, otel, aktivite, hava durumu, ulaΕΔ±m). Wegathon 2025 team orbit
Ask AI about Cokuygun
Powered by Claude Β· Grounded in docs
I know everything about Cokuygun. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Cokuygun β AI-Powered Travel Planner
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).
Overview
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.
Key Features
- 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
Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 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 β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Data Flow
- 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
Tech Stack
Frontend
- React 18 + TypeScript
- Vite (build tool)
- Tailwind CSS + shadcn-ui (component library)
- React Router (navigation)
- Recharts (optional charts/graphs)
- i18n (Turkish/English support)
Backend (API)
- Node.js 18+ + TypeScript
- Fastify (web framework)
- Zod (schema validation)
- pnpm workspace (monorepo structure)
- Shared packages:
@trip/shared(schemas/enums),@trip/solver(constraint solver)
MCP Server
- Node.js + TypeScript
- Express (HTTP wrapper)
- @modelcontextprotocol/sdk (MCP protocol)
- stdio transport (MCP server runs in stdio mode, wrapped by HTTP bridge)
Agents (Python)
- Python 3.10+
- LangChain + LangGraph (agent orchestration)
- langchain-openai (OpenAI GPT-4 integration)
- httpx (async HTTP client for MCP calls)
- python-dotenv (environment management)
Agents and Orchestrator
Master Orchestrator: travel_agent.py
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)
Satellite Agents
| 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 & LangGraph Usage
- 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
MCP Integration
Model Context Protocol (MCP) is used to provide real-time travel data to the agents.
MCP Server (backend/apps/mcp)
- 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
Acknowledgements
This project was developed during Wingie / Enuygun Wegathon 2025, a hackathon focused on innovative travel tech solutions.
Key Technologies
- 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)
Contributors (team orbit)
- TuΔrap Efe DikpΔ±nar
- Ahmet Mert Tezcan
- Alperen Sari
- Special thanks to Wingie / Enuygun for hosting the hackathon
Contact
bizce cokuygun
