闲社服务运行正常AI智能体自动化平台
s

多智能体编排

技能标识:swarms-ai

Build and orchestrate multi-agent AI systems using the Swarms API. Use when creating single agents, multi-agent swarms (sequential, concurrent, hierarchical, mixture-of-agents, majority voting, graph workflows), launching agent tokens on Solana, integrating ATP payment protocol, publishing to Swarms Marketplace, using sub-agent delegation, streaming responses, or building any multi-agent orchestration pipeline. Covers Python, TypeScript, and cURL.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

多智能体编排

Swarms AI — 多智能体编排

使用 Swarms API 平台构建生产级多智能体系统。支持单智能体、推理智能体以及3至10,000+智能体的群体,提供20多种架构模式。

快速参考

  • - 基础URL: https://api.swarms.world
  • 认证: 使用来自 swarms.world/platform/api-keys 的API密钥,通过 x-api-key 请求头传递
  • 文档索引: https://docs.swarms.ai/llms.txt
  • Python SDK: pip install swarms-client
  • 市场: swarms.world

架构层级

层级名称智能体数量端点
1单智能体1/v1/agent/completions
2
推理智能体 | 1-2(内部) | /v1/reasoning-agent/completions | | 3 | 多智能体群体 | 3–10,000+ | /v1/swarm/completions |

工作流程

1. 单智能体

python
import requests

payload = {
agent_config: {
agent_name: MyAgent,
description: 智能体的用途,
system_prompt: 你是...,
model_name: gpt-4o, # 或 claude-sonnet-4-20250514 等
role: worker,
max_loops: 1,
max_tokens: 8192,
temperature: 0.5,
autogenerateprompt: False,
toolslistdictionary: None
},
task: 你的任务在此
}

response = requests.post(
https://api.swarms.world/v1/agent/completions,
headers={x-api-key: API_KEY, Content-Type: application/json},
json=payload
)

2. 多智能体群体

python
payload = {
name: 我的群体,
description: 该群体的功能,
agents: [
{
agent_name: Agent1,
description: 角色1,
system_prompt: 你是...,
model_name: gpt-4o,
role: worker,
max_loops: 1,
max_tokens: 8192,
temperature: 0.5
},
{
agent_name: Agent2,
description: 角色2,
system_prompt: 你是...,
model_name: claude-sonnet-4-20250514,
role: worker,
max_loops: 1,
max_tokens: 8192,
temperature: 0.5
}
],
max_loops: 1,
swarm_type: SequentialWorkflow, # 参见架构表
task: 你的任务在此
}

response = requests.post(
https://api.swarms.world/v1/swarm/completions,
headers={x-api-key: API_KEY, Content-Type: application/json},
json=payload
)

3. 代币发布(Solana)

python
payload = {
name: 我的智能体代币,
description: 智能体描述,
ticker: MAG,
private_key: [1,2,3,...] # Solana钱包私钥
}

response = requests.post(
https://swarms.world/api/token/launch,
headers={Authorization: Bearer API_KEY, Content-Type: application/json},
json=payload
)

返回: tokenaddress, pooladdress, listing_url


成本: ~0.04 SOL

可用的群体架构

使用 swarm_type 参数:

类型描述最佳用途
SequentialWorkflow线性管道,每个智能体基于前一个构建逐步处理
ConcurrentWorkflow
并行执行 | 独立任务,追求速度 |
| AgentRearrange | 动态智能体重排 | 自适应工作流 |
| MixtureOfAgents | 专家智能体选择 | 多领域任务 |
| MultiAgentRouter | 智能任务路由 | 大规模分发 |
| HierarchicalSwarm | 带委托的嵌套层级 | 复杂组织结构 |
| MajorityVoting | 跨智能体共识 | 决策制定 |
| BatchedGridWorkflow | 网格模式执行 | 多任务×多智能体 |
| GraphWorkflow | 智能体节点的有向图 | 复杂依赖关系 |
| GroupChat | 智能体讨论 | 协作头脑风暴 |
| InteractiveGroupChat | 实时智能体交互 | 动态协作 |
| AutoSwarmBuilder | 自动生成最优群体 | 不确定架构时 |
| HeavySwarm | 高容量处理 | 大型工作负载 |
| DebateWithJudge | 结构化辩论 | 对抗性评估 |
| RoundRobin | 轮询分发 | 均匀负载分配 |
| MALT | 多智能体学习 | 训练系统 |
| CouncilAsAJudge | 专家小组评估 | 质量评估 |
| LLMCouncil | 语言模型委员会决策 | 群体决策 |
| AdvancedResearch | 研究工作流 | 深度研究 |
| auto | 自动选择最佳类型 | 默认/未知情况 |

智能体配置参数

参数类型默认值描述
agent_name字符串—唯一智能体标识符
description
字符串 | — | 智能体用途 | | system_prompt | 字符串 | — | 行为指令 | | model_name | 字符串 | gpt-4.1 | AI模型(gpt-4o、claude-sonnet-4-20250514等) | | role | 字符串 | worker | 智能体在群体中的角色 | | max_loops | 整数/字符串 | 1 | 迭代次数(auto表示自主) | | max_tokens | 整数 | 8192 | 最大响应长度 | | temperature | 浮点数 | 0.5 | 创造力(0.0–2.0) | | autogenerateprompt | 布尔值 | false | 自动增强系统提示 | | toolslistdictionary | 列表 | — | OpenAPI风格工具定义 | | streaming_on | 布尔值 | false | 启用SSE流式传输 | | mcp_url | 字符串 | — | MCP服务器URL | | selected_tools | 列表 | 全部安全 | 限制可用工具 |

规则

  • - 始终使用环境变量存储API密钥——切勿硬编码。
  • 设置适当的 maxloops——仅在需要子智能体委托时使用 auto。
  • 根据用例匹配 swarmtype(参见架构表)。
  • 如需流式传输,设置 streaming_on: true 并解析SSE事件(元数据→数据块→使用情况→完成)。
  • 代币发布从提供的钱包中消耗约0.04 SOL。
  • 批量端点(/v1/swarm/batch/completions)需要Pro/Ultra/Premium层级。
  • 推理智能体(/v1/reasoning-agent/completions)需要Pro+层级。

资源映射

主题参考
完整API架构与层级references/architecture.md
子智能体委托模式
references/sub-agents.md | | ATP支付协议(Solana) | references/atp-protocol.md | | 市场发布 | references/marketplace.md | | 流式传输实现 | references/streaming.md | | 工具集成 | references/tools.md | | 所有文档页面 | https://docs.swarms.ai/llms.txt |

仅在任务需要特定深度时阅读参考文档。

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 credit-mastery-1776295743 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 credit-mastery-1776295743 技能

通过命令行安装

skillhub install credit-mastery-1776295743

下载

⬇ 下载 swarms-ai v1.0.0(免费)

文件大小: 9.83 KB | 发布时间: 2026-4-16 17:21

v1.0.0 最新 2026-4-16 17:21
- Initial release of Swarms AI skill for building and orchestrating multi-agent systems via Swarms API.
- Supports single agents and large-scale swarms (3–10,000+ agents) with 20+ architecture patterns.
- Includes quick-start and reference for individual agents, multi-agent swarms, and Solana token launches.
- Details parameters for agent configuration, swarm types, authentication, and integration best practices.
- Provides a resource map for deeper guides on API architecture, tool integration, streaming, tokenization, and marketplace features.
返回顶部