1sdv/TripStar
旅途星辰 (TripStar)是一个创新的 AI 文旅智能体应用,旨在解决用户在规划旅行时面临的各种问题,为提供一站式旅游攻略而生。
TripStar – AI‑powered travel planning assistant
What it does
- TripStar is a web application that builds complete travel itineraries for a user‑specified trip (cities, dates, preferences). It pulls data from real‑world sources (Xiaohongshu travel posts, weather services, hotel listings, map APIs) and uses a large language model (LLM) together with a set of specialized agents to turn that raw data into a structured travel plan.
How it works
- Front‑end (Vue 3) – A form lets users enter destination, travel dates and personal preferences (transport mode, accommodation style, interests, etc.). The UI shows progress via WebSocket updates and, once the plan is ready, displays:
- Day‑by‑day schedule with attractions, travel routes, hotel suggestions, meals, and weather forecasts.
- Budget breakdown (tickets, food, transport, accommodation).
- Interactive maps (Google Maps for overseas, AMap for China) with routes drawn between points.
- A knowledge‑graph visualisation of the itinerary.
- A floating AI chat window that can answer follow‑up questions using the full itinerary as context.
- Back‑end (FastAPI, Python 3.10+) – The request
/api/trip/planstarts an asynchronous task and returns atask_id. A background worker runs a multi‑agent workflow:- Xiaohongshu Agent searches Xiaohongshu (a Chinese social platform) for travel posts, scrapes the content, and asks the LLM to extract a JSON list of attractions, their typical visit duration, and whether they need advance reservation.
- Weather Agent fetches forecast data via Google or AMap weather APIs.
- Hotel Agent queries POI services for hotels that match the budget and style.
- The Planner Agent combines all pieces, builds an optimal route (avoiding back‑tracking), and asks the LLM to output a detailed itinerary plus a budget in a strict JSON format.
- The result is parsed, cleaned, and fed into a knowledge‑graph service that creates nodes/edges for cities, days, attractions, and costs.
- Data enrichment – After the itinerary is generated, the front‑end requests photos for each attraction. The back‑end again calls Xiaohongshu, grabs the first image from a recent post, and returns a direct URL so the UI shows real‑world photos.
Key technical highlights
- Multi‑agent architecture built on the HelloAgents framework, with clear role separation (attraction extraction, weather, hotels, routing).
- LLM‑driven extraction: long, unstructured travel notes are distilled into clean JSON by prompting the model.
- Dual map engine: automatic fallback between Google Maps (outside China) and AMap (inside China) for geocoding, routing and map rendering.
- Async task queue + WebSocket progress updates to avoid 504 gateway timeouts during long LLM calls.
- Internationalisation: UI and LLM prompts support Chinese, English and Japanese; generated itineraries are automatically translated.
- Budget panel and knowledge‑graph visualisation give users a financial overview and a network view of their trip.
- Docker‑compose deployment with environment‑variable configuration for LLM API keys, map service keys, and Xiaohongshu cookies.
Who might use it
- Travelers who want a personalized, end‑to‑end itinerary without manually browsing multiple sites.
- Developers interested in building multi‑agent LLM applications that combine web‑scraping, structured data extraction, and real‑time UI updates.
Getting started
- Install Python 3.10+, Node 18+, and Docker (optional).
- Provide API keys for an OpenAI‑compatible LLM, Google Maps, AMap, and a logged‑in Xiaohongshu cookie.
- Run the backend (
uvicorn app.api.main:app) and the Vue front‑end (npm run dev) or launch both viadocker‑compose up. - Open the web UI, fill in the trip details, and watch the system generate a complete plan.
Bottom line: TripStar is a full‑stack, multi‑agent AI system that turns raw travel data into a polished, budget‑aware itinerary, complete with maps, photos, and an interactive AI assistant.
Related
- Project
- Project
- Project
- Project
- Project