TripStar is a multi-agent travel planning system built on Spring Boot 4 and Spring AI Alibaba, combining XiaoHongShu (Little Red Book) content, Amap POI/weather/hotel data, and a StateGraph workflow to generate complete itineraries with maps, budgets, and knowledge graphs.

Stars

48

7-day growth

No data

Forks

10

Open issues

0

License

GPL-2.0

Last updated

2026-07-20

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It demonstrates a practical multi-agent architecture with observable workflows, real data integration from Chinese platforms (XiaoHongShu and Amap), and supports two distinct planning modes—autonomous and note-following—making it a rare open-source example of Spring AI Alibaba's StateGraph in action.

Who it is for

  • Java backend developers interested in Spring AI and multi-agent systems
  • Travel tech enthusiasts building AI-powered itinerary planners
  • Developers exploring production-grade agent orchestration with real APIs
  • Chinese language users who want to automate travel planning from XiaoHongShu notes

Use cases

  • Automatically generate a multi-day travel itinerary for a destination with preferences
  • Extract and enrich travel tips from specific XiaoHongShu posts into a structured plan
  • Demonstrate how to build and monitor an agentic workflow using StateGraph and WebSocket progress
  • Integrate Amap services (POI, weather, hotels, restaurants) into an AI-driven pipeline

Strengths

  • Dual planning modes (autonomous and note-based) with strict validation
  • End-to-end real data pipeline using XiaoHongShu and Amap APIs, no simulated data
  • Observable agent workflow with WebSocket real-time progress and detailed AI trace logs
  • Well-modularized Spring Boot project with clear separation of agent roles and DTO contracts

Considerations

  • Requires multiple external API keys and a XiaoHongShu cookie, which may be fragile due to platform changes
  • LLM-generated itineraries should be verified manually for accurate business hours, prices, and weather
  • The project uses Spring Boot 4.0.7 and Spring AI Alibaba 2.0.0-M1.1, which are early milestone releases and might have instability

README quick start

TripStar 基于 Spring Boot 4 与 Spring AI Alibaba 的多智能体旅行规划系统

TripStar 是一个前后端分离的 AI 旅行规划项目。系统使用多 Agent 协作理解用户需求,读取小红书旅行内容,查询高德 POI、天气、酒店与餐饮,并生成包含每日路线、地图、景点图片、预算和知识图谱的完整攻略。

项目预览

双模式规划入口

  行程概览
  
    
  


  每日行程
  
    
  




  景点地图与真实路线
  
    
  


  预算明细
  
    
  

核心能力

1. 自主规划

输入目的地、日期、交通方式、住宿偏好和自然语言要求,系统按以下顺序执行:

  1. 小红书搜索 Agent 查找真实旅行笔记。
  2. 小红书详情 Agent 读取正文并提炼景点、避坑和预约信息。
  3. 高德 POI Agent 校准名称、地址和经纬度。
  4. 天气 Agent 查询旅行天气。
  5. 酒店餐饮 Agent 查询住宿与三餐候选。
  6. Planner Agent 生成每日行程和预算。
  7. Review Agent 检查结构与明显数据矛盾。

2. 指定笔记规划

用户可以输入一个或多个小红书长链接、短链、App 分享内容,或者直接粘贴攻略正文。系统会:

  1. 解析公开笔记正文和全部图片。
  2. 使用多模态模型识别图片中的 Day01、Day02、路线、酒店、餐厅和交通信息。
  3. 按笔记原始顺序保留全部景点,不套用自主规划的每日数量限制。
  4. 使用高德 Service 逐项补全 POI、地址、坐标、评分与图片。
  5. 仅在笔记缺少酒店或餐饮时调用补充 Agent。
  6. 使用独立 Planner 与 Review Prompt 生成并检查最终攻略。
  7. Java 严格校验笔记景点是否全部进入最终行程,缺失时直接列出名称并终止任务。

3. 可观测的 Agent 工作流

  • Spring AI Alibaba StateGraph 控制自主规划研究阶段的执行顺序和条件边。
  • ReactAgent 负责阶段内的工具调用与参数决策。
  • 每个 Agent 使用职责明确的小型 DTO,不共享包含大量无关字段的通用输出对象。
  • Spring AI BeanOutputConverter 将模型 JSON 转换为 Java Record。
  • 系统提示词、用户提示词、工具列表和模型原始输出写入 AI Trace 文件。
  • WebSocket 实时推送当前阶段、进度和错误信息。

4. 真实数据链路

  • 小红书支持 servicetoolboth 三种运行模式。
  • 高德提供地理编码、POI、天气、酒店、餐饮和图片数据。
  • 餐饮与酒店查询使用高德类型过滤,避免景区或商场进入错误数据类别。
  • 未配置密钥、Cookie 或工具调用失败时明确报错,不返回模拟数据。

系统架构

flowchart LR
    WEB[TripStar Frontend] --> API[Spring Boot API]
    API --> TASK[TripTaskService]

    TASK --> AUTO[自主规划 Workflow]
    TASK --> NOTE[指定笔记 Workflow]

    AUTO --> XHS[XHS Search / Detail Agents]
    XHS --> GRAPH[Spring AI Alibaba StateGraph]
    GRAPH --> AMAP[AMap POI / Weather / Hotel Agents]

    NOTE --> READER[Note Reader + Image Downloader]
    READER --> VISION[Multimodal Understanding Agent]
    VISION --> POI[POI Enrichment Service]
    POI --> SUPPLEMENT[Weather + Conditional Hotel/Food Agents]

    AMAP --> PLANNER[Planner Agent]
    SUPPLEMENT --> PLANNER
    PLANNER --> REVIEW[Review Agent]
    REVIEW --> RESULT[Trip

Description

TripStar Java 实现版:基于 Spring Boot 4 + Spring AI Alibaba ReactAgent 的 AI 旅行规划后端,支持高德 Tool、小红书内容接入和 Structured Output。

Related repositories

Similar projects matched by category, topics, and programming language.

7-e1even
Featured
7-e1even GitHub avatar

learn-agent

A collection of notes on building coding agents, derived from the production development of the desktop agent Reina, with each mechanism simplified into a zero-dependency, single-file Node.js demo.

AI & Machine LearningLarge Language Models
218
powerycy
Featured
powerycy GitHub avatar

goutoujunshi

An AI relationship coach that provides emotional support, relationship science, and actionable strategies through a multidisciplinary knowledge base.

Python
1,174
makecindy
Featured
makecindy GitHub avatar

cindy

Cindy is an open-source AI agent that runs locally on your machine, integrates multiple AI harnesses and models, and provides memory, skills, and automation to perform real work in your projects and apps.

AI & Machine LearningLarge Language Models
958