|
复仇者们,集合! — 复杂任务由智能代理团队自动处理
用户: 复仇者集合![复杂任务描述]
复仇者集合!分析竞争对手A、B、C并生成对比报告
→ 自动执行:
1. 任务分解(3个调研 + 1个整合)
2. 生成3个代理(各负责一家公司)
3. 并行执行调研
4. 结果整合代理生成最终报告
5. 完成报告
┌─────────────────────────────────────────────────────────────────┐
│ 🦸 复仇者集合 │
├─────────────────────────────────────────────────────────────────┤
│ │
│ 1️⃣ 分析 — 任务分析与分解 │
│ └─ 明确目标 → 提取子任务 → 映射依赖关系 │
│ │
│ 2️⃣ 招募 — 组建代理团队 │
│ └─ 为每个子任务创建最优代理配置文件 │
│ └─ 代理角色: 🔬研究 🖊️撰写 🔍分析 ✅审核 🔧整合 │
│ │
│ 3️⃣ 部署 — 生成代理并分配任务 │
│ └─ 通过sessions_spawn并行执行 │
│ └─ 为每个代理指定明确的输入/输出 │
│ │
│ 4️⃣ 监控 — 跟踪进度 │
│ └─ 等待完成,失败时重试或替换 │
│ │
│ 5️⃣ 整合 — 合并结果 │
│ └─ 收集所有产出 → 验证 → 合并 │
│ │
│ 6️⃣ 报告 — 最终报告与清理 │
│ └─ 向用户传递结果,清理临时资源 │
│ │
└─────────────────────────────────────────────────────────────────┘
javascript
// 向现有代理传递任务
sessions_send({
label: watson, // 现有代理ID
message: 请调研X,
timeoutSeconds: 300
})
优点:
javascript
// 生成临时子代理
sessions_spawn({
task: 请分析X,
model: sonnet,
runTimeoutSeconds: 1800,
cleanup: delete
})
优点:
yaml
- name: research-bot # 研究专用机器人
specialty: [深度调研, 数据收集]
model: opus
- name: code-bot # 编码专用机器人
specialty: [开发, 测试]
model: opus
- name: creative-bot # 创意机器人
specialty: [设计, 内容]
model: gemini
机器人间通信:
javascript
// 向其他配置文件的机器人传递任务
sessions_send({
sessionKey: research-bot:main, // 配置文件:会话
message: 深度调研请求: X,
timeoutSeconds: 600
})
优点:
示例: 大规模竞争分析项目
┌─────────────────────────────────────────┐
│ 🟣 research-bot(独立机器人) │
│ └── 🔬 watson(代理)→ 调研A公司 │
│ └── 🔶 temp-1(生成)→ 调研B公司 │
├─────────────────────────────────────────┤
│ 🟣 code-bot(独立机器人) │
│ └── 💻 编写分析脚本 │
├─────────────────────────────────────────┤
│ 🔷 main(卡拉扬) │
│ └── 🔧 结果整合 + 生成报告 │
└─────────────────────────────────────────┘
yaml
profiles:
# 主机器人(编排者角色)
main:
role: orchestrator
canSpawn: true
canDelegate: true
# 研究专用机器人
research-bot:
role: specialist
specialty: [research, analysis, data]
model: anthropic/claude-opus-4-5
gateway: localhost:3001 # 独立端口
# 编码专用机器人
code-bot:
role: specialist
specialty: [coding, testing, debugging]
model: anthropic/claude-opus-4-5
gateway: localhost:3002
# 创意机器人
creative-bot:
role: specialist
specialty: [design, image, content]
model: google/gemini-2.5-pro
gateway: localhost:3003
javascript
// 1. 检查配置文件状态
const profiles = await checkProfileStatus([
research-bot,
code-bot,
creative-bot
])
// 2. 将任务分配给可用的配置文件
for (const task of tasks) {
const bestProfile = matchProfileToTask(task, profiles)
if (bestProfile.type === external) {
// 传递给其他机器人
await sendToProfile(bestProfile.name, task)
} else if (bestProfile.type === agent) {
// 传递给当前机器人的代理
await sessions_send({ label: bestProfile.agentId, message: task })
} else {
// 临时生成
await sessions_spawn({ task: task.description })
}
}
// 3. 等待所有配置文件完成
await waitForAllProfiles(assignedTasks)
// 4. 收集并整合结果
const results = await collectFromProfiles(assignedTasks)
| 类型 | 表情 | 角色 | 推荐模型 |
|---|---|---|---|
| 研究员 | 🔬 | 网络搜索,数据收集 | sonnet |
| 分析师 |
// 或使用agents_list()查看已注册的代理ID
agents_list()
yaml
agents:
watson:
type: researcher
specialty: 深度调研,竞争分析
priority: high
picasso:
type: creator
specialty: 图像生成,设计
priority: medium
coder-bot:
type: coder
specialty: 代码实现,调试
priority: high
任务分析时自动匹配合适的现有代理:
任务: 分析A公司竞争情况
→ watson (研究员,深度调研) ✅ 匹配
任务: 制作信息图表
→ picasso (创作者,设计) ✅ 匹配
任务: 编写API集成代码
→ coder-bot (程序员) ✅ 匹配
任务: 调研B公司(无专业代理)
→ 生成临时研究员 🔶
###
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 agent-avengers-1776350114 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 agent-avengers-1776350114 技能
skillhub install agent-avengers-1776350114
文件大小: 27.71 KB | 发布时间: 2026-4-17 13:52