Communitygithub.com

多智能體對話協議 (Agent Conversation Protocols)

設計多智能體系統中的對話模式與互動協議,涵蓋請求/響應、發佈/訂閱、黑板模式、委派鏈、辯論、批評、共識、扇出/扇入、監督者-工作者與同儕協商等模式。

多智能體對話協議 (Agent Conversation Protocols) 是什麼?

此技能專注於多智能體對話設計,提供了一套完整的決策框架來選擇適當的交談模式。它涵蓋了請求/響應、發佈/訂閱、黑板模式、委派鏈、辯論、批評、共識、扇出/扇入、監督者-工作者與同儕協商等核心模式。技能深入分析了 AutoGen 的 GroupChat 對話模式、CrewAI 的層級式委派、LangGraph 的狀態傳遞以及 FIPA-ACL 的言行事動。其主要價值在於透過決策樹、互動決策矩陣和終止條件選擇,幫助開發者設計智能體之間的溝通順序與訊息類型,避免常見的失敗模式,如委派乒乓、諂媚崩潰、監督者瓶頸、黑板狀態爆炸與上下文退化串聯。此技能不僅提供理論分析,還包含具體的工作範例(如程式碼審查系統與研究論文寫作)與品質關卡檢查清單,是設計複雜多智能體協作系統的必備知識。

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

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

智能體對話協議 (Agent Conversation Protocols)

您是智能體對話設計的專家。您理解智能體之間如何相互溝通——包括訊息類型、輪流發言規則、委派模式以及衝突解決機制,這些機制使多智能體系統保持連貫而非混亂。

決策點 (DECISION POINTS)

首要模式選擇樹 (Primary Pattern Selection Tree)

根據問題特徵:

├── 任務可分解為獨立子任務?
│   ├── 是 + 品質比速度重要
│   │   └── 使用扇出/扇入 (FAN-OUT/FAN-IN) 搭配冗餘執行 (3個以上智能體執行相同任務)
│   ├── 是 + 速度比品質重要  
│   │   └── 使用扇出/扇入 (FAN-OUT/FAN-IN) 搭配分割執行 (分工)
│   └── 否 + 任務需要順序相依
│       └── 使用監督者-工作者 (SUPERVISOR-WORKER) 搭配委派鏈
│
├── 存在多種有效方法?
│   ├── 是 + 存在可驗證的標準答案
│   │   └── 使用辯論 (DEBATE) (對抗式優化與裁判)
│   ├── 是 + 需要主觀偏好決定
│   │   └── 使用投票/共識 (VOTING/CONSENSUS) (民主選擇)
│   └── 否 + 單一方法但需要改進
│       └── 使用批評-改進 (CRITIQUE-REFINE) (迭代優化)
│
├── 需要從多樣來源綜合知識?
│   └── 使用黑板 (BLACKBOARD) (共享狀態累積)
│
└── 簡單的能力委派?
    └── 使用請求/響應 (REQUEST/RESPONSE) (同步交接)

拓撲 × 主動性 × 輪流順序決策矩陣 (Topology × Initiative × Turn Order Decision Matrix)

拓撲 (Topology)主動性 (Initiative)輪流順序 (Turn Order)使用時機範例
星狀 (Star)推送 (Push)循環 (Round-robin)明確的領導者協調工作CrewAI 層級流程
星狀 (Star)拉取 (Pull)優先佇列 (Priority-queue)工作者準備好時請求任務AutoGen GroupChat 搭配管理員
網狀 (Mesh)推送 (Push)自由形式 (Free-form)同儕協作,無瓶頸多智能體辯論
樹狀 (Tree)推送 (Push)深度優先 (Depth-first)層級式分解複雜委派鏈
廣播 (Broadcast)反應式 (Reactive)事件驅動 (Event-driven)知識分享、更新LangGraph 狀態更新

終止條件選擇 (Termination Condition Selection)

如果交談類型為:
├── 辯論 (DEBATE) → 當 judge_confidence > 0.8 或 rounds >= 3 時停止
├── 批評 (CRITIQUE) → 當 verdict == 'approve' 或 iterations >= 4 時停止  
├── 投票 (VOTING) → 當所有投票完成或逾時時停止
├── 扇出 (FAN-OUT) → 當 gather_policy 滿足 (全部/多數/第一個) 時停止
├── 監督者 (SUPERVISOR) → 當所有子任務完成或超出預算時停止
└── 黑板 (BLACKBOARD) → 當 goal_condition 滿足或偵測到過時時停止

失敗模式 (FAILURE MODES)

1. 委派乒乓 (Delegation Ping-Pong)

偵測: 智能體 A 委派給 B,B 又委派回 A,造成無限循環 症狀: 訊息數量呈指數成長,相同任務重複執行無止盡 根本原因: 委派鏈中無循環偵測,工作者可以向上委派 解決方案: 透過鏈追蹤和向上委派封鎖來實施委派限制

2. 諂媚崩潰 (Sycophancy Collapse)

偵測: 在辯論中,無論證據如何,所有智能體在第 2 回合都收斂到相同立場 症狀: 初始回合後無立場變更,對複雜議題達成一致同意 根本原因: 智能體優化目標是達成一致而非探求真相 解決方案: 分配明確的對抗性角色,要求智能體捍衛指定的觀點

3. 監督者瓶頸 (Supervisor Bottleneck)

偵測: 所有協調流程都通過單一監督者,平行任務延遲高 症狀: 工作者閒置等待監督者回應,可平行化的工作呈線性擴展 根本原因: 監督者扮演訊息路由器而非合成者 解決方案: 重構為扇出/扇入模式,或啟用工作者之間直接溝通

4. 黑板狀態爆炸 (Blackboard State Explosion)

偵測: 共享狀態無限制增長,智能體浪費權杖讀取不相關條目 症狀: 查詢響應時間隨時間增加,讀取操作消耗高權杖 根本原因: 黑板條目無垃圾回收或相關性過濾 解決方案: 實施基於信心的過期機制和基於語義的讀取過濾

5. 上下文退化串聯 (Context Degradation Cascade)

偵測: 深度委派鏈 (超過 3 層) 每跳會遺失關鍵上下文 症狀: 工作者提出澄清問題,輸出品質隨鏈深度下降 根本原因: 上下文壓縮偽影在委派跳躍間複合疊加 解決方案: 將層級結構扁平化至最多 2 層,或將完整上下文傳遞給所有工作者

工作範例 (WORKED EXAMPLES)

範例 1:程式碼審查系統設計

問題: 為 4 個智能體 (作者、安全審查員、效能審查員、風格審查員) 設計程式碼審查的交談協議

決策過程:

  1. 模式選擇: 品質關鍵的輸出 → 批評-改進 (CRITIQUE-REFINE) + 多種觀點 → 混合式辯論 (DEBATE)
  2. 拓撲分析: 4 個審查員需要看到相同的程式碼 → 星狀拓撲,作者作為中心樞紐
  3. 輪流順序: 安全必須先執行 (封鎖性),然後效能和風格平行進行

選擇的協議:

階段 1:作者提交初始程式碼 (請求/響應 REQUEST/RESPONSE)
階段 2:安全審查 (批評-改進 CRITIQUE-REFINE,封鎖性)
階段 3:效能 + 風格審查 (扇出/扇入 FAN-OUT/FAN-IN,平行)  
階段 4:如果問題重疊則進行衝突解決 (辯論 DEBATE)
階段 5:作者整合反饋 (批評-改進 CRITIQUE-REFINE)

模式取捨矩陣:

  • 純批評鏈:太慢 (順序審查)
  • 純辯論:安全問題會被多數表決忽略
  • 純扇出:對於安全失敗無法封鎖
  • 混合模式:安全優先,然後平行,最後解決衝突

範例 2:研究論文寫作

問題: 3 個智能體 (研究員、寫作者、事實查核員) 產出文獻回顧

決策過程:

  1. 主動性類型: 拉取式 (工作者準備好時工作) 與推送式 (協調者指派)
  2. 品質與速度: 品質關鍵 → 需要冗餘
  3. 分解: 主題可按研究領域分割

選擇的協議:

研究員:按研究領域進行分割式扇出 (Partitioned FAN-OUT)
事實查核員:對每個章節進行批評-改進 (CRITIQUE-REFINE)  
寫作者:扮演監督者 (SUPERVISOR) 角色,綜合所有輸入

為什麼不選擇其他方案:

  • 所有智能體在單一辯論中:角色不明確,寫作者的專業浪費在事實查核上
  • 順序的請求/響應鏈:太慢,無法平行研究
  • 純黑板模式:無綜合,只是知識積累

終止邏輯:

當以下條件滿足時停止:
- 所有研究領域皆已涵蓋 (完整性檢查)
- 事實查核員在所有章節的信心值 > 0.85
- 寫作者產出連貫的綜合
- 總權杖數 < 預算 或 時間 < 截止期限

範例 3:動態路由決策

問題: 在執行期間,監督者發現 3 個工作者超載,1 個工作者閒置

即時決策樹:

當前狀態:3 個工作者處於 90% 容量,1 個工作者處於 10% 容量
選項:
1. 重新平衡工作 (將任務遷移到閒置工作者)
2. 增加冗餘 (對關鍵路徑進行平行執行)  
3. 變更拓撲 (從星狀切換到網狀以進行同儕委派)

決策因素:
├── 剩餘時間?< 25% → 選項 2 (平行,接受較高成本)
├── 剩餘預算?< 50% → 選項 1 (重新平衡,優化成本)  
└── 任務相依性?高度耦合 → 選項 3 (網狀拓撲)

執行: 監督者偵測到狀態,廣播拓撲變更訊息,工作者更新其委派規則,工作以新模式繼續進行

品質關卡 (QUALITY GATES)

  • 終止策略已定義: 每場交談都有明確的訊息上限、時間和成本限制
  • 循環偵測已啟用: 委派鏈追蹤智能體歷史,防止 A→B→A 循環
  • 信心分數已提供: 所有輸出都包含智能體信心值 (0.0-1.0) 以便品質評估
  • 進度報告已連接: 長時間運行的任務會定期向協調者發送心跳訊息
  • 上下文交接已驗證: 每次委派都包含權杖估算,並標明可丟棄的上下文段落
  • 錯誤傳播已設計: 系統能處理單一智能體故障,而不導致整個交談崩潰
  • 收集策略明確: 扇出操作指定等待條件 (全部/多數/第一個/法定人數)
  • 角色多樣性已強制: 辯論協議指派不同的觀點,而非泛泛的「討論此主題」
  • 狀態過期已設定: 黑板條目具有 TTL 或信心閾值以自動清理
  • 拓撲與任務匹配: 交談結構與問題分解一致 (請參見決策樹)

非適用範圍 (NOT-FOR BOUNDARIES)

此技能涵蓋對話設計,不包括:

  • 序列化格式 (JSON 架構、訊息編碼) → 使用 agent-interchange-formats
  • 基礎設施設置 (訊息佇列、服務發現) → 使用 agentic-infrastructure-2026
  • 單一智能體工具使用 (函數呼叫、思維鏈) → 使用 agentic-patterns
  • 記憶持久化 (向量資料庫、情節回憶) → 使用 episodic-memory-algorithms
  • 框架選擇 (AutoGen vs LangGraph vs 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.

相關技能