Files
nexus/wiki/concepts/Agent-Collaboration-Protocol.md
2026-05-03 05:42:12 +08:00

63 lines
2.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Agent Collaboration Protocol"
type: concept
tags: []
last_updated: 2026-05-02
---
## Definition
规范化多 Agent 协作流程——定义何时发起协作、协作内容模板、协作边界及交接合同。
## Overview
在多 Agent 系统中,不同 Agent 负责不同专业领域。Agent Collaboration Protocol 为每个协作节点定义标准化协议,确保信息传递完整、意图清晰、交接无遗漏。
## Core Components
### 协作发起时机
- 交接点:当前 Agent 工作完成后、需要下游 Agent 承接时
- 依赖点:当前 Agent 需要上游 Agent 输出时
- 冲突点:发现超出自身职责范围的问题时
- 安全点:涉及凭证/密钥/认证等安全敏感操作时
### 协作内容模板
每个协作请求必须包含:
1. **上下文摘要**:工作进展和已完成内容
2. **具体请求**:需要对方完成什么
3. **交付物格式**:期望的输出格式和结构
4. **约束条件**:时间限制、质量标准、特殊要求
5. **交接合同**:交接数据的 schema 定义
### 协作边界
- 不越权:不在自身职责外做决策
- 不兜底:发现超出范围的问题时立即上报,而非自行处理
- 不丢失:每次协作记录到 log.md确保可追溯
## Workflow Architect 中的协作协议
| 协作方 | 时机 | 内容 | 交付物 |
|--------|------|------|--------|
| [[Reality-Checker]] | Draft spec 完成后、标记 Review 前 | 规范与实际代码差距验证 | Reality Checker Findings 表 |
| [[Backend-Architect]] | 发现实现缺陷时 | 补充缺失逻辑(重试/错误处理) | 修复代码 |
| [[Security-Engineer]] | 涉及凭证/密钥/认证/API 调用时 | 凭证传递机制安全性审查 | 安全评估意见 |
| [[API-Tester]] | Spec 标记 Approved 后 | 生成全部测试用例 | 自动化测试脚本 |
| [[DevOps-Automator]] | 揭示基础设施销毁顺序需求时 | 验证 IaC 销毁顺序 | 销毁顺序确认 |
## Key Principles
- **主动发起**:发现需要协作时立即发起,不等待
- **标准化模板**:每次协作使用统一格式,减少理解成本
- **明确边界**:知道自己不做什么,比知道自己做什么更重要
- **完整交接**:交接内容包括所有上下文,而非仅最终结果
## Related Concepts
- [[Handoff-Contract]]:协作交接的数据 schema 定义
- [[Reality-Checker]]Workflow Architect 的首个强制协作节点
- [[Workflow-Tree-Spec]]:协作产出的主要载体
## Aliases
- Multi-Agent Handoff Protocol
- Agent Coordination Framework
- Inter-Agent Collaboration Standard