跳到正文
cccskills
免费在 GitHub 公开中文介绍

Swarm Orchestration

通过agentic-flow让多个AI智能体分工,安排并行任务和有先后依赖的流程,并协调信息共享、负载均衡及失败后的任务重分配。

原文查看原文说明

Orchestrate multi-agent swarms with agentic-flow for parallel task execution, dynamic topology, and intelligent coordination. Use when scaling beyond single agents, implementing complex workflows, or building distributed AI systems.

AI 评分80分/ 100查看安装方法

适用场景

  • 并行开发API、界面和测试
  • 衔接从设计到审查的各个阶段
  • 在不同智能体间共享API规范
  • 智能体失败后重新分配任务

中文介绍

功能

使用agentic-flow让多个AI智能体分担工作。支持成员地位对等的协作结构、由统筹者指挥的层级结构,以及根据任务切换结构的方式。既能让独立任务并行执行,也能安排需要等待前序工作完成的分阶段流程。

适用场景

适合将API开发、界面制作和测试交给不同智能体,或衔接从设计到审查的各个阶段。通过共享内存统一规范和任务状态,并调整负载分配,减少工作量不均。还涵盖智能体失败后的重试与任务重分配,以及处理速度和成功率的检查。

使用示例

  • “并行推进API实现、界面制作和测试编写。”
  • “按照依赖关系执行设计、实现、测试和审查。”
  • “在各智能体间共享API规范,并重新分配失败的任务。”

注意事项

需要agentic-flow v1.5.11+和Node.js 18+。建议先从两到三个智能体开始,使用共享内存和协作钩子,并设置超时时间,避免任务一直停滞。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

客观评估

AI 仅根据 SKILL.md 的内容,从 4 个方面进行了评估。星标数和热度不计入评估。

指令清晰度能否看出何时使用、做什么
A良好明确面向单个智能体难以承担的工作,并说明并行执行与层级协作。
步骤具体性步骤、输入输出和示例是否具体
A良好提供从swarm-init到task-orchestrate的命令,以及共享内存和重试配置示例。
安全性发送数据、删除文件、执行命令等是否有说明
B部分不足通过npx启动智能体并执行任务,但未说明执行权限或事前确认。
安装难易度所需工具和 API 密钥是否少且有说明
B部分不足列出agentic-flow和Node.js的所需版本,但没有安装步骤。

总分按每项 A=25 分、B=15 分、C=5 分相加。 由 AI(OpenAI Codex)于 2026年10月21日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(1)

  • SKILL.md4.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Swarm Orchestration

What This Skill Does

Orchestrates multi-agent swarms using agentic-flow's advanced coordination system. Supports mesh, hierarchical, and adaptive topologies with automatic task distribution, load balancing, and fault tolerance.

Prerequisites

  • agentic-flow v1.5.11+
  • Node.js 18+
  • Understanding of distributed systems (helpful)

Quick Start

# Initialize swarm
npx agentic-flow hooks swarm-init --topology mesh --max-agents 5

# Spawn agents
npx agentic-flow hooks agent-spawn --type coder
npx agentic-flow hooks agent-spawn --type tester
npx agentic-flow hooks agent-spawn --type reviewer

# Orchestrate task
npx agentic-flow hooks task-orchestrate \
  --task "Build REST API with tests" \
  --mode parallel

Topology Patterns

1. Mesh (Peer-to-Peer)

// Equal peers, distributed decision-making
await swarm.init({
  topology: 'mesh',
  agents: ['coder', 'tester', 'reviewer'],
  communication: 'broadcast'
});

2. Hierarchical (Queen-Worker)

// Centralized coordination, specialized workers
await swarm.init({
  topology: 'hierarchical',
  queen: 'architect',
  workers: ['backend-dev', 'frontend-dev', 'db-designer']
});

3. Adaptive (Dynamic)

// Automatically switches topology based on task
await swarm.init({
  topology: 'adaptive',
  optimization: 'task-complexity'
});

Task Orchestration

Parallel Execution

// Execute tasks concurrently
const results = await swarm.execute({
  tasks: [
    { agent: 'coder', task: 'Implement API endpoints' },
    { agent: 'frontend', task: 'Build UI components' },
    { agent: 'tester', task: 'Write test suite' }
  ],
  mode: 'parallel',
  timeout: 300000 // 5 minutes
});

Pipeline Execution

// Sequential pipeline with dependencies
await swarm.pipeline([
  { stage: 'design', agent: 'architect' },
  { stage: 'implement', agent: 'coder', after: 'design' },
  { stage: 'test', agent: 'tester', after: 'implement' },
  { stage: 'review', agent: 'reviewer', after: 'test' }
]);

Adaptive Execution

// Let swarm decide execution strategy
await swarm.autoOrchestrate({
  goal: 'Build production-ready API',
  constraints: {
    maxTime: 3600,
    maxAgents: 8,
    quality: 'high'
  }
});

Memory Coordination

// Share state across swarm
await swarm.memory.store('api-schema', {
  endpoints: [...],
  models: [...]
});

// Agents read shared memory
const schema = await swarm.memory.retrieve('api-schema');

Advanced Features

Load Balancing

// Automatic work distribution
await swarm.enableLoadBalancing({
  strategy: 'dynamic',
  metrics: ['cpu', 'memory', 'task-queue']
});

Fault Tolerance

// Handle agent failures
await swarm.setResiliency({
  retry: { maxAttempts: 3, backoff: 'exponential' },
  fallback: 'reassign-task'
});

Performance Monitoring

// Track swarm metrics
const metrics = await swarm.getMetrics();
// { throughput, latency, success_rate, agent_utilization }

Integration with Hooks

# Pre-task coordination
npx agentic-flow hooks pre-task --description "Build API"

# Post-task synchronization
npx agentic-flow hooks post-task --task-id "task-123"

# Session restore
npx agentic-flow hooks session-restore --session-id "swarm-001"

Best Practices

  1. Start small: Begin with 2-3 agents, scale up
  2. Use memory: Share context through swarm memory
  3. Monitor metrics: Track performance and bottlenecks
  4. Enable hooks: Automatic coordination and sync
  5. Set timeouts: Prevent hung tasks

Troubleshooting

Issue: Agents not coordinating

Solution: Verify memory access and enable hooks

Issue: Poor performance

Solution: Check topology (use adaptive) and enable load balancing

Learn More

  • Swarm Guide: docs/swarm/orchestration.md
  • Topology Patterns: docs/swarm/topologies.md
  • Hooks Integration: docs/hooks/coordination.md

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

add-model-descriptions

免费有简介AI 评分 80分

对照HuggingFace router的模型列表与chat-ui配置,研究尚未收录的模型,编写简短英文说明,并同步添加到生产和开发配置。

  • 添加路由中新上线的模型
  • 用简短说明概括模型特点
  • 同步更新生产和开发环境的模型信息
ruvnet/ruflo7.8万2026年10月20日 更新

adr-create

免费有简介AI 评分 80分

为技术选型和设计决策创建ADR文档,沿用现有文件的连续编号,生成模板并登记到AgentDB,同时为找到的相关历史决策添加链接和依赖关系。

  • 记录采用某项技术的理由
  • 记录API或数据模型变更
  • 将基础设施决策形成文档
ruvnet/ruflo7.8万2026年10月20日 更新

adr-index

免费有简介AI 评分 90分

读取记录架构决策及其原因的ADR,创建并更新搜索索引和依赖关系图。支持两种文档格式,并汇总引用与状态的不一致情况。

  • 导入其他项目的ADR后建立索引
  • 同步文件与关系图
  • 为现有代码库开始管理ADR
ruvnet/ruflo7.8万2026年10月20日 更新

adr-reindex

免费有简介AI 评分 70分

删除ADR设计决策记录或关系信息后,清空并重建索引,移除残留的旧条目,再核对当前文件数与索引记录数是否一致;也可预览重建内容而不作更改。

  • 删除ADR文件后重建索引
  • 删除ADR关系后清理残留记录
  • 定期核对并重建ADR索引
ruvnet/ruflo7.8万2026年10月20日 更新

adr-review

免费有简介AI 评分 80分

将代码差异与记录已采纳设计决策的ADR进行核对,整理违反决策、引用过时记录及缺少相关记录的变更,并提出代码修正或决策调整建议。

  • 合并PR前检查设计决策
  • 核对重大变更与设计决策
  • 查找对已被替代ADR的引用
ruvnet/ruflo7.8万2026年10月20日 更新

adr-verify

免费有简介AI 评分 90分

检查已保存的架构决策记录(ADR),报告失效引用、替代关系中的循环和状态不一致问题,适合导入后的校验与发布前的数据检查。

  • 检查ADR导入后的数据一致性
  • 在持续集成中检测不一致问题
  • 发布前检查已保存的ADR数据
ruvnet/ruflo7.8万2026年10月20日 更新

查看 ruvnet 的全部技能

报告此技能的问题