A Multi-Agent Collaborative Travel Planning Platform Based on the HelloAgents Framework
![]()
🇨🇳 中文 | 🇺🇸 English | 🇯🇵 日本語
[!IMPORTANT]
You can try the project directly online. For the full experience, you can deploy it locally. Due to risk control, the online trial does not connect to Xiaohongshu (RED): TripStar - AI Travel Agent
Features include: Travel Plans, Attraction Maps Overview, Budget Details, Daily Itinerary: Itinerary Description, Transportation, Accommodation Recommendations, Attraction Scheduling (address, duration, description, reservation reminders), Dining Plans, Weather Information, Knowledge Graph Visualization, Immersive AI Q&A Companion...
TripStar is an innovative AI travel agent application, a multi-agent collaborative travel planning platform based on the HelloAgents framework, designed to solve the "information overload" and "decision fatigue" users face when planning trips.
Unlike traditional travel guide websites, this project adopts an innovative model based on Large Language Models (LLM) and Multi-Agent collaboration. Like an experienced human travel butler, it comprehensively considers users' personalized needs (preferences: transportation, accommodation style, travel interests, special requests, etc.), automatically searching for travel info, checking local weather, curating hotels, and planning optimal attraction routes to quickly generate a travel itinerary.
For example, if you want to travel to USA-NewYork, simply fill in the destination, dates, and preferences, wait for the itinerary planning results, and preview how to arrange your tour at a glance.
![]()
The project uses a standard decoupled frontend-backend architecture, divided into the Vue frontend interaction layer, FastAPI backend service layer, and the LLM/Agents intelligent inference layer.
To solve the 504 Gateway Timeout issue caused by long-duration LLM inference, the backend routing mechanism was refactored:
POST /api/trip/plan: Instantly returns a task_id, pushing the multi-minute inference task into the background via asyncio.create_task.GET /api/trip/status/{task_id}: The frontend makes lightweight polling requests every 3 seconds to get the real-time processing progress (e.g., "🔍 Searching for attractions...") until the status hits completed.Upon receiving natural language instructions, the Main Agent breaks down the task using ReAct:
/api/poi/photo endpoint for each attraction. The backend then searches for the newest posts on Xiaohongshu based on the attraction name, scraping the direct link of the first image via SSR, ensuring an authentic real-life snapshot.The frontend renders dynamic Vue structures recursively by reading JSON data:
.env / the Docker root .env as VITE_AMAP_SECURITY_JS_CODE; Vite replaces the placeholder in index.html during frontend dev/build. Do not hard-code the real secret directly in index.html. If using Google Maps, you must enable: Geocoding API, Places API (New), Directions API, Maps JavaScript API, and Weather API in Google Cloud Console, and an active billing account is strictly required.uv package managerIt is highly recommended to start the project (both frontend and backend) via docker-compose. Copy the root config template first and fill your .env variables before starting:
cp .env.example .envbackend/.env file during container startup. All config is passed via environments setup.docker-compose.yaml explicitly maps essential proxies and API keys, supporting variables like GOOGLE_MAPS_API_KEY and GOOGLE_MAPS_PROXY. GOOGLE_MAPS_PROXY is used only by backend Google Maps services; it does not affect LLM, Xiaohongshu, or AMap requests.VITE_AMAP_WEB_JS_KEY and VITE_AMAP_SECURITY_JS_CODE are injected via build.args; rebuild the image after changing them.Root .env example:
LLM_API_KEY=your_api_key
LLM_BASE_URL=https://your-openai-compatible-endpoint/v1
LLM_MODEL_ID=your_model
XHS_COOKIE="a1=xxx; web_session=xxx"
VITE_AMAP_WEB_KEY=your_amap_web_service_key
VITE_AMAP_WEB_JS_KEY=your_amap_web_js_key
VITE_AMAP_SECURITY_JS_CODE=your_amap_security_js_code
GOOGLE_MAPS_API_KEY=
GOOGLE_MAPS_PROXY=One-Click Start Command:
# Build and run containers in background
docker-compose up -d --build
# Follow service logs
docker-compose logs -fFor local development, follow the distinct environment configurations below.
# Navigate to backend directory
cd backend
# Install Node.js dependencies for Xiaohongshu signature engine
npm install
# Create virtual environment with uv
uv venv .venv
# Activate virtual environment
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install project dependencies
uv pip install -r requirements.txt
# Copy config and fill your API KEYs
cp .env.example .env
# [Required] LLM_API_KEY, LLM_BASE_URL, LLM_MODEL_ID (pick a model good at JSON struct)
# [Required] VITE_AMAP_WEB_KEY (AMap Web Service Key for backend REST services)
# [Required] XHS_COOKIE
# [Optional] GOOGLE_MAPS_API_KEY, GOOGLE_MAPS_PROXY
# GOOGLE_MAPS_PROXY applies only to backend Google Maps services.
# Start FastAPI (Uvicorn recommended)
uvicorn app.api.main:app --host 0.0.0.0 --port 8000 --reloadOnce the API is live, visit http://localhost:8000/docs to test Interactive Swagger integrations.
# Navigate to frontend directory
cd frontend
# Install dependencies (npm/pnpm/yarn)
npm install
# Copy config and fill your Keys
cp .env.example .env
# [Required] VITE_AMAP_WEB_JS_KEY
# [Required] VITE_AMAP_SECURITY_JS_CODE
# [Optional] VITE_API_BASE_URL defaults to http://localhost:8000; leave empty for same-origin deployment.
# Run Vite dev server
npm run devTripStar/
├── backend/ # Python FastAPI Backend
│ ├── app/
│ │ ├── api/routes/ # Core routing (trip.py, poi.py, chat.py)
│ │ ├── agents/ # Agent definitions (trip_planner_agent.py)
│ │ ├── services/ # Business logic layers
│ │ │ ├── xhs_service.py # RED Parsing/SSR/LLM
│ │ │ ├── llm_service.py # Base LLM Wrapper
│ │ │ └── knowledge_graph_service.py # KG formatting
│ │ └── models/ # Pydantic Schemas
│ └── .env # Local Env
│
├── frontend/ # Vue 3 Frontend UI
│ ├── src/
│ │ ├── views/ # Views (Home.vue; Result.vue)
│ │ ├── components/ # UI components
│ │ └── services/ # Async polling & retries
│ ├── index.html # Index entry & AMap Security JSCode placeholder
│ ├── .env # Frontend Local Env
│ └── package.json
│
├── Dockerfile # Generic Prod Docker
├── docker-compose.yaml # Single-node Compose Setup
└── README_en.mdBelow are some of the operation results, exploring rich functions...
![]()
Thanks to the linux.do community for communication and feedback, making TripStar iterate more efficiently.