multi-agent-task-orchestrator
它能做什么
这个系统负责协调多个人工智能(智能体)的工作。它会把任务分配给合适的智能体,防止它们重复做同样的事,并在确认结果合格后才把任务标记为完成。
适用场景
- ✓你有 3 个或更多 AI 智能体需要共同完成一件复杂的事情时。
- ✓智能体开始重复劳动,或者彼此干扰时。
- ✓你需要清楚地知道谁在什么时候做了什么时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/multi-agent-task-orchestrator/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“组织好 AI 团队,帮我们做一份新应用的使用教程。”
每周 5 个新技能,1 分钟读完。
工作原理
系统首先会定义每个智能体能做什么、不能做什么。然后检查这项任务是否已经有其他智能体在做。最后把任务交给最合适的智能体,并检查结果的质量。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Multi-Agent Task Orchestrator
Overview
A production-tested pattern for coordinating multiple AI agents through a single orchestrator. Instead of letting agents work independently (and conflict), one orchestrator decomposes tasks, routes them to specialists, prevents duplicate work, and verifies results before marking anything done. Battle-tested across 10,000+ tasks over 6 months.
When to Use This Skill
- Use when you have 3+ specialized agents that need to coordinate on complex tasks
- Use when agents are doing duplicate or conflicting work
- Use when you need audit trails showing who did what and when
- Use when agent output quality is inconsistent and needs verification gates
How It Works
Step 1: Define the Orchestrator Identity
The orchestrator must know what it IS and what it IS NOT. This prevents it from doing work instead of delegating:
You are the Task Orchestrator. You NEVER do specialized work yourself.
You decompose tasks, delegate to the right agent, prevent conflicts,
and verify quality before marking anything done.
WHAT YOU ARE NOT:
- NOT a code writer — delegate to code agents
- NOT a researcher — delegate to research agents
- NOT a tester — delegate to test agents
This "NOT-block" pattern reduces task drift by ~35% in production.
Step 2: Build a Task Registry
Before assigning work, check if anyone is already doing this task:
import sqlite3
from difflib import SequenceMatcher
def check_duplicate(description, threshold=0.55):
conn = sqlite3.connect("task_registry.db")
c = conn.cursor()
c.execute("SELECT id, description, agent, status FROM tasks WHERE status IN ('pending', 'in_progress')")
for row in c.fetchall():
ratio = SequenceMatcher(None, description.lower(), row[1].lower()).ratio()
if ratio >= threshold:
return {"id": row[0], "description": row[1], "agent": row[2]}
return None
Step 3: Route Tasks to Specialists
Use keyword scoring to match tasks to the best agent:
AGENTS = {
"code-architect": ["code", "implement", "function", "bug", "fix", "refactor", "api"],
"security-reviewer": ["security", "vulnerability", "audit", "cve", "injection"],
"researcher": ["research", "compare", "analyze", "benchmark", "evaluate"],
"doc-writer": ["document", "readme", "explain", "tutorial", "guide"],
"test-engineer": ["test", "coverage", "unittest", "pytest", "spec"],
}
def route_task(description):
scores = {}
for agent, keywords in AGENTS.items():
scores[agent] = sum(1 for kw in keywords if kw in description.lower())
return max(scores, key=scores.get) if max(scores.values()) > 0 else "code-architect"
Step 4: Enforce Quality Gates
Agent output is a CLAIM. Test output is EVIDENCE.
After agent reports completion:
1. Were files actually modified? (git diff --stat)
2. Do tests pass? (npm test / pytest)
3. Were secrets introduced? (grep for API keys, tokens)
4. Did the build succeed? (npm run build)
5. Were only intended files touched? (scope check)
Mark done ONLY after ALL checks pass.
Step 5: Run 30-Minute Heartbeats
Every 30 minutes, ask:
1. "What have I DELEGATED in the last 30 minutes?"
2. If nothing → open the task backlog and assign the next task
3. Check for idle agents (no message in >30min on assigned task)
4. Relance idle agents or reassign their tasks
Examples
Example 1: Delegating a Code Task
[ORCHESTRATOR -> code-architect] TASK: Add rate limiting to /api/users
SCOPE: src/middleware/rate-limit.ts only
VERIFICATION: npm test -- --grep "rate-limit"
DEADLINE: 30 minutes
Example 2: Handling a Duplicate
User asks: "Fix the login bug"
Registry check: Task #47 "Fix authentication bug" is IN_PROGRESS by security-reviewer
Decision: SKIP — similar task already assigned (78% match)
Action: Notify user of existing task, wait for completion
Best Practices
- Always define NOT-blocks for every agent (what they must refuse to do)
- Use SQLite for the task registry (lightweight, no server needed)
- Set similarity threshold at 55% for anti-duplication (lower = too many false positives)
- Require evidence-based quality gates (not just agent claims)
- Log every delegation with: task ID, agent, scope, deadline, verification command
Common Pitfalls
- Problem: Orchestrator starts doing work instead of delegating Solution: Add explicit NOT-blocks and role boundaries
…
常见问题
如果某个智能体没有响应怎么办?
系统每 30 分钟检查一次是否有智能体处于空闲状态。如果有,就会重新分配任务,或者让该智能体继续执行。
它怎么保证工作质量?
它会检查文件是否被修改、测试是否通过、是否混入了密码之类的敏感信息,以及项目是否构建成功。
什么是“NOT-block”?
这是一条告诉智能体绝对不能做什么的指令,让它只专注于分派任务和检查结果,而不去亲自做专业性的工作。
详情
作者的原始描述
Route tasks to specialized AI agents with anti-duplication, quality gates, and 30-minute heartbeat monitoring
热度
- GitHub 星标
- 48k
- 排名
- #5259
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。