Communitygithub.com

curiositech/agent-conversation-protocols

多智能体系统中对话模式与交互协议的设计指南,涵盖请求/响应、发布/订阅、黑板模式、委托链、辩论、批评、共识、扇出/扇入、监督者-工作者以及对等协商等模式。

agent-conversation-protocols 是什么?

该技能深入讲解了多智能体系统中的对话设计,包括消息类型、轮次规则、委托模式和冲突解决机制,旨在帮助开发者构建有序而非混乱的多智能体协作系统。它基于一个决策树来选择最合适的对话模式(如扇出/扇入用于分解任务、辩论用于多个有效方案),并提供了拓扑结构(星型、网状、树型等)× 发起方式× 轮次顺序的决策矩阵。技能详细分析了五种常见的失败模式(委托乒乓、谄媚坍塌、监督者瓶颈、黑板状态爆炸、上下文退化级联)及其检测、原因和修复方法,并通过三个完整的实战示例(代码审查系统、研究论文写作、动态路由决策)展示了如何应用这些模式。该技能适用于AutoGen、CrewAI、LangGraph等主流多智能体框架,但明确不涉及序列化格式、基础设施搭建或单智能体行为。

兼容平台~Claude Code~Codex CLI~Cursor✓Antigravity
npx skills add https://github.com/curiositech/windags-skills/tree/HEAD/skills/agent-conversation-protocols

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

智能体对话协议

你是多智能体对话设计专家。你了解智能体之间如何通信——消息类型、轮次规则、委托模式和冲突解决机制,这些机制使多智能体系统保持有序而非混乱。

决策点

主要模式选择树

给定问题特征:

├── 任务可分解为独立子任务?
│   ├── 是 + 质量重于速度
│   │   └── 使用扇出/扇入模式,冗余执行(3个以上智能体执行同一任务)
│   ├── 是 + 速度重于质量
│   │   └── 使用扇出/扇入模式,分区执行(分工)
│   └── 否 + 任务需要顺序依赖
│       └── 使用监督者-工作者模式,带委托链
│
├── 存在多个有效方法?
│   ├── 是 + 存在可验证的事实真相
│   │   └── 使用辩论模式(对抗性改进,带裁判)
│   ├── 是 + 主观偏好决策
│   │   └── 使用投票/共识模式(民主选择)
│   └── 否 + 单一方法但需改进
│       └── 使用批评-改进模式(迭代优化)
│
├── 需要从不同来源综合知识?
│   └── 使用黑板模式(共享状态累积)
│
└── 简单的能力委托?
    └── 使用请求/响应模式(同步交接)

拓扑结构 × 发起方式 × 轮次顺序决策矩阵

拓扑结构发起方式轮次顺序使用时机示例
星型推送轮询有明确领导者协调工作CrewAI 层次化流程
星型拉取优先级队列工作者准备就绪时请求任务AutoGen 带管理者的组聊
网状推送自由形式对等协作,无瓶颈多智能体辩论
树型推送深度优先层次化分解复杂委托链
广播响应式事件驱动知识共享、更新LangGraph 状态更新

终止条件选择

如果对话类型为:
├── 辩论 → 在 judge_confidence > 0.8 或 rounds >= 3 时停止
├── 批评 → 在 verdict == 'approve' 或 iterations >= 4 时停止
├── 投票 → 在收集到所有投票或超时时停止
├── 扇出 → 在执行 gather_policy 满足条件(全部/多数/第一个)时停止
├── 监督者 → 在完成所有子任务或超出预算时停止
└── 黑板模式 → 在满足 goal_condition 或检测到陈旧数据时停止

失败模式

1. 委托乒乓

检测: 智能体 A 委托给 B,B 又委托回 A,形成无限循环 症状: 消息数量呈指数增长,相同任务被无限重复执行 根本原因: 委托链中无循环检测,工作者可向上级委托 修复: 通过链追踪实现委托约束并阻止向上委托

2. 谄媚坍塌

检测: 辩论中所有智能体在第 2 轮便趋于同一立场,无论证据如何 症状: 初始回合后无立场变化,在复杂话题上达成一致 根本原因: 智能体优化的是达成一致而非寻求真相 修复: 分配明确的对抗性角色,要求智能体捍卫指定视角

3. 监督者瓶颈

检测: 所有协调流经单一监督者,并行任务延迟高 症状: 工作者闲置等待监督者响应,在可并行工作上呈线性扩展 根本原因: 监督者充当消息路由器而非综合器 修复: 重组为扇出/扇入模式,或允许工作者间直接通信

4. 黑板状态爆炸

检测: 共享状态无界增长,智能体浪费令牌阅读无关条目 症状: 查询响应时间随时间增加,读取时令牌消耗高 根本原因: 黑板条目没有垃圾回收或相关性过滤 修复: 实现基于置信度的过期机制和读取时的语义过滤

5. 上下文退化级联

检测: 深度委托链(>3 层)每跳丢失关键上下文 症状: 工作者提出澄清性问题,输出质量随链深度下降 根本原因: 上下文压缩伪影在委托跳转中累积 修复: 将层级展平至最多 2 层,或向所有工作者传递完整上下文

实例演示

示例 1:代码审查系统设计

问题: 为 4 智能体代码审查(作者、安全审查员、性能审查员、样式审查员)设计对话协议

决策过程:

  1. 模式选择: 质量关键输出 → 批评-改进 + 多视角 → 混合辩论模式
  2. 拓扑结构分析: 4 位审查员需查看相同代码 → 作者作为中心的星型拓扑
  3. 轮次顺序: 安全必须首先运行(阻塞),然后是性能和样式并行

选定协议:

阶段 1:作者提交初始代码(请求/响应)
阶段 2:安全审查(批评-改进,阻塞)
阶段 3:性能 + 样式审查(扇出/扇入,并行)
阶段 4:问题重叠时进行冲突解决(辩论)
阶段 5:作者整合反馈(批评-改进)

模式权衡矩阵:

  • 纯批评链:太慢(顺序审查)
  • 纯辩论:安全问题被多数否决
  • 纯扇出:无法阻塞安全失败
  • 混合模式:安全优先,然后并行,最后解决冲突

示例 2:研究论文撰写

问题: 3 个智能体(研究员、写作者、事实核查员)编写文献综述

决策过程:

  1. 发起类型: 拉取式(工作者准备就绪时工作)vs 推送式(协调者分配)
  2. 质量 vs 速度: 质量关键 → 需要冗余
  3. 分解: 主题可按研究领域分区

选定协议:

研究员:分区扇出,按研究领域
事实核查员:对每个章节进行批评-改进
写作者:监督者角色,综合所有输入

未选替代方案的原因:

  • 所有智能体参与单一辩论:角色不明确,写作者的专业能力浪费在事实核查上
  • 顺序的请求/响应链:太慢,无法并行研究
  • 纯黑板模式:无综合,仅是知识积累

终止逻辑:

当以下条件满足时停止:
- 所有研究领域已覆盖(完整性检查)
- 所有章节的事实核查员置信度 > 0.85
- 写作者生成连贯的综合内容
- 总令牌数 < 预算 或 时间 < 截止日期

示例 3:动态路由决策

问题: 执行过程中,监督者发现 3 个工作者过载,1 个工作者空闲

实时决策树:

当前状态:3 个工作者负载 90%,1 个工作者负载 10%
选项:
1. 重新平衡工作(将任务迁移至空闲工作者)
2. 增加冗余(关键路径上的并行执行)
3. 更改拓扑结构(从星型切换为网状,进行对等委托)

决策因素:
├── 剩余时间?< 25% → 选项 2(并行,接受更高成本)
├── 剩余预算?< 50% → 选项 1(重新平衡,优化成本)
└── 任务依赖?高耦合 → 选项 3(网状拓扑)

执行: 监督者检测到状态,广播拓扑结构更改消息,工作者更新其委托规则,工作以新模式继续

质量门控

  • 已定义终止策略: 每次对话都有明确的最大消息数、时间和成本限制
  • 已启用循环检测: 委托链追踪智能体历史,防止 A→B→A 循环
  • 存在置信度评分: 所有输出包含智能体置信度(0.0-1.0),用于质量评估
  • 进度报告已连接: 长时间运行的任务定期向协调者发送心跳消息
  • 上下文交接已验证: 每次委托包含令牌估算并标识可丢弃的上下文部分
  • 错误传播已设计: 系统处理单智能体故障而不导致整个对话崩溃
  • 收集策略已明确: 扇出操作指定等待条件(全部/多数/第一个/法定人数)
  • 角色多样性已强制: 辩论协议分配不同的视角,而非泛泛的“讨论此话题”
  • 状态过期已配置: 黑板条目具有 TTL 或置信度阈值,用于自动清理
  • 拓扑结构与任务匹配: 对话结构符合问题分解(参见决策树)

不属于本技能的边界

本技能涵盖对话设计,不包括:

  • 序列化格式(JSON 模式、消息编码)→ 使用 agent-interchange-formats
  • 基础设施搭建(消息队列、服务发现)→ 使用 agentic-infrastructure-2026
  • 单智能体工具使用(函数调用、思维链)→ 使用 agentic-patterns
  • 记忆持久化(向量存储、情景回忆)→ 使用 episodic-memory-algorithms
  • 框架选择(AutoGen 与 LangGraph 与 CrewAI)→ 使用 agentic-infrastructure-2026

遇到以下情况请委托给其他技能:

  • 线路协议设计 → agent-interchange-formats
  • 性能优化 → agentic-infrastructure-2026
  • 单个智能体推理 → agentic-patterns
  • 长期记忆 → episodic-memory-algorithms
  • 工具集成 → agentic-patterns

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

curiositech/windags-skills

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

curiositech/windags-skills

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

curiositech/windags-skills

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

curiositech/windags-skills

Implement WCAG 2.2 AA/AAA compliance with automated testing, keyboard navigation, screen reader support, and focus management. Activate on: accessibility audit, WCAG compliance, keyboard navigation, screen reader, aria attributes, axe-core, focus trap. NOT for: design-level accessibility review (use design-accessibility-auditor), color contrast only (use css-in-js-architect).

curiositech/windags-skills

Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time estimation, dopamine-aware task design, and building systems that actually work for neurodivergent minds.

curiositech/windags-skills

Designs digital experiences for ADHD brains using neuroscience research and UX principles. Expert in reducing cognitive load, time blindness solutions, dopamine-driven engagement, and compassionate design patterns. Activate on 'ADHD design', 'cognitive load', 'accessibility', 'neurodivergent UX', 'time blindness', 'dopamine-driven', 'executive function'. NOT for general accessibility (WCAG only), neurotypical UX design, or simple UI styling without ADHD context.

curiositech/windags-skills

>- Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

curiositech/windags-skills

Extend and modify the admin dashboard, developer portal, and operations console. Use when adding new admin tabs, metrics, monitoring features, or internal tools. Activates for dashboard development, analytics, user management, and internal tooling.

curiositech/windags-skills

Meta-agent for creating new custom agents, skills, and MCP integrations. Expert in agent design, MCP development, skill architecture, and rapid prototyping. Activate on 'create agent', 'new skill', 'MCP server', 'custom tool', 'agent design'. NOT for using existing agents (invoke them directly), general coding (use language-specific skills), or infrastructure setup (use deployment-engineer).

curiositech/windags-skills

AI-powered calendar management and agent-based scheduling coordination. Covers calendar APIs (Google Calendar, CalDAV/iCal), AI scheduling assistants (Reclaim, Clockwise, Motion, Cal.com), building custom calendar agents with MCP, multi-calendar merging, timezone management, focus block protection, meeting fatigue detection, and agent-to-agent meeting negotiation protocols. Activate on: "calendar agent", "AI scheduling", "calendar coordination", "meeting scheduling", "calendar API", "focus time protection", "calendar optimization", "Google Calendar MCP", "Reclaim", "Clockwise", "Motion", "Cal.com", "smart scheduling", "calendar-aware agent", "timezone scheduling", "agent negotiation meetings". NOT for: manual calendar UI component design (use form-validation-architect), project management scheduling or Gantt charts (use project-management-guru-adhd), general time-tracking or pomodoro apps (use adhd-daily-planner for time-awareness), building the agent itself from scratch (use agent-creator).

curiositech/windags-skills

Build and adopt production AI agent infrastructure in 2026. Covers framework selection (LangGraph, CrewAI, AutoGen, MCP), orchestration patterns, evaluation, observability, memory systems, and tool use. Also covers the SOCIAL dimension: how to sell agent infrastructure internally, change management, measuring ROI, building trust in autonomous systems, and scaling adoption across teams. Activate on: "agent infrastructure", "agent framework comparison", "which agent framework", "sell AI tools internally", "agent adoption", "agent observability", "agent evaluation", "MCP architecture", "agentic mesh", "enterprise AI agents", "AI change management", "agent ROI". NOT for: building specific agents (use ai-engineer), designing agent behavior patterns (use agentic-patterns), prompt tuning (use prompt-engineer).

curiositech/windags-skills

Fundamental patterns for effective agentic behavior. Teaches decomposition, tool orchestration, error recovery, context management, quality self-assessment, and knowing when to stop. Model-agnostic principles that make any agent more effective regardless of domain. Activate on: "how should I structure this agent", "agentic workflow", "agent patterns", "multi-step task", "tool orchestration", "/agentic-patterns", "decompose this", "agent best practices", "chain of actions", "when should the agent stop", "agent loop design". NOT for: creating agent infrastructure (use agent-creator), building DAGs (use windags-architect), specific tool implementation.

curiositech/windags-skills

Automated discovery and matching of agent skills for dynamic task routing and capability assessment

curiositech/windags-skills

Cryptographic security for agentic systems — zero-trust agent networking, signed message envelopes (JWS/JWE), capability-based security (ocaps), Merkle tree audit trails, WASM sandboxing, and formal verification. Covers CLI dev tool security, mTLS between agents, permission boundaries (least privilege for AI agents), and supply chain security for skills/plugins. Activate on: "agent security", "zero trust agents", "secure agent communication", "capability-based security", "ocap", "signed messages between agents", "agent audit trail", "sandbox agent execution", "agent permissions", "mTLS agents", "cryptographic verification", "agent supply chain", "OWASP agentic", "prove agent did X", "tamper-proof agent logs". NOT for: application-level SAST scanning (use security-auditor), network firewall rules (use infrastructure), SOC2/HIPAA compliance (organizational), or prompt injection defense (use prompt-engineer).

curiositech/windags-skills

Data structures and serialization formats for agent-to-agent communication. Covers message envelopes, structured output schemas, capability declarations, task handoff payloads, error/retry signaling, and context windows as data structures. Deep comparison of A2A protocol, MCP, OpenAI function calling, and LangChain message types. Teaches when to use rigid schemas vs free-form with validation, typed vs untyped, streaming vs batch. Activate on: "agent message format", "agent communication schema", "agent-to-agent protocol", "A2A protocol", "MCP message format", "structured output for agents", "agent interop", "interchange format", "agent serialization", "task handoff format", "capability declaration". NOT for: what agents say to each other (use agent-conversation-protocols), orchestration topology (use multi-agent-coordination), building agent infrastructure (use agentic-infrastructure-2026).

curiositech/windags-skills

Logic-based agent programming language implementing BDI architecture for practical autonomous agent development

curiositech/windags-skills

>- Design AgentSpeak(L)-style BDI agents with context-guarded plans, selection functions, and intention stacks. Use for interruptible autonomy, agent policy, and multi-agent orchestration in dynamic environments. NOT for simple rule engines, static planners, or centralized workflows.

curiositech/windags-skills

Foundational concurrent computation model where actors communicate exclusively through asynchronous message passing

curiositech/windags-skills

Build production-ready LLM applications, advanced RAG systems, and intelligent agents. Implements vector search, multimodal AI, agent orchestration, and enterprise AI integrations. Use PROACTIVELY for LLM features, chatbots, AI agents, or AI-powered applications.

curiositech/windags-skills

license: Apache-2.0 NOT for unrelated tasks outside this domain.

相关技能