-
Notifications
You must be signed in to change notification settings - Fork 0
Developer Guide
zhouning edited this page Mar 22, 2026
·
1 revision
中英双语 | Bilingual
data_agent/
├── app.py # Chainlit 主入口 (3,422 行)
├── agent.py # Agent 定义、管道组装
├── intent_router.py # 语义意图路由
├── frontend_api.py # 134 REST API (2,649 行)
├── toolsets/ # 28 个工具集 (29 文件)
├── skills/ # 18 个 ADK 技能 (SKILL.md)
├── fusion/ # 融合引擎 (26 文件)
├── connectors/ # 6 个连接器 (7 文件)
├── api/ # API 路由拆分 (9 文件)
├── prompts/ # Agent 提示词 (4 YAML)
├── migrations/ # 数据库迁移 (30 SQL)
└── test_*.py # 测试 (95 文件, 29,346 行)
- 在
toolsets/创建my_tools.py,继承BaseToolset - 在
__init__.py的TOOLSET_NAMES列表中注册 - 编写测试
test_my_tools.py
- 在
skills/创建目录(kebab-case),如my-skill/ - 创建
SKILL.md,YAML frontmatter 含 name, description, domain, version, intent_triggers - 可选添加
references/和assets/子目录
.venv/Scripts/python.exe -m pytest data_agent/ --ignore=data_agent/test_knowledge_agent.py -q始终在导入位置 mock get_engine:@patch("data_agent.memory.get_engine", return_value=None)
cd frontend && npm install && npm run buildGitHub Actions: test -> frontend -> evaluation -> route-eval
Same as above with English descriptions.
- Create
my_tools.pyintoolsets/, extendBaseToolset - Register in
__init__.pyTOOLSET_NAMES - Write tests
- Create kebab-case directory in
skills/ - Create
SKILL.mdwith YAML frontmatter - Optionally add
references/andassets/
.venv/Scripts/python.exe -m pytest data_agent/ --ignore=data_agent/test_knowledge_agent.py -qAlways mock at import site: @patch("data_agent.memory.get_engine", return_value=None)
cd frontend && npm install && npm run buildGitHub Actions: test -> frontend -> evaluation -> route-eval
GIS Data Agent v14.5 · Built on Google ADK · GitHub · Report Issue
快速开始 Getting Started
核心概念 Core Concepts
使用指南 User Guide
架构与运维 Architecture & Ops
参考 Reference