{"id":51459586,"url":"https://github.com/vectorleap-pulse/travel-planner-agent","last_synced_at":"2026-07-06T04:01:48.221Z","repository":{"id":357910415,"uuid":"1238877841","full_name":"vectorleap-pulse/travel-planner-agent","owner":"vectorleap-pulse","description":"Multi-agent travel planning tool with real-time streaming output. Built as a portfolio project to showcase agentic AI, SSE streaming, parallel tool use, and rich UI. Five agents research in parallel and synthesise a complete trip package.","archived":false,"fork":false,"pushed_at":"2026-05-14T20:04:38.000Z","size":3391,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-14T20:45:46.071Z","etag":null,"topics":["agentic-ai","fastapi","full-stack","fullstack","multi-agent-systems","nextjs","reactjs","sse"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vectorleap-pulse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-14T14:39:29.000Z","updated_at":"2026-05-14T20:04:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vectorleap-pulse/travel-planner-agent","commit_stats":null,"previous_names":["vectorleap-pulse/travel-planner-agent"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/vectorleap-pulse/travel-planner-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorleap-pulse%2Ftravel-planner-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorleap-pulse%2Ftravel-planner-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorleap-pulse%2Ftravel-planner-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorleap-pulse%2Ftravel-planner-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vectorleap-pulse","download_url":"https://codeload.github.com/vectorleap-pulse/travel-planner-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorleap-pulse%2Ftravel-planner-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35177220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","fastapi","full-stack","fullstack","multi-agent-systems","nextjs","reactjs","sse"],"created_at":"2026-07-06T04:01:45.188Z","updated_at":"2026-07-06T04:01:48.176Z","avatar_url":"https://github.com/vectorleap-pulse.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Waypoint - AI Travel Planner\n\nA multi-agent AI travel planning tool that streams a complete trip package in real time. Five specialised agents run in parallel and synthesise destination research, flights, hotels, weather, and a day-by-day itinerary - all visible live in the browser as they work.\n\nBuilt as a portfolio project to demonstrate agentic AI architecture, SSE streaming, parallel tool use, and a polished editorial UI.\n\n---\n\n## Demo\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/running.png\" width=\"49%\" alt=\"Five agents streaming in parallel\" /\u003e\n  \u0026nbsp;\n  \u003cimg src=\"images/ending.png\" width=\"49%\" alt=\"Completed itinerary with day cards\" /\u003e\n\u003c/p\u003e\n\n---\n\n## How It Works\n\nThe user fills in a trip form (destination, origin, dates, budget, travel style). On submit:\n\n1. **Four agents start in parallel** - each researches one dimension of the trip.\n2. **Results stream to the browser in real time** via Server-Sent Events.\n3. **Itinerary agent runs after all four complete** - synthesises everything into a structured day-by-day plan.\n4. **The map updates** - clicking a day card geocodes the day's activity locations and draws an animated curved route between them.\n\n| Agent                 | What it does                                    | API used                  |\n| --------------------- | ----------------------------------------------- | ------------------------- |\n| `destination_agent` | Top attractions, neighbourhoods, local tips     | Tavily web search         |\n| `flight_agent`      | Routes, price ranges, booking advice            | Tavily web search         |\n| `hotel_agent`       | Accommodation options matched to budget + style | Tavily web search         |\n| `weather_agent`     | Forecast for travel dates + packing advice      | Open-Meteo (free, no key) |\n| `itinerary_agent`   | Day-by-day plan synthesising all agent outputs  | GPT-4o-mini               |\n\n---\n\n## Stack\n\n**Frontend** - Next.js 15 (App Router) · Turbopack · Tailwind CSS v4 · shadcn/ui · Zustand · Framer Motion · Leaflet\n\n**Backend** - FastAPI · Uvicorn · OpenAI SDK · SSE-Starlette · Pydantic v2 · httpx · Loguru\n\n**External APIs** - Tavily · Open-Meteo · ExchangeRate-API · Nominatim (geocoding, proxied via backend)\n\n---\n\n## Project Structure\n\n```\n.\n├── backend/\n│   ├── agents/\n│   │   ├── destination_agent.py\n│   │   ├── flight_agent.py\n│   │   ├── hotel_agent.py\n│   │   ├── weather_agent.py\n│   │   └── itinerary_agent.py\n│   ├── core/\n│   │   ├── orchestrator.py     # asyncio.gather for parallel agents\n│   │   ├── streaming.py        # SSE formatter\n│   │   ├── job_store.py        # in-memory job registry\n│   │   └── tools.py            # Tavily, Open-Meteo, currency wrappers\n│   ├── schemas/\n│   │   ├── events.py           # AgentEvent (thinking/token/tool_call/complete/done)\n│   │   ├── requests.py         # TripRequest\n│   │   └── responses.py        # TripResult, DayPlan\n│   ├── api/\n│   │   └── routes.py           # POST /plan · GET /stream/:id · GET /result/:id · GET /geocode\n│   └── main.py\n└── frontend/\n    ├── app/\n    │   ├── page.tsx             # Trip input form\n    │   └── trip/[jobId]/\n    │       └── page.tsx         # Live planning dashboard\n    ├── components/\n    │   ├── dashboard/\n    │   │   ├── AgentStatusPanel.tsx\n    │   │   ├── LiveFeedPanel.tsx\n    │   │   ├── MapPanel.tsx\n    │   │   └── ItineraryPanel.tsx\n    │   ├── cards/\n    │   │   ├── AgentCard.tsx\n    │   │   ├── DayCard.tsx\n    │   │   ├── WeatherCard.tsx\n    │   │   ├── FlightCard.tsx\n    │   │   └── HotelCard.tsx\n    │   └── shared/\n    │       ├── StreamingText.tsx\n    │       ├── StatusDot.tsx\n    │       └── AgentBadge.tsx\n    ├── hooks/\n    │   └── useAgentStream.ts    # EventSource + Zustand dispatch\n    ├── store/\n    │   └── tripStore.ts         # Zustand store\n    └── lib/\n        └── api.ts               # startTrip / getResult / geocode\n```\n\n---\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.11+\n- Node.js 18+ with pnpm\n- [uv](https://docs.astral.sh/uv/) (Python package manager)\n\n### API Keys\n\nCreate `backend/.env`:\n\n```env\nOPENAI_API_KEY=sk-...\nTAVILY_API_KEY=tvly-...\nEXCHANGERATE_API_KEY=...        # free at exchangerate-api.com\n```\n\nOpen-Meteo and Nominatim (geocoding) require no keys.\n\n### Backend\n\n```bash\ncd backend\nuv sync\nuv run python -m main\n# → http://localhost:8000\n```\n\n### Frontend\n\n```bash\ncd frontend\npnpm install\npnpm dev\n# → http://localhost:3000\n```\n\n---\n\n## API\n\n```\nPOST /api/plan              TripRequest → { job_id }\nGET  /api/stream/:job_id    SSE stream of AgentEvent\nGET  /api/result/:job_id    → TripResult (available after stream ends)\nGET  /api/geocode?q=...     Nominatim proxy (avoids browser CORS)\n```\n\n### SSE event shape\n\n```json\n{ \"agent\": \"destination\", \"type\": \"token\", \"data\": \"Tokyo is best explored…\" }\n```\n\n`type` is one of: `thinking` · `token` · `tool_call` · `tool_result` · `complete` · `error` · `done`\n\n---\n\n## Key Design Decisions\n\n**Parallel agents via `asyncio.gather`** - the four research agents run concurrently; total wall-clock time is the slowest single agent, not their sum.\n\n**Itinerary agent as synthesiser** - runs only after all four parallel agents emit `complete`, so it has the full context before generating the structured plan.\n\n**Token streaming without re-render thrashing** - `StreamingText` uses React 18's `useDeferredValue` to batch expensive ReactMarkdown re-parses during high-frequency token bursts.\n\n**Geocoding proxied through backend** - Nominatim blocks browser-origin requests; all geocoding goes through `GET /api/geocode` to avoid CORS errors.\n\n**Interactive map with animated routes** - when a day card is selected, the day's activity locations are geocoded and connected with a quadratic bezier arc drawn via SVG `stroke-dashoffset` animation and a custom `\u003cmarker\u003e` arrowhead.\n\n**No Maps SDK** - the map is plain Leaflet with OpenStreetMap tiles; no Google Maps JS bundle cost.\n\n---\n\n## Linting (backend)\n\n```bash\ncd backend\nuv run python lint.py   # ruff check + ruff format + mypy --strict\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectorleap-pulse%2Ftravel-planner-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvectorleap-pulse%2Ftravel-planner-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectorleap-pulse%2Ftravel-planner-agent/lists"}