📦 Agent — 智能体

v1.0.0

团队协调员 在任务编排系统中,通过任务分解、依赖管理、执行调度与结果聚合,协调多智能体协作。

13· 7·1 当前·1 累计
by @sky-lv (SKY-lv)
下载技能包
最后更新
2026/4/23
0
安全扫描
VirusTotal
Pending
查看报告
OpenClaw
可疑
medium confidence
该技能的实现大致匹配一个 orchestrator,但其运行时指令引用了 OpenAI API 密钥及其他未在元数据中声明的运行时行为——这种不一致令人担忧,应在安装前解决。
评估建议
该 skill 看似合法的多 agent orchestrator,但 SKILL.md 要求运行时提供 OpenAI API key,而元数据未列出任何必需凭据——这一不匹配是主要风险信号。安装前:(1) 要求发布者明确声明所需环境变量(OPENAI_API_KEY)并记录向外部 LLM 发送的数据;(2) 切勿提供生产/全局 API key,应使用受限范围或配额受限的 key,或沙箱账户;(3) 审查完整 SKILL.md(当前摘录被截断)以发现其他环境变量或文件访问;(4) 在隔离环境或容器内首次运行,并监控网络流量;(5) 若不信任未知所有者,请勿安装。若作者更新元数据列出所需凭据并说明数据处理,可重新评估——该信息可能使其转为良性。...
详细分析 ▾
用途与能力
名称与描述(multi-agent orchestration、task decomposition、scheduling、message bus)与 SKILL.md 中的 TypeScript 伪代码一致。代码展示了预期组件:BaseAgent、Orchestrator、MessageBus、DAG 调度及 LLM 调用——与所述目的相符。
指令范围
SKILL.md 包含具体的运行时指令,调用外部 LLM API(通过 fetch 访问 https://api.openai.com/v1/chat/completions,并使用 process.env.OPENAI_API_KEY),构建 prompt,解析 JSON 计划,并通过 LLMRouter 路由任务。因此,这些指令会访问环境变量,并将任务数据传输到外部端点。该技能的指令并非纯说明性:它们规定了网络行为和密钥使用,其范围超出了 skill.json 元数据所声明的内容。
安装机制
这是一个仅含指令的技能,没有安装规范,安装程序也不会向磁盘写入任何代码文件,属于风险最低的安装机制。
凭证需求
SKILL.md 显式使用 process.env.OPENAI_API_KEY 调用 OpenAI 端点,但技能元数据中未列出任何必需的环境变量或主要凭据。合法调用 LLM 的多智能体编排器确实需要 API key,这一遗漏属于不一致——技能在运行时请求机密访问却未声明。其他被截断的部分可能也存在未说明的环境访问。
持久化与权限
始终为 false,且该 skill 支持用户调用并允许模型调用(默认)。这些是标准/默认权限。没有迹象表明该 skill 请求永久/全局驻留或修改其他 skill 的设置。
安全有层次,运行前请审查代码。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/4/23

- Multi-Agent Orchestrator 技能首次发布 - 设计并管理多智能体协作、任务路由与状态管理 - 包含智能体基类、任务分解与调度编排器、消息总线及智能体状态管理器 - 支持多种通信模式(广播、点对点、发布/订阅、黑板)与编排模式(角色扮演、辩论) - 提供智能体注册、并发执行、依赖管理与通信机制

Pending

安装命令

点击复制
官方npx clawhub@latest install agent-team-coordinator
镜像加速npx clawhub@latest install agent-team-coordinator --registry https://cn.longxiaskill.com

技能文档

功能说明

设计和管理多Agent协作系统。

架构模式

`` ┌─────────────┐ │ Orchestrator │ ← 任务分解、协调 └──────┬──────┘ │ ┌───┼───┐ ▼ ▼ ▼ ┌───┐┌───┐┌───┐ │ A ││ B ││ C │ ← 专业Agent └───┘└───┘└───┘ `

核心实现

1. Agent基类

`typescript interface AgentConfig { name: string; role: string; capabilities: string[]; llm: LLMConfig; tools: Tool[]; instructions: string; }

class BaseAgent { protected config: AgentConfig; protected memory: AgentMemory;

constructor(config: AgentConfig) { this.config = config; this.memory = new AgentMemory(config.name); }

async think(task: Task): Promise { const context = await this.memory.buildContext(task.description); const prompt = this.buildPrompt(task, context); const response = await this.callLLM(prompt); await this.memory.add({ type: 'semantic', content: task.description + ' -> ' + response.content, importance: 8 }); return response; }

protected buildPrompt(task: Task, context: string): Message[] { return [ { role: 'system', content: this.config.instructions }, { role: 'system', content: context }, { role: 'user', content: task.description } ]; }

protected async callLLM(messages: Message[]): Promise { const res = await fetch('https://api.openai.com/v1/chat/completions', { method: 'POST', headers: { 'Authorization': Bearer ${process.env.OPENAI_API_KEY} }, body: JSON.stringify({ model: this.config.llm.model, messages, tools: this.config.tools.map(t => t.definition) }) }); return res.json(); } } `

2. 编排器

`typescript interface TaskResult { agentId: string; status: 'pending' | 'running' | 'done' | 'failed'; output?: string; dependencies: string[]; startTime?: number; endTime?: number; }

class Orchestrator { private agents: Map = new Map(); private taskGraph: DAG;

constructor(private llmRouter: LLMRouter) {}

registerAgent(agent: BaseAgent) { this.agents.set(agent.config.name, agent); }

async execute(goal: string): Promise { // 1. 任务分解 const plan = await this.decompose(goal); // 2. 构建DAG this.taskGraph = this.buildDAG(plan); // 3. 执行调度 const results = await this.schedule(); // 4. 汇总结果 return this.summarize(goal, results); }

private async decompose(goal: string): Promise { const response = await this.llmRouter.route({ prompt: 将以下任务分解为可执行的子任务,返回JSON数组: 目标: ${goal} 要求:

  • 每个子任务只由一个Agent负责
  • 明确任务依赖关系
  • 返回格式: [{"id":"t1","description":"...","agent":"researcher","depends":[]},...]`,
system: '你是任务分解专家。' }); return JSON.parse(response.content); }

private async schedule(): Promise> { const results = new Map(); const pending = new Set(this.taskGraph.nodes); const running: Promise[] = []; const maxConcurrent = 3;

while (pending.size > 0 || running.length > 0) { // 启动可并行的任务 while (running.length < maxConcurrent) { const next = this.findNextRunnable(pending, results); if (!next) break; pending.delete(next.id); const p = this.runTask(next, results).catch(console.error); running.push(p); } // 等待一个完成 await Promise.race(running); running.splice(running.findIndex(p => false), 1); } return results; }

private async runTask(task: Task, results: Map) { results.set(task.id, { agentId: task.agent, status: 'running', dependencies: task.depends || [], startTime: Date.now() }); try { // 等待依赖完成 for (const depId of task.depends || []) { const dep = results.get(depId); if (dep?.status !== 'done') { await this.waitFor(depId, results); } } const agent = this.agents.get(task.agent); const context = this.buildContext(task, results); const response = await agent.think({ id: task.id, description: task.description, context }); results.set(task.id, { ...results.get(task.id)!, status: 'done', output: response.content, endTime: Date.now() }); } catch (error) { results.set(task.id, { ...results.get(task.id)!, status: 'failed', output: String(error), endTime: Date.now() }); } }

private buildContext(task: Task, results: Map): string { return (task.depends || []).map(depId => { const dep = results.get(d

数据来源ClawHub ↗ · 中文优化:龙虾技能库