SKILL.md
Full skill instructions
claw-multi-agent ๐
Replace one AI with a team of AIs. Turn serial into parallel. Turn hours into minutes.
What can it do?
| Scenario | Example | Speedup |
|---|---|---|
| Parallel research | Search 5 frameworks simultaneously, each writes a report | ~65% โก |
| Multi-model compare | Ask Claude, Gemini, Kimi the same question at the same time | ~50% โก |
| Code pipeline | Plan โ Code โ Review, auto hand-off in sequence | Quality โ |
| Batch processing | Translate / analyze / summarize multiple docs in parallel | Scales linearly |
โก Get started in 30 seconds
Just say something like:
- "Research LangChain, CrewAI, and AutoGen in parallel"
- "Have multiple agents search these topics and write a combined report"
- "Compare how Claude and Gemini answer this question"
- "Use multi-agent mode to do this research"
๐ญ Interaction Style โ How to Talk to the User
This is the recommended pattern. Every multi-agent run must follow this interaction pattern.
Step 0 โ Announce skill activation FIRST
โ ๏ธ Iron rule: The activation announcement must be your FIRST reply after receiving the task โ before reading any files, before investigating, before spawning.
Why this matters: Reading files, researching background, and spawning all take time. If you do those first, users see long silence. Worse: context compression can happen during that time, and the announcement will never be sent.
Correct order: Receive task โ Send announcement immediately โ Then read files / spawn / wait
The very first thing to say when this skill is triggered โ before any planning or spawning:
๐ **claw-multi-agent ๅทฒๅค้**
ๅคๆบ่ฝไฝๅนถ่กๆจกๅผๅฏๅจ๏ผๆๆฅ็ปๅปบ Agent ๅฐ้ๅค็่ฟไธชไปปๅกใ
This tells the user the skill is active and sets expectations for what's about to happen.
Before spawning โ announce the plan
Right after the activation announcement, present the plan BEFORE calling sessions_spawn:
๐ [N]ไธชๆนๅๅๆถๅผๆ๏ผๅ
จ้ข่ฆ็ไฝ ็้ฎ้ขใ
๐ ไปปๅก่งๅ๏ผ
๐ ็ ็ฉถๅA๏ผGLM๏ผโ [ไธๅฅ่ฏไปปๅกๆ่ฟฐ]
๐ ็ ็ฉถๅB๏ผGLM๏ผโ [ไธๅฅ่ฏไปปๅกๆ่ฟฐ]
๐ ๅๆๅธ๏ผKimi๏ผโ ๅ
็ญๅ[N]ไธช็ปๆ๏ผๅ็ฌๅฌๅค๏ผnote when sequential๏ผ
ๆจกๅผ๏ผ๐ฏ ๆๆฅๅฎๆจกๅผ๏ผ่็ฝๆ็ดข๏ผ
้ข่ฎก่ๆถ๏ผ~[X]s๏ผ[N] Agent ๅนถ่ก[๏ผๅๆๅธไธฒ่ก่ท่ฟ]๏ผ
ๆญฃๅจๆดพๅบ Agent ๅฐ้...
Role emoji reference:
| Role | Emoji | Example |
|---|---|---|
| Researcher | ๐ | ๐ ็ ็ฉถๅA๏ผGLM๏ผโ Research XX |
| Analyst | ๐ | ๐ ๅๆๅธ๏ผKimi๏ผโ Deep comparison |
| Writer | โ๏ธ | โ๏ธ ๅไฝ่ ๏ผGemini๏ผโ Draft the report |
| Coder | ๐ป | ๐ป ็จๅบๅ๏ผKimi๏ผโ Implement the logic |
| Reviewer | ๐ | ๐ ๅฎกๆ ธๅ๏ผGLM๏ผโ Quality check |
| Planner | ๐ | ๐ ่งๅๅธ๏ผSonnet๏ผโ Break down tasks |
Key rules:
- โ Always list each agent with: emoji + role + model name + one-line task
- โ State the mode (ๆๆฅๅฎ/ๆตๆฐด็บฟ/ๆททๅ) and estimated time
- โ
End announcement with:
ๆญฃๅจๆดพๅบ Agent ๅฐ้... - โ Note sequential agents as: "ๅ ็ญๅNไธช็ปๆ๏ผๅ็ฌๅฌๅค"
- โ Never silently call sessions_spawn without announcing
While waiting โ brief note
After spawning, say one line:
โณ ๅญ Agent ๅทฒๅ
จ้จๅบๅ๏ผ็ญ็ปๆๅๆฅ...
After results โ structured output (not raw dump)
Never paste sub-agent raw output directly. Always digest and restructure by content logic โ NOT by agent order.
Recommended output order:
1. ๆง่ก็ป่ฎกๅก โ ๅ
่ฎฉ็จๆท็ฅ้่ทไบไปไน
2. ๆ ธๅฟ็ป่ฎบ๏ผ3-5ๆกๆ้่ฆๅ็ฐ๏ผโ ๆๆไปทๅผ็ๆพๆๅ้ข
3. ๅไธป้ขๅฑๅผ็ป่๏ผๆๅ
ๅฎน้ป่พ็ป็ป๏ผไธๆๅญAgent้กบๅบ๏ผโ ่ฏป่ตทๆฅๆฏไธ็ฏๅฎๆดๆ็ซ
4. ไธไธๆญฅ่กๅจๅปบ่ฎฎ โ ่ฝๅฐ็ปๅฐพ
็ป่ฎกๅกๆ ผๅผ๏ผ
## ๐ ๆง่ก็ป่ฎก
| Agent | ๆจกๅ | ่ๆถ | ็ถๆ |
|-------|------|------|------|
| ๐ ็ ็ฉถๅA | GLM | 58s | โ
|
| ๐ ็ ็ฉถๅB | GLM | 62s | โ
|
| ๐ ๅๆๅธ | Kimi | 45s | โ
|
ไธฒ่ก้่ฆ็บฆ 165s โ ๅนถ่กๅฎ้
62s๏ผ่็ **62%** โก
โ Wrong โ agent order:
ๅญAgent1็็ปๆ...
ๅญAgent2็็ปๆ...
ๅญAgent3็็ปๆ... โ ่ฏป่
่ฆ่ชๅทฑๆผๅพ๏ผไฝ้ชๅทฎ
โ Right โ content logic:
## ๆ ธๅฟ็ป่ฎบ
1. ๆ้่ฆๅ็ฐA๏ผๆฅ่ชๅคไธชAgent็ปผๅ๏ผ
2. ๆ้่ฆๅ็ฐB
...
## ่ฏฆ็ปๅๆ๏ผ[ไธป้ข1]
...๏ผๆดๅๆๆ็ธๅ
ณAgent็ๅ
ๅฎน๏ผ
## ่ฏฆ็ปๅๆ๏ผ[ไธป้ข2]
...
## ไธไธๆญฅๅปบ่ฎฎ
...
The main agent rewrites everything in its own words. Sub-agent outputs are raw material, not the final answer.
After results โ deliver the report (channel-aware)
Always save to file first. Then deliver based on the current channel.
# Step 1: Always save to file first
write("/workspace/projects/{topic-slug}/report.md", content)
Then choose delivery method by channel:
| Channel | Delivery method |
|---|---|
feishu + has feishu-all-operations skill | Create Feishu doc โ send link (best UX) |
| feishu + no Feishu skill | message(filePath=..., filename="report.md") โ send as attachment |
| Discord / Telegram / Slack | message(message=...) โ Markdown renders normally |
| Other / unknown | Save file + tell the user the path |
Why this matters: Feishu chat does NOT render Markdown. Sending raw Markdown text shows ##, |---| symbols. Always use attachment or doc link on Feishu.
# Feishu (no Feishu doc skill): send as attachment
message(action="send", filePath="/workspace/projects/{topic-slug}/report.md", filename="report.md")
# Discord/Telegram: send markdown directly
message(action="send", message=report_content)
End with one line:
้่ฆ่ฐๆดๆไธชๆนๅ๏ผๆๆจ้ๅฐ้ฃไนฆๆๆกฃๅ๏ผ
Rules:
- โ
Always save
.mdfile first โ regardless of channel - โ Check current channel before deciding how to send
- โ Never paste >300 words of Markdown text on Feishu โ it won't render
- โ Never just say "ๆฅๅๅทฒไฟๅญ่ณ /path/xxx" โ user can't open server paths
- โ Never ask "่ฆไธ่ฆๆๅธฎไฝ ๆด็ๆๆๆกฃ๏ผ" โ just do it
Sequential vs parallel โ analyst must wait for researchers
Critical: Agents spawned in the same round run in parallel and share NO context with each other.
โ Wrong: spawn researcher-A + researcher-B + analyst all at once
โ analyst has no data, returns empty
โ
Right:
Round 1: spawn researcher-A + researcher-B (parallel, independent)
Wait for both to return...
Round 2: main agent consolidates research results
โ then either: main agent writes analysis itself
โ or: spawn analyst with research results injected as context
Best practice: Any agent that depends on another agent's output should be spawned in a later round, after collecting the dependency.
๐ค Model Selection Guide โ Which Model for Which Role
Always pick the right model for each agent. State the model explicitly in the announcement.
Model roster
| ๆจกๅ | ๅซๅ | ็น็น | ้ๅ่ง่ฒ |
|---|---|---|---|
glm | GLM | ไพฟๅฎใ้ๅบฆๅฟซใไธญๆๅฅฝ | ๆ็ดขใ็ฎๅ่ฐ็ ใ็ถๆๆฃๆฅ |
kimi | Kimi | ้ฟไธไธๆ๏ผ128k๏ผใไปฃ็ ๅผบ | ๆทฑๅบฆๅๆใไปฃ็ ใ้ฟๆๆดๅ |
gemini | Gemini | ๅๆๅฅฝใๅคๆจกๆ | ๅไฝใๆๆกใๅพๅ็่งฃ |
sonnet | Claude Sonnet | ๅ่กกใๅทฅๅ ท่ฐ็จ็จณ | ๅคๆๆจ็ใ่งๅใๅฎกๆ ธ |
opus | Claude Opus | ๆๅผบๆจ็ | ๆๅคๆๅๆใๆถๆ่ฎพ่ฎก |
Role โ Model mapping (default)
| ่ง่ฒ | ้ป่ฎคๆจกๅ | ๅๅ |
|---|---|---|
| ๐ ็ ็ฉถๅ / Researcher | GLM | ่ฝป้ๆ็ดข๏ผๅค็จไธไพฟๅฎ |
| ๐ ๅๆๅธ / Analyst | Kimi | ้ฟไธไธๆ๏ผๅค็ๅคง้่ตๆ |
| โ๏ธ ๅไฝ่ / Writer | Gemini | ๅๆๅไฝๆๆๆๅฅฝ |
| ๐ป ็จๅบๅ / Coder | Kimi | ้ฟไธไธๆไปฃ็ ็่งฃ |
| ๐ ๅฎกๆ ธๅ / Reviewer | GLM | ็ฎๅๅคๆญ๏ผไธ้้็ฎ |
| ๐ ่งๅๅธ / Planner | Sonnet | ็ปๆๅ่งๅ่ฝๅๅผบ |
| ๐ง ๆน่ฏ่ / Critic | Sonnet | ้ป่พไธฅ่ฐจ๏ผๆๆๅ่ฎพ |
When to override defaults
- ไปปๅกๅพ็ฎๅ โ ้็บงๅฐ GLM๏ผ็ๆๆฌ๏ผ
- ้่ฆๆ้ซ่ดจ้ โ ๅ็บงๅฐ Opus
- ็จๆทๆ็กฎๆๅฎๆจกๅ โ ็ ง็จๆท่ฏด็ๆฅ
- ๅคๆจกๅๅฏนๆฏๅบๆฏ โ ๆฏไธช Agent ็จไธๅๆจกๅ๏ผๅจๅ ฌๅ้่ฏดๆ
Always announce the model
In the pre-spawn announcement, every agent line must include the model:
โ
่ฟๆ ท๏ผ๐ ็ ็ฉถๅA๏ผGLM๏ผโ ่ฐ็ LangChain
โ ่ฟๆ ท๏ผ๐ ็ ็ฉถๅA โ ่ฐ็ LangChain
Step 0: Always plan first (dynamic agent count)
Never hardcode how many agents to spawn. The right number depends on the task complexity. Always start with a planning step:
1. Analyze the task โ identify subtopics / dimensions
2. Decide: how many agents? which roles? which mode?
3. Spawn accordingly (could be 2, could be 10)
4. Consolidate results
Example planning output:
Task: "Research the top AI agent frameworks"
โ Plan: 5 researchers (one per framework) + 1 analyst for comparison
โ Mode: Orchestrator (needs web search)
โ Spawn: 5 parallel sub-agents
The number of agents should match the task, not a template.
Three modes โ auto-routed by intent
You don't need to say which mode. Just describe the task. The skill reads these two signals:
- Need web search / real-time info? โ use sessions_spawn (has tools)
- Want multiple draft versions to compare? โ spawn parallel writers
User says anything
โ
Wants multiple versions / drafts / angles?
YES โโโ Also needs web search?
โ YES โ ๐ Hybrid Mode (search first, then N drafts)
โ NO โ ๐ Pipeline Mode (N drafts in parallel, pure text)
โ
NO โโโ Needs web search / file ops?
YES โ ๐ฏ Orchestrator Mode (sessions_spawn, parallel)
NO โ ๐ Pipeline Mode (pure text, faster)
Trigger signals the skill listens for:
| Signal | Examples | Mode triggered |
|---|---|---|
| Multi-draft intent | "ๅ ไธช็ๆฌ", "ๅคไธช่งๅบฆ", "่ฎฉๆๆ", "ๅ่ชๅ", "different styles" | Pipeline or Hybrid |
| Search intent | "ๆ็ดข", "ๆๆฐ", "่ฐ็ ", "่็ฝ", "search", "latest" | Orchestrator or Hybrid |
| Both | "ๆ็ดขๅ็ปๆๅ ็ๆฅๅ", "research then write multiple drafts" | Hybrid |
| Neither | "็ฟป่ฏ", "ๅๆ", "ๅไฝ", plain text tasks | Pipeline |
You can also check with the router directly:
python scripts/router.py mode "ๆ็ดข็ซๅ่ตๆ๏ผๅธฎๆๅ3ไธช็ๆฌ็ๅๆ"
# โ ๐ HYBRID
python scripts/router.py mode "่ฐ็ LangChainๅนถๅไธไปฝๆฅๅ"
# โ ๐ฏ ORCHESTRATOR
python scripts/router.py mode "็จไธไธช่งๅบฆๅๆ่ฟไธชๆนๆก"
# โ ๐ PIPELINE
๐ฏ Orchestrator Mode (with tools, truly parallel)
Sub-agents launched via sessions_spawn. Each has full OpenClaw tools: web search, file read/write, code execution.
โก How parallelism works:
Call multiple sessions_spawn in the same tool-call round โ OpenClaw executes them simultaneously. All sub-agents run at once; the main agent collects all results when they finish.
Same round โ parallel execution:
sessions_spawn(task="Search LangChain...") โโโ
sessions_spawn(task="Search CrewAI...") โโโคโ all run simultaneously
sessions_spawn(task="Search AutoGen...") โโโ
sessions_spawn(task="Search LangGraph...") โโ
โ (all finish, main agent receives all 4 results)
Main agent consolidates โ writes full report
Sequential = spawn one, wait for result, then spawn next. Use this only when a later task depends on an earlier result (e.g. write report AFTER research is done).
How to spawn โ always include role, model hint, and what to return:
# Parallel research: spawn all 4 in the same round โ they run simultaneously
sessions_spawn({
"task": "[CONTEXT] Comparing AI agent frameworks for a tech team report.\n\n[YOUR TASK] Search LangChain: architecture, pros/cons, GitHub stars, latest version. Return 5 bullet points โค100 words each. Do NOT write a full report.",
"label": "๐ researcher-langchain [model: default]"
})
sessions_spawn({
"task": "[CONTEXT] Same report.\n\n[YOUR TASK] Search CrewAI: architecture, pros/cons, GitHub stars, latest version. Return 5 bullet points โค100 words each.",
"label": "๐ researcher-crewai [model: default]"
})
sessions_spawn({
"task": "[CONTEXT] Same report.\n\n[YOUR TASK] Search AutoGen: architecture, pros/cons, GitHub stars, latest version. Return 5 bullet points โค100 words each.",
"label": "๐ researcher-autogen [model: default]"
})
sessions_spawn({
"task": "[CONTEXT] Same report.\n\n[YOUR TASK] Search LangGraph: architecture, pros/cons, GitHub stars, latest version. Return 5 bullet points โค100 words each.",
"label": "๐ researcher-langgraph [model: default]"
})
# All 4 run in parallel โ when all return, main agent consolidates and writes report
Mixed: parallel then sequential (most common pattern):
# Phase 1: parallel research (spawn all at once)
sessions_spawn({"task": "[CONTEXT] ...\n\n[TASK] Search LangChain. 5 bullets โค100 words.", "label": "๐ researcher-langchain"})
sessions_spawn({"task": "[CONTEXT] ...\n\n[TASK] Search CrewAI. 5 bullets โค100 words.", "label": "๐ researcher-crewai"})
sessions_spawn({"task": "[CONTEXT] ...\n\n[TASK] Search AutoGen. 5 bullets โค100 words.", "label": "๐ researcher-autogen"})
# Phase 2: after all 3 return โ main agent writes report (sequential, depends on research)
# (main agent does this directly, no need to spawn a writer)
Key rules:
- โ Same round = parallel: spawn multiple agents at once for independent tasks
- โ Sequential: spawn one, wait for result, then spawn next โ only when tasks depend on each other
- โ Sub-agents return summaries only (โค100 words per point)
- โ Main agent writes the full report (avoids token limit failures)
- โ Label each agent clearly: role + what model it's using
- โ Don't ask a sub-agent to both search AND write a long report
๐ Pipeline Mode (pure text, any task)
Runs agents via Python CLI. No web search, but works for any pure-text task: writing, analysis, translation, multi-model comparison, brainstorming, code generation.
cd ~/.openclaw/skills/claw-multi-agent
# Parallel: multiple agents tackle different angles simultaneously
python run.py --mode parallel \
--agents "fast:๐ researcher:summarize the pros of microservice architecture" \
"fast:๐ researcher:summarize the cons of microservice architecture" \
"fast:๐ researcher:list real-world companies using microservices and outcomes" \
"smart:๐ analyst:compare microservices vs monolith for a 10-person startup" \
--aggregation synthesize
# Sequential: chain agents, each builds on the previous output
python run.py --mode sequential \
--agents "fast:๐ planner:break down how to build a REST API in Python" \
"smart:๐ป coder:implement the API based on the plan above" \
"fast:๐ reviewer:review the code for bugs and security issues" \
--aggregation last
# Auto-route: router classifies task and picks tiers automatically
python run.py --auto-route --task "write a technical blog post about GRPO vs PPO"
# Dry-run: preview the plan without executing
python run.py --dry-run \
--agents "fast:researcher:research X" "smart:writer:write report"
Pipeline mode works great for:
- Multi-angle analysis (spawn one agent per dimension)
- Multi-model comparison (same task, different models)
- Code pipeline (plan โ code โ review)
- Batch writing (translate/summarize N documents in parallel)
๐ Hybrid Mode (search + multi-draft)
Best of both worlds: sub-agents search the web (with tools), then multiple writers generate parallel drafts from the research.
When it kicks in: user wants both real-time research AND multiple versions to compare.
Phase 1 (Orchestrator โ with tools, parallel):
sessions_spawn(search topic A) โโโ
sessions_spawn(search topic B) โโโค โ all run simultaneously
sessions_spawn(search topic C) โโโ
โ research summaries collected
Phase 2 (Pipeline โ pure text, parallel):
openclaw agent (writer style 1) โโโ
openclaw agent (writer style 2) โโโค โ all run simultaneously
openclaw agent (writer style 3) โโโ
โ 3 draft versions returned
Main agent: compare drafts โ pick best or synthesize
CLI usage:
# Auto: router detects hybrid intent and runs both phases
python run.py --mode hybrid --task "่ฐ็ ไธปๆตAIๆกๆถ๏ผ็ปๆ3ไธชไธๅ้ฃๆ ผ็ๅฏนๆฏๆฅๅ" --num-drafts 3
# Auto-mode: let router decide the mode automatically
python run.py --auto-mode --task "ๆ็ดข็ซๅ่ตๆๅๅๅ ไธช็ๆฌ็ๅๆ"
In conversation (sessions_spawn approach):
# Phase 1: parallel research (spawn all at once)
sessions_spawn({"task": "[CONTEXT] ...\n\n[TASK] Search LangChain. 5 bullets.", "label": "๐ research-langchain"})
sessions_spawn({"task": "[CONTEXT] ...\n\n[TASK] Search CrewAI. 5 bullets.", "label": "๐ research-crewai"})
sessions_spawn({"task": "[CONTEXT] ...\n\n[TASK] Search AutoGen. 5 bullets.", "label": "๐ research-autogen"})
# After all 3 return โ Phase 2: main agent writes 3 draft versions itself
# (or spawn 3 pipeline agents with research as context)
Smart Router
Built-in task classifier. Auto-picks the right tier based on keywords:
python scripts/router.py classify "write a Python web scraper"
# โ Tier: CODE (routes to smart model)
python scripts/router.py classify "research the latest LLM papers"
# โ Tier: RESEARCH (routes to fast model)
python scripts/router.py spawn --json --multi "research X and write a report"
# โ splits into 2 tasks: RESEARCH + CREATIVE
| Tier | Model | Used for |
|---|---|---|
FAST | default (light) | Simple queries, status, translation, search |
CODE | default (smart) | Programming, debugging, implementation |
RESEARCH | default (light) | Research, search, compare, survey |
CREATIVE | default (smart) | Writing, articles, documentation |
REASONING | default (best) | Architecture, logic, complex analysis |
contextSharing: Give sub-agents background
Sub-agents start as fresh sessions โ they don't know your goal. Add a [CONTEXT] block.
Pattern 1: recent (recommended โ works for 95% of cases)
[CONTEXT] User is comparing AI agent frameworks for a team report. Audience: engineers.
[YOUR TASK] Search LangChain pros and cons. Return 5 bullet points โค100 words each.
Pattern 2: summary (sequential tasks โ pass prior results forward)
[PRIOR FINDINGS]
- LangChain: richest ecosystem, steep curve
- CrewAI: clean role separation...
[YOUR TASK] Based on above, search AutoGen. Return 3 unique points not covered above.
Pattern 3: full (complex background โ let agent read a file)
[CONTEXT FILE] Read /workspace/research/context.md for full background.
[YOUR TASK] Search latest Test-Time Compute Scaling advances. Return 3 summaries.
Reuse context across parallel agents:
BG = "Researching RL post-training for ML engineers. Topics: GRPO/DAPO/PPO, veRL."
sessions_spawn({"task": f"[CONTEXT] {BG}\n\n[TASK] Search GRPO vs PPO benchmarks. 5 bullets โค100 words.", "label": "๐ researcher-grpo [model: default]"})
sessions_spawn({"task": f"[CONTEXT] {BG}\n\n[TASK] Search DAPO design. 5 bullets โค100 words.", "label": "๐ researcher-dapo [model: default]"})
sessions_spawn({"task": f"[CONTEXT] {BG}\n\n[TASK] Search veRL architecture. 5 bullets โค100 words.", "label": "๐ researcher-verl [model: default]"})
Execution summary โ always output this
After every multi-agent run, print a standard card:
## ๐ Execution Summary
Mode: ๐ฏ Orchestrator Mode (sessions_spawn, with tools)
| Agent | Role | Model | Time | Status |
|-------|------|-------|------|--------|
| ๐ researcher-langchain | Researcher | default | 22s | โ
|
| ๐ researcher-crewai | Researcher | default | 19s | โ
|
| ๐ researcher-autogen | Researcher | default | 24s | โ
|
| ๐ researcher-langgraph | Researcher | default | 21s | โ
|
| โ๏ธ main (consolidate) | Writer | default | 38s | โ
|
Agents spawned: 4 | Parallel time: ~24s | Serial equivalent: ~86s | Saved: ~62s (72%)
Always include:
- Mode (Orchestrator / Pipeline + Sequential/Parallel)
- Each agent's role emoji + name + model used
- Actual elapsed time per agent
- Total parallel time vs serial equivalent
Preset roles
| Role | Emoji | Best for |
|---|---|---|
researcher | ๐ | Web search, info gathering |
writer | โ๏ธ | Reports, documentation, articles |
coder | ๐ป | Code writing, debugging, implementation |
analyst | ๐ | Data analysis, comparison, statistics |
reviewer | ๐ | Code / content review, QA |
planner | ๐ | Task planning, decomposition |
critic | ๐ง | Risk analysis, devil's advocate |
โ ๏ธ Gotchas
Gotcha 0: Reading files before announcing (most common mistake)
Investigating context before sending the activation announcement causes long silence and risks losing the announcement entirely due to context compression.
- โ Receive task โ read operators.py โ read README โ announce โ spawn
- โ Receive task โ announce immediately (can say "analyzing task...") โ read files โ spawn
Gotcha 1: Sub-agent output token limit
Sub-agents have a ~4096 token output cap. Exceeded โ tool args truncated โ file writes silently fail.
- โ "search AND write a 2000-word report"
- โ Sub-agent returns summaries; main agent writes the report
Gotcha 2: Orchestrator Mode has no tools in Pipeline Mode
python run.py processes have no web_search, exec, etc.
- โ Pipeline mode: "search the latest news on X"
- โ Anything needing real web access โ Orchestrator Mode
Gotcha 3: Parallel agents can't depend on each other
Agents spawned in the same round run simultaneously.
- โ Agent-2: "based on Agent-1's results..."
- โ Parallel = independent; sequential = chained
Gotcha 4: Don't hardcode agent count
Match agents to the task, not to a template.
- โ Always spawn exactly 3 agents
- โ Plan first, then decide: simple task โ 2 agents, complex โ 8+ agents
Pipeline mode quick reference
python run.py
--mode parallel|sequential
--agents "tier_or_model:๐ญrole:task description" # repeatable, any number
--aggregation synthesize|compare|concatenate|last
--timeout 300
--dry-run # preview without executing
--auto-route # router picks tiers automatically
--list-models # show current model config
| Aggregation | Effect |
|---|---|
synthesize | Main agent summarizes all outputs (default) |
compare | Side-by-side of each agent's output |
concatenate | Outputs joined in order |
last | Final agent's output only (sequential) |
