WhiteTpoison007/FIFA-stadium-nexus-
GitHub: WhiteTpoison007/FIFA-stadium-nexus-
基于 Google ADK 与 MCP 构建的生成式 AI Agent,用于 2026 FIFA 世界杯体育场人群导航、事件管理及无障碍协助。
Stars: 0 | Forks: 0
# 🏟️ 2026 年 FIFA 世界杯 — 体育场入场与球迷导航 (`fifa-stadium-nexus`)
`fifa-stadium-nexus` 是一款高性能、安全且无障碍的 GenAI agent,专为协调 2026 年 FIFA 世界杯的体育场运营和球迷体验而设计。它基于 **Google Agent Development Kit (ADK) 2.0 Graph Workflow API** 构建,并由定制的 **Model Context Protocol (MCP) server** 提供支持,旨在优化人流、报告事件并促进无障碍球迷路线规划。
## 🏗️ 技术架构
```
graph TD
START[User Query] --> SC[Security Checkpoint Node]
SC -->|Passed| CO[Coordinator Node]
SC -->|Blocked| TE[Terminator Node]
CO -->|fan_support| FSA[FanSupportAgent]
CO -->|ops_logistics| OLA[OpsLogisticsAgent]
FSA --> TE
OLA --> TE
TE --> OUT[Formatted Response with ADA/Locale Footer]
subgraph MCP Server
MS[MCP Stdio Server]
MS -.->|lookup_accessibility_facilities| FSA
MS -.->|get_stadium_metrics| FSA & OLA
MS -.->|log_incident| OLA
end
```
## 🛠️ 前置条件
- **Python**:`>= 3.11, < 3.14`(推荐:`3.13`)
- **uv**:已安装的包管理器(`uv --version`)
- **Node.js**:如果配置了 `npx` skills,则需要此环境来启动它们
## 🚀 安装与设置
1. **克隆或打开工作区**:
导航到项目根目录:
cd fifa-stadium-nexus
2. **配置环境变量**:
在根目录下创建一个 `.env` 文件(基于提供的模板):
GOOGLE_API_KEY=your_gemini_api_key
GOOGLE_GENAI_USE_VERTEXAI=False
GEMINI_MODEL=gemini-2.5-flash
GOOGLE_CLOUD_PROJECT=fifa-stadium-nexus-project
GOOGLE_CLOUD_LOCATION=us-east1
3. **安装依赖**:
恢复虚拟环境并同步锁定的 packages:
make install
*(或者直接运行 `uv sync`)*
4. **启动开发 Playground**:
启动基于 Web 的交互式 agent playground:
make playground
*(或者运行 `uv run adk web app --host 127.0.0.1 --port 18081 --reload_agents`)*
在浏览器中打开 [http://127.0.0.1:18081](http://127.0.0.1:18081)。
5. **运行测试**:
运行完整的单元测试和集成测试套件:
make test
*(或者运行 `uv run pytest tests/`)*
## 🎯 验证测试场景(手动 Payload)
以下是三个针对性的操作场景,您可以直接将其粘贴到 Dev Playground 中,以验证 agent 的图逻辑、路由、安全性和工具调用:
### 场景 1:人群导航与闸机改道(球迷流)
- **输入**:`"Hi, my ticket number is TKT-48201934. I am entering from Gate A. Can you check how busy it is and suggest where I should go?"`
- **预期行为**:
1. **Security Checkpoint** 会清除票号(将 `[SCRUBBED_TICKET]` 记录到 audits 中)。
2. **Coordinator** 将其路由到 `FanSupportAgent`。
3. 该 agent 调用 MCP 工具 `get_stadium_metrics(gate='Gate A')`,检测到高度拥挤(等待时间为 25 分钟),并建议改道至 **Gate B**(畅通,等待时间为 5 分钟)。
4. 显示带有清除后文本的响应。
### 场景 2:无障碍 ADA 协助(多语言支持)
- **输入**:`"Hola, necesito saber si hay rampas para sillas de ruedas cerca del Sector C."` *(你好,我想知道 C 区附近是否有轮椅坡道)。*
- **预期行为**:
1. **Security Checkpoint** 检测到 `"sillas de ruedas"`(轮椅)并触发 `accessible_routing=True`。它还会检测到西班牙语并设置 `locale="es"`。
2. **Coordinator** 将其路由到 `FanSupportAgent`。
3. 该 agent 调用 MCP 工具 `lookup_accessibility_facilities(sector='Sector C')`。
4. **Terminator** 附加本地化的西班牙语 ADA 页脚:`♿ [Asistencia ADA] Se ha habilitado la ruta accesible...`
### 场景 3:运营人员事件报告(指挥中心)
- **输入**:`"This is supervisor 3920. We have a concession queue overflow bottleneck at Section 104 with crowd spillover. Log a WARNING incident now."`
- **预期行为**:
1. **Security Checkpoint** 传递查询而不进行清除。
2. **Coordinator** 识别与运营相关的关键字(`concession`、`incident`、`log`)并将其路由到 `OpsLogisticsAgent`。
3. 该 agent 调用 MCP 工具 `log_incident(severity='WARNING', description='concession queue overflow bottleneck at Section 104 with crowd spillover')`。
4. 响应确认已派遣实体支持人员。
标签:AI安全防护, IPv6支持, MCP, MITM代理, Python, 场馆运营管理, 安全规则引擎, 客流引导, 无后门, 智能体工作流, 生成式AI, 索引, 自动化攻击, 逆向工具