Xpersona
M

Multi Agent

CLAWHUB · Unverified

A multi-agent collaboration system coordinating specialized AI roles—planner, executor, reviewer, and coordinator—to analyze, execute, and review complex tas... Skill: Multi Agent Owner: yuyonghao-123 Summary: A multi-agent collaboration system coordinating specialized AI roles—planner, executor, reviewer, and coordinator—to analyze, execute, and review complex tas... Tags: latest:0.1.2 Version history: v0.1.2 | 2026-04-01T05:52:08.052Z | user Update - 2026-04-01 v1.0.1 | 2026-04-01T04:50:11.669Z | user Update from local workspace v1.0.0 | 2026-03-31T02:55:48.533Z | auto Ini

62
Rank
84
Safety
980
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 980 downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s173qtadqbwthef9dwg283f54n83np6t:yuyonghao-multi-agent
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-yuyonghao-123-yuyonghao-multi-agent/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

146,112 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

# multi-agent - 多智能体协作系统

**版本**: 0.1.0  
**作者**: 小蒲萄 (Clawd)  
**创建日期**: 2026-03-18  
**类型**: Multi-Agent Collaboration

---

## 📖 简介

多智能体协作系统,让多个专用 AI 智能体协同完成复杂任务。

**核心理念**:
- 🎭 **角色分工** - 每个智能体有 specialized 能力
- 🔄 **协作流程** - 规划→执行→审查的完整工作流
- 📊 **质量保证** - 审查者确保输出质量
- ⚡ **灵活模式** - 支持协作/顺序/并行执行

---

## 🎭 智能体角色

### 1. Planner(规划者)

**职责**: 分析任务并制定执行计划

**能力**:
- 任务复杂度分析
- 任务分解(Decomposition)
- 优先级排序
- 资源分配

**性格**: 分析型,注重结构和逻辑

**示例输出**:
```json
{
  "complexity": { "level": "complex", "score": 12 },
  "subtasks": [
    { "id": 1, "description": "Analyze project structure", "role": "analyst" },
    { "id": 2, "description": "Execute main analysis", "role": "executor" },
    { "id": 3, "description": "Review results", "role": "reviewer" }
  ]
}
```

---

### 2. Executor(执行者)

**职责**: 使用工具执行具体任务

**能力**:
- 工具调用(集成 ReAct)
- 问题解决
- 结果生成

**性格**: 行动导向,注重结果

**集成工具**:
- read_file, write_file
- execute_command
- list_directory
- parse_json, calculate
- 等 8 个内置工具

---

### 3. Reviewer(审查者)

**职责**: 验证结果质量

**能力**:
- 质量检查
- 错误检测
- 完整性验证
- 反馈建议

**性格**: 批判性思维,注重细节

**检查项**:
- ✅ 任务完成度
- ✅ 输出准确性
- ✅ 执行时间
- ✅ 错误处理

---

### 4. Coordinator(协调者)

**职责**: 管理智能体间通信和工作流

**能力**:
- 工作流编排
- 冲突解决
- 通信管理
- 进度追踪

**性格**: 协作型,注重团队效率

---

## 🚀 快速开始

### 安装依赖

```bash
cd skills/multi-agent
npm install
```

### 基本使用

```javascript
const { MultiAgentOrchestrator } = require('./src/orchestrator');

// 创建编排器
const orchestrator = new MultiAgentOrchestrator({ verbose: true });

// 初始化智能体
orchestrator.initializeAgents(['planner', 'executor', 'reviewer']);

// 执行任务
const result = await orchestrator.executeTask(
  'Analyze this project and create a summary report',
  { mode: 'collaborative' }
);

console.log(result);
```

### 命令行使用

```bash
# 协作模式(默认)
node src/index.js "Analyze project structure"

# 顺序模式
node src/index.js "Task" --mode sequential

# 并行模式
node src/index.js "Task" --mode parallel
```

---

## 🎯 执行模式

### 1. 协作模式(Collaborative)

**流程**: Plan → Execute → Review

```
┌──────────┐     ┌──────────┐     ┌──────────┐
│ Planner  │ ──→ │ Executor │ ──→ │ Reviewer │
└──────────┘     └──────────┘     └──────────┘
   分析任务          执行工作         质量检查
```

**适用场景**:
- 复杂多步骤任务
- 需要质量保证
- 错误恢复重要

**示例**:
```bash
node src/index.js "Build a complete feature analysis report" --mode collaborative
```

---

### 2. 顺序模式(Sequential)

**流程**: Agent1 → Agent2 → Agent3(依次执行)

```
Agent1 (Planner)
    ↓
Agent2 (Executor)
    ↓
Agent3 (Reviewer)
```

**适用场景**:
- 任务有明确先后依赖
- 每个角色独立工作
- 需要阶段性输出

**示例**:
```bash
node src/index.js "Write documentation" --mode sequential --roles "planner,executor,reviewer"
```

---

### 3. 并行模式(Parallel)

**流程**: 所有 Agent 同时执行同一任务

```
        ┌─→ Planner
Task ──┼─→ Executor
        └─→ Reviewer
```

**适用场景**:
- 需要多角度分析
- 快速原型验证
- 收集多样化意见

**示例**:
```bash
node src/index.js "Evaluate this approach" --mode parallel
```

---

## 📊 输出示例

### 协作模式完整输出

```
🦞 Multi-Agent System v0.1.0
============================================================
Task: Analyze p

README.md

# 多智能体协作系统 (Multi-Agent Collaboration System)

## 📖 概述

多智能体协作系统是一个基于 JavaScript 的智能体协作框架,灵感来源于 AutoGen Teams、CrewAI Crews 和 OpenAI Swarm 等主流多智能体框架。

### 核心设计理念

本系统提取了主流多智能体框架的核心设计模式:

#### 1. **角色分工模式 (Role-Based Specialization)**
- 每个智能体承担特定职责(研究员、程序员、审核员等)
- 角色预定义专业能力和工具访问权限
- 支持自定义角色扩展

#### 2. **任务分解模式 (Task Decomposition)**
- 复杂任务自动分解为可执行的子任务
- 识别任务间的依赖关系
- 智能分配最优执行者

#### 3. **编排执行模式 (Orchestration Patterns)**
- **并行执行**: 独立任务同时执行,提高效率
- **串行执行**: 依赖任务按顺序执行,保证正确性
- **混合编排**: 复杂工作流的 DAG 执行

#### 4. **结果聚合模式 (Result Aggregation)**
- 收集各智能体的执行结果
- 处理结果冲突和异常
- 生成最终综合输出

#### 5. **协作沟通模式 (Inter-Agent Communication)**
- 智能体间消息传递
- 上下文共享机制
- 请求 - 响应协作

## 🏗️ 架构设计

```
┌─────────────────────────────────────────────────────────┐
│                    Orchestrator                         │
│              (编排器 - 协调全局流程)                      │
└─────────────────────────────────────────────────────────┘
                            │
                            ▼
┌─────────────────────────────────────────────────────────┐
│                   Task Planner                          │
│            (任务规划器 - 分解和分配任务)                   │
└─────────────────────────────────────────────────────────┘
                            │
            ┌───────────────┼───────────────┐
            ▼               ▼               ▼
    ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
    │  Researcher  │ │  Developer   │ │   Reviewer   │
    │   (研究员)    │ │   (程序员)    │ │   (审核员)    │
    └──────────────┘ └──────────────┘ └──────────────┘
            │               │               │
            └───────────────┼───────────────┘
                            ▼
┌─────────────────────────────────────────────────────────┐
│                 Result Aggregator                       │
│              (结果聚合器 - 汇总输出)                      │
└─────────────────────────────────────────────────────────┘
```

## 📁 目录结构

```
skills/multi-agent/
├── src/
│   ├── agent-team.js      # 智能体团队管理类
│   ├── roles.js           # 预定义角色
│   ├── task-planner.js    # 任务分解和分发
│   └── orchestrator.js    # 编排和结果聚合
├── test/
│   └── team.test.js       # 测试用例
├── SKILL.md               # 使用文档
└── README.md              # 详细说明(本文件)
```

## 🚀 快速开始

### 基础使用

```javascript
const { AgentTeam, roles } = require('./src/agent-team');

// 创建团队
const team = new AgentTeam('research-team');

// 添加角色
team.addRole('researcher', roles.Researcher);
team.addRole('writer', roles.Writer);

// 分配任务
team.assignTask('调研 AI 智能体发展趋势', 'researcher');
team.assignTask('撰写调研报告', 'writer');

// 执行并收集结果
const results = await team.orchestrate();
console.log(results);
```

### 高级编排

```javascript
const { Orchestrator } = require('./src/orchestrator');

const orchestrator = new Orchestrator();

// 定义工作流
const workflow = {
  parallel: [
    { agent: 'researcher', task: '搜索技术文档' },
    { agent: 'developer', task: '编写代码示例' }
  ],
  serial: [
    { agent: 'reviewer', task: '审核所有内容', dependsOn: ['parallel'] }
  ]
};

const result = await orch

_meta.json

{
  "ownerId": "kn7b2av1gaq4ftrjvvs0454r4h833ftn",
  "slug": "yuyonghao-multi-agent",
  "version": "0.1.2",
  "publishedAt": 1775022728052
}

FIX_REPORT.md

# Multi-Agent System - Bug Fix Report

**修复日期**: 2026-03-18  
**版本**: 0.1.1 (Bug Fixes)  
**状态**: ✅ 所有问题已修复

---

## 🐛 问题清单

| # | 问题 | 严重性 | 状态 |
|---|------|--------|------|
| 1 | Executor 未充分利用 ReAct 引擎 | 高 | ✅ 已修复 |
| 2 | Reviewer 评分显示 NaN/0% | 中 | ✅ 已修复 |
| 3 | Planner 任务分解过简 | 中 | ✅ 已修复 |

---

## 🔧 修复详情

### 问题 1: Executor 未充分利用 ReAct 引擎

**现象**:
```
[Executor] Starting task: Analyze the project...
[Executor] ✓ Task completed in 1ms
Result: "Completed task: Analyze the project..."
```

**原因**: Executor 直接返回通用执行结果,未调用 ReAct 引擎进行多步推理和工具调用

**修复**:
```javascript
// src/agent-roles.js - ExecutorAgent.executeRoleSpecific()

async executeRoleSpecific(task, context) {
  console.log(`[Executor] Starting execution with context: ${Object.keys(context).join(', ')}`);
  
  // Priority 1: Use ReAct engine if available
  if (context.reactEngine) {
    console.log(`[Executor] Using ReAct engine for intelligent task execution`);
    try {
      const result = await context.reactEngine.run(task);
      console.log(`[Executor] ReAct execution completed: ${result.success ? '✅' : '❌'}`);
      return result;
    } catch (error) {
      console.error(`[Executor] ReAct execution failed: ${error.message}`);
      // Fallback to tools registry
    }
  }
  
  // Priority 2: Use tools registry directly
  if (this.tools) {
    console.log(`[Executor] Using tools registry for direct execution`);
    // Try to match tool from task description
    for (const [toolName, tool] of this.tools.tools) {
      if (task.toLowerCase().includes(toolName) || task.toLowerCase().includes(toolName.replace('_', ' '))) {
        console.log(`[Executor] Matched tool: ${toolName}`);
        const result = await this.tools.executeTool(toolName, task);
        console.log(`[Executor] Tool execution result: ${result.success ? '✅' : '❌'}`);
        return result;
      }
    }
    // ... additional fallback logic
  }
  
  // Fallback: Generic execution
  return { success: true, result: `Executed task: ${task}` };
}
```

**验证**:
```
[Executor] Starting execution with context: availableAgents, startTime, timeout, toolsRegistry, reactEngine
[Executor] Using ReAct engine for intelligent task execution
[Executor] ReAct execution completed: ✅
[Executor] ✓ Task completed in 1ms
```

**效果**: ✅ Executor 现在优先使用 ReAct 引擎进行智能任务执行

---

### 问题 2: Reviewer 评分显示 NaN/0%

**现象**:
```
🔍 REVIEW PHASE:
  Overall Score: 0%  // 应该是 100%
```

**原因**:
1. previousResults 为空数组(orchestrator 未正确传递)
2. qualityCriteria 未设置默认值
3. 除零错误导致 NaN

**修复 1 - Orchestrator**:
```javascript
// src/orchestrator.js - executeCollaborative()

// Step 3: Review
if (reviewer) {
  if (this.verbose) console.log('\n[Phase 3] Reviewing...');
  reviewer.status = 'busy';
  
  // Ensure we have execution results to review
  const resultsToReview = results.execution && results.execution.length > 0 ? results.execution : [];
  
  if (this.verbose) console.log(`[Reviewer] Reviewing ${resultsToReview.length} execution result(s)`);
  
  results.re

skill-card.md

## Description:

Multi Agent coordinates specialized planner, executor, reviewer, and coordinator roles to decompose, execute, review, and summarize complex agent tasks.

This skill is ready for commercial/non-commercial use.

## Publisher:

[yuyonghao-123](https://clawhub.ai/user/yuyonghao-123)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and agent builders use this skill to run multi-agent collaboration workflows for project analysis, code review, research reports, quality assurance, and debugging.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Automatic shell execution fallback can run task text as an operating-system command when tool matching falls through.

Mitigation: Use only in an isolated project directory with trusted task text, and remove or replace the shell fallback before shared or sensitive use.

Risk: Executor and tool roles can perform file operations or command execution if broad tools are supplied.

Mitigation: Limit filesystem and shell permissions, avoid secrets in task context, and review generated actions before execution.

## Reference(s):

- [ClawHub Skill Page](https://clawhub.ai/yuyonghao-123/skills/yuyonghao-multi-agent)
- [Skill Usage Guide](artifact/SKILL.md)
- [README](artifact/README.md)
- [Test Report](artifact/TEST_REPORT.md)
- [Fix Report](artifact/FIX_REPORT.md)

## Skill Output:

**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]

**Output Format:** [Console text and structured JavaScript result objects; configured agent roles may produce Markdown, code, configuration, shell commands, or guidance.]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Outputs vary by workflow mode and configured tools; review generated commands and file-writing actions before use.]

## Skill Version(s):

0.1.2 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Multi Agent and adjacent AI workflows.