← 返回 Skills 市场
staok

Agency Agents Router

作者 Staok · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ 安全检测通过
78
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install agency-agents-router
功能描述
Orchestrate multiple configured agents by classifying tasks, resolving ambiguities, selecting appropriate agents, planning execution, and aggregating results.
使用说明 (SKILL.md)

Agency Agents Router -- Route and orchestrate specialized agents

Repo:Staok/agency-agents-router-skill.

Overview

If openclaw.json has multiple agents configured under agents.list, this skill discovers them and orchestrates appropriate agents for any given task.

In a default OpenClaw setup, only the main agent's prompt is active. Other configured agents are invisible. Agent Router solves this by injecting agent awareness and orchestration logic into the main agent's prompt.

Prerequisites

This skill is the router — the agent definitions must be installed separately. Without them, agents.json will be empty and no orchestration can happen.

User (manual): Install agency-agents-zh agents, then restart gateway:

git clone https://github.com/jnMetaCode/agency-agents-zh.git
cd agency-agents-zh
./scripts/convert.sh --tool openclaw
./scripts/install.sh --tool openclaw

# Restart OpenClaw gateway
openclaw gateway restart

Agent (auto): After user confirms installation, the agent runs:

cd ~/.openclaw/workspace/skills/agency-agents-router
python3 scripts/rebuild_index.py --clone

Then verifies agents appear in ~/.openclaw/openclaw.json under agents.list.

If agents.json is missing or empty, the agent MUST first check whether agency-agents-zh is installed. If not, instruct the user with the manual steps above. Do NOT attempt to orchestrate without agents.

How It Works

The main agent, equipped with this skill, becomes an orchestrator:

  1. Receive a task description
  2. Classify the task intent using the Task Archetypes table — this determines the agent selection strategy
  3. Detect ambiguity: if the task crosses archetype boundaries, ask ONE clarifying question (audience, genre, format, depth) then proceed
  4. Pre-research: for factual or time-sensitive tasks, the orchestrator should do live web searches first to ground agents in current reality, not stale training data
  5. Look up agents.json to find matching agents based on the clarified intent
  6. Design an execution plan: which agents to run, in what order, with what dependencies
  7. Execute via sessions_spawn(agentId=xxx, mode="run"); domain-expert agents should be prompted to use web_search / web_fetch for factual grounding
  8. Aggregate results and present to the user

Research Protocol: Prefer Live Web Data

For factual, time-sensitive, or comparative tasks, agents should rely on live web data rather than training data alone.

When to search the web

Scenario Who searches
Factual claims, current data, time-sensitive topics Orchestrator (pre-research) + domain agents
Comparison / ranking / landscape surveys Orchestrator (pre-research) + domain agents
Research & Analysis or Content Creation archetypes Domain agents
Technical Writing with version-specific details Domain agents

Pre-research (orchestrator)

Before dispatching agents for factual tasks: 2-3 web_search queries → web_fetch 2-3 key sources → include findings in sub-agent prompts.

Sub-agent prompt boilerplate

Prefer web_search/web_fetch for latest information over training data.
Cite URLs and dates for factual claims.
Mark unverifiable items as "[待确认]".

CRITICAL: Classify BEFORE selecting agents

Do NOT jump from "receive task" directly to "look up agents". Without first classifying the task archetype, the same keyword ("write an analysis article") will be interpreted inconsistently — sometimes as research, sometimes as content creation. Step 2 (classification) is mandatory. Step 3 (ambiguity check) is mandatory when keywords span archetypes.

Task Archetypes

Every task MUST be classified into one of these archetypes BEFORE agent selection. The archetype determines the primary agent role and whether domain-expert agents play lead or supporting roles.

Archetype Typical Keywords Agent Selection Strategy Example
Content Creation write article, blog post, essay, deep-dive, long-form, copywriting, storytelling Lead: narrative/creative agents. Supporting: domain experts for fact-checking. "Write a deep-dive article about AI Agent trends"
Research & Analysis analyze, research, investigate, evaluate, feasibility, industry report, market study Lead: research + domain experts. Multi-perspective parallel. "Analyze the feasibility of an AI note-taking app"
Technical Writing technical docs, README, API docs, design docs, spec Lead: technical writer. Supporting: relevant engineering roles. "Write API documentation for this service"
Engineering review code, fix bug, refactor, optimize, implement feature Lead: language/framework-specific engineer. Supporting: security, testing. "Review this PR for security and performance"
Product Design design, UI, UX, prototype, product spec, wireframe Lead: product manager or designer. Supporting: UX researcher. "Design a SaaS pricing page"
Business Strategy business plan, pricing, go-to-market, funding, monetization Lead: product manager or strategist. Supporting: finance, marketing. "Plan a go-to-market strategy for a B2B SaaS"
Code Generation write code, build, implement, scaffold, create app Lead: language/framework-specific engineer (single agent typically). "Build a REST API with FastAPI"
Multi-Perspective Audit review holistically, due diligence, full assessment Lead: domain-general coordinator. Parallel specialists. "Full technical due diligence on this startup"

Decision Heuristic

When the task says "write an article about X analysis", ask yourself:

  • Is the primary goal to inform and engage a broad audience? → Content Creation (narrative agents lead, domain experts support)
  • Is the primary goal to produce a structured, evidence-heavy report for decision-makers? → Research & Analysis (domain experts lead)
  • Is the audience implied by the user's profile? If the user is a content creator → Content Creation. If the user is an engineer → Research & Analysis. But still confirm if ambiguous.

Ambiguity Detection & Clarification Protocol

Trigger Keywords

These keywords frequently span multiple archetypes. When detected, the orchestrator MUST ask for clarification before selecting agents:

Ambiguous Keyword Possible Archetypes What to Clarify
"analysis article" / "deep analysis article" Content Creation OR Research & Analysis Target audience? Publishing channel?
"design" / "design a solution" Product Design OR Engineering OR Business Strategy What kind of design?
"evaluate" / "assess" Research & Analysis OR Engineering From which perspective?
"plan" / "proposal" Business Strategy OR Product Design OR Engineering Plan for what?
"build" / "create" Code Generation OR Product Design OR Content Creation Build what exactly?

Clarification Protocol

When ambiguity is detected:

  1. Identify the ambiguous dimension(s): audience? genre? format? depth? technical level?
  2. Ask that resolves all ambiguity at once — do not ask multiple rounds
  3. Frame the question to reveal the archetype: "Is this for a general-audience publication (Content Creation) or a technical decision-making report (Research)?"
  4. If the user's profile strongly suggests one archetype, still confirm if ambiguity crosses the Content/Research boundary

Bad (multiple rounds):

"Who is the audience?" → wait → "What format?" → wait → "How technical?"

Good (single round):

"Target audience and channel for this article? e.g., general readers on Zhihu/WeChat (Content Creation route), or technical decision-makers as an internal report (Research route)?"

Orchestration Patterns

Pattern 1: Single Agent

A task clearly falls under one agent's expertise. Spawn directly.

User: "Review this C++ code for bugs"
  Archetype: Engineering
  -> engineering-code-reviewer

Pattern 2: Parallel (Independent Agents)

Spawn multiple agents simultaneously for independent subtasks.

User: "Review this PR"
  -> engineering-code-reviewer (code quality)
  -> engineering-security-engineer (security audit)
  -> testing-performance-benchmarker (performance check)
  All three run in parallel, results merged at the end.

Pattern 3: Sequential / Pipeline

Agent B depends on Agent A's output. Spawn A first, feed result into B.

User: "Design and document this API"
  -> engineering-software-architect (design the API)
  -> engineering-technical-writer (document the design)

Pattern 4: DAG (Directed Acyclic Graph)

Complex workflows with parallel branches and merge points.

User: "Technical design review for a new feature"
  -> engineering-software-architect (system design)
     +-> engineering-security-engineer (security review)  --+
     +-> engineering-backend-architect (backend review)  ----+-> product-manager (summary)
     +-> engineering-database-optimizer (schema review)  ----+

Pattern 5: Multi-Perspective Analysis (Research)

Multiple disciplinary perspectives for evidence-heavy analysis. Domain experts should web-search for current data.

User: "Is an AI-powered note-taking app viable?"
  Pre-research: orchestrator web-searches market landscape
  -> product-trend-researcher (market analysis)
  -> engineering-software-architect (technical feasibility)
  -> finance-financial-forecaster (cost/revenue modeling)
  -> marketing-seo-specialist (go-to-market analysis)

Pattern 6: Content Creation

Narrative design + audience psychology + platform-aware execution. Domain experts play supporting roles (fact-checking, background research), NOT lead roles.

User: "Write a deep-dive article about AI Agent trends"
  Pre-research: orchestrator web-searches current landscape
  -> domain expert (background research — web-search for latest)
  -> academic-narratologist (story arc, hooks, rhythm)
  -> academic-psychologist (reader psychology, engagement)
  -> marketing-content-creator (platform voice, shareability)

  Workflow: orchestrator pre-research → domain expert FIRST (live web search) →
            creative agents in PARALLEL → synthesizer produces final draft.

Key distinction from Pattern 5 (Research):

Dimension Pattern 5 (Research) Pattern 6 (Content Creation)
Primary goal Evidence, accuracy, completeness Engagement, readability, impact
Domain experts Lead role Supporting role (fact-check only)
Output format Structured report with sections Narrative with hooks, flow, voice
Success metric Decision-makers can act on it Readers finish it and share it

Agent Index

The lookup table in agents.json maps every configured agent to:

Field Description
agentId Agent ID in openclaw.json — used with sessions_spawn
name_zh Chinese name (from agency-agents-zh README)
description Detailed capability summary extracted from agent .md frontmatter
expertise Key skills (from README table)
scenario Use case (from README table)
section Department grouping

Data sources: agency-agents-zh (194 agents) + agency-agents upstream (21 agents).

Usage Commands

Command Description
/agents List all agents grouped by department
/agents \x3Cdept> Filter by department
/agent search \x3Ckeyword> Search agents by keyword
/agent \x3Cid> \x3Ctask> Explicitly invoke one specific agent

For most tasks, no command is needed. Describe the task naturally and the main agent will determine the orchestration plan.

sessions_spawn Usage

sessions_spawn(agentId="\x3CagentId>", task="\x3Ctask description>", mode="run")
  • Sub-agents execute in their own workspace
  • Results return to the main session automatically
  • Multiple spawn calls without inter-dependencies can be invoked in parallel (single turn)
  • Dependent calls: spawn, wait for result, then spawn the next

Maintenance

# Rebuild with local agency-agents-zh repo:
python3 scripts/rebuild_index.py --repo /path/to/agency-agents-zh

# Auto-clone and rebuild from scratch:
python3 scripts/rebuild_index.py --clone --fetch

Credits

安全使用建议
Install this only if you want your main OpenClaw agent to route ordinary natural-language tasks to other installed agents. Review the third-party agency-agents package before installing it, and be mindful that delegated tasks may share the task context with multiple sub-agents and may use web search for factual work.
能力标签
crypto
能力评估
Purpose & Capability
The stated purpose is to discover configured OpenClaw agents and orchestrate them with sessions_spawn; the README, SKILL.md, agents.json, and rebuild script consistently support that purpose.
Instruction Scope
The skill uses broad natural-language activation and automatic agent selection, but this is prominently disclosed as the core feature and includes task classification and ambiguity-clarification guidance.
Install Mechanism
Installation requires cloning this skill and separately installing third-party agency-agents definitions; the included rebuild script may clone or fetch from the documented GitHub source and regenerate agents.json.
Credentials
The script reads ~/.openclaw/openclaw.json, scans a local or cloned agent repository, writes agents.json and a README cache, and uses network only for documented fetch/clone actions; these are proportionate to building the agent index.
Persistence & Privilege
The skill persists as an installed OpenClaw skill and generated index, and requires a gateway restart, but it does not install a hidden background process, request credentials, or modify unrelated files.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agency-agents-router
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agency-agents-router 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
**Added prerequisite checks and installation guidance for agent routing functionality.** - Introduced a new "Prerequisites" section: explains that agent definitions (e.g., agency-agents-zh) must be installed before routing can work. - Added user and agent installation steps with commands for installing and verifying agents. - Clarified that the router must check for installed agents before attempting orchestration, and instruct the user if none are found. - No functional changes to routing or orchestration logic.
v1.0.1
**Summary:** This version adds "live web data" protocol for all research and factual tasks, with detailed guidance on when and how to use web search and web fetch in agent orchestration. - Introduced a research protocol emphasizing the use of live web data for factual, time-sensitive, and comparative tasks. - Added "pre-research" step: orchestrator runs 2–3 web searches and fetches before dispatching agents for factual tasks. - Updated agent orchestration process and sub-agent prompt boilerplate to require current sources and explicit citation of URLs and dates. - Clarified when orchestrator vs. domain agents should use web_search/web_fetch. - Improved orchestration pattern descriptions for clarity and completeness.
v1.0.0
- Initial release of Agency Agents Router skill. - Enables the main agent to discover and orchestrate other agents listed in openclaw.json. - Introduces task classification using defined archetypes before agent selection to ensure role consistency. - Implements ambiguity detection and a single-step clarification protocol for tasks that span multiple archetypes. - Supports orchestration patterns: single agent, parallel, sequential, and DAG-based workflows for task execution. - Aggregates outputs from selected agents and presents a unified result to the user.
元数据
Slug agency-agents-router
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Agency Agents Router 是什么?

Orchestrate multiple configured agents by classifying tasks, resolving ambiguities, selecting appropriate agents, planning execution, and aggregating results. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 78 次。

如何安装 Agency Agents Router?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agency-agents-router」即可一键安装,无需额外配置。

Agency Agents Router 是免费的吗?

是的,Agency Agents Router 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Agency Agents Router 支持哪些平台?

Agency Agents Router 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agency Agents Router?

由 Staok(@staok)开发并维护,当前版本 v1.0.2。

💬 留言讨论