{"repo":"phoenix-zhou/multi-agent","free":true,"listed":false,"github":"https://github.com/phoenix-zhou/multi-agent","clone":"git clone https://github.com/phoenix-zhou/multi-agent.git","description":"A multi-agent travel assistant system built using the **Agent2Agent (A2A)** protocol and **MCP (Model Context Protocol)**","language":"Python","stars":50,"topics":[],"license":null,"category":"ai-agents","readme_excerpt":"🤖 基于 A2A 协议的旅行智能助手 一个采用 Agent2Agent (A2A) 协议 + MCP (Model Context Protocol) 构建的多智能体旅行助手系统。系统通过总控中心进行意图识别与路由，由多个专业 Agent 协作完成 天气查询、票务查询、票务预定、景点推荐 等服务，支持 CLI 与 Streamlit Web 两种交互方式。 ✨ 功能特性 - 🧭 智能意图识别 ：基于大语言模型（LLM）对用户输入进行意图识别，支持多意图组合（如\"明天天气怎么样？顺便查一下去西安的机票\"） - 🌤️ 天气查询 ：基于真实天气数据，支持自然语言查询（城市 + 日期/相对时间词） - 🚄 票务查询 ：火车票 / 机票 / 演唱会门票查询，支持票价、余票、车次等信息 - 🎫 票务预定 ：Agent 之间协作完成预定流程（先查余票 → 再执行预定） - 🏞️ 景点推荐 ：直接由 LLM 生成个性化的景点推荐（AIGC） - 🔄 多轮对话 ：支持上下文记忆，自动对残缺查询进行改写补全 - 🧩 A2A 协议 ：Agent 之间通过标准 A2A 协议通信，自带 AgentCard 名片与技能声明 - 🛠️ MCP 标准化 ：数据访问能力以 MCP 工具形式暴露，与 Agent 解耦 - 💬 双交互界面 ：CLI 命令行版 + Streamlit Web 聊天界面 🏗️ 系统架构 处理流程 端口规划 服务 组件 端口 ------ ------ ------ A2A Agent WeatherQueryAssistant（天气查询） 5005 A2A Agent TicketQueryAssistant（票务查询） 5006 A2A Agent TicketOrderAssistant（票务预定） 5007 MCP Server WeatherTools（天气工具） 8002 MCP Server TicketTools（票务工具） 8001 MCP Server OrderTools（预定工具） 8003 Web UI Streamlit 应用 8501（默认） 📁 目录结构 🛠️ 技术栈 - Agent 协议 ：A2A（ python a2a ） - 工具协议 ：MCP（ mcp / FastMCP / langchain-mcp-adapters ） - 大语言模型 ：LangChain（ langchain-openai ），通过 SiliconFlow 接入 Qwen2.5-72B-Instruct（可替换任意 OpenAI 兼容接口） - Web 界面 ：Streamlit - 数据库 ：MySQL（ mysql-connector-python ） - 数据源 ：和风天气 API（30 天预报） 🚀 快速开始 1. 环境准备 2. 初始化数据库 如需导入真实天气数据，运行 python utils/spider weather.py （需配置和风天气 API Key）。 3. 修改配置 编辑 config.py ，配置你的 LLM 与数据库信息： 4. 启动服务（按顺序） 💬 使用示例 CLI 版输入 cards 可查看所有 Agent 的卡片信息（技能/描述/地址），输入 quit 退出。 🔑 核心设计说明 1. 意图识别与查询改写 （ main prompts.py ）：总控中心将用户输入收敛为 weather / flight / train / concert / order / attract","default_branch":null,"files":null,"tree":[],"storefront":"/r/phoenix-zhou","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/phoenix-zhou/multi-agent/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}