Triggers when the master Agent faces a multi-step complex task and is deciding whether / how to outsource sub-tasks to built-in subagents (browser / doc-editor / data-analyst / extractor / canvas-designer / coder, etc.). **Not for**: single-step Q&A / reads / simple side effects (master Agent handles directly), or scenarios where `Agent` is already confirmed and `subagent_type` is known.
63
75%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./apps/server/src/ai/builtin-skills/agent-orchestration/en/SKILL.mdThe master Agent can dispatch built-in or custom subagents on demand via the Agent tool, outsourcing specialized sub-tasks. This skill answers four questions: when to delegate, to whom, how to invoke, and what the system constraints are.
| Tool | Responsibility | Read-only |
|---|---|---|
Agent | Launches a built-in or custom subagent by subagent_type to handle a multi-step complex task | No |
Loading:
Agentis a core tool — always available, noToolSearchactivation required.
User message →
├─ Simple Q&A / chat / read / query / single-step side effect (create event, send email, create project) → master Agent handles directly
└─ Multi-step complex task →
├─ Web interaction (click/fill form/login/screenshot/paginated scraping) → browser
├─ Rich text / long document editing (Markdown, DOCX, PDF) → doc-editor
├─ Spreadsheet data analysis / chart generation → data-analyst
├─ Structured extraction from PDF / images / web pages → extractor
├─ Canvas node operations / layout → canvas-designer
├─ Code writing / debugging (global mode only; in project mode the PM does it themselves) → coder
└─ Mixed task → master Agent decomposes, then delegates to multiple subagents sequentially or in parallelDon't "delegate everything": simple Q&A, single-step operations, and pure reads should be handled directly by the master Agent. Delegation itself introduces context-passing overhead and extra steps — for small tasks the cost outweighs the benefit.
Each subagent has its own system prompt and tool set, with step counts tuned to the task profile.
| Subagent | When to trigger | Tool set | Steps |
|---|---|---|---|
| 📝 doc-editor | Rich text / Markdown / Word / PDF editing, long-document rewriting | Write, Read, Glob | 15 |
| 🌐 browser | Page navigation, DOM interaction, form filling, screenshots, paginated scraping | browser-*, WebSearch | 20 |
| 📊 data-analyst | CSV/Excel cleaning, statistical computation, ECharts/Mermaid charts | Read, Write, Bash | 15 |
| 🔍 extractor | PDF/image OCR, table extraction, multi-document comparison extraction | Read, office-read, WebFetch | 10 |
| 🎨 canvas-designer | Node add/remove/update, auto layout, text-to-canvas conversion | canvas-*, canvas-read | 15 |
| 💻 coder | Multi-language code writing / review / debugging | Write, Read, Grep, Glob, Bash | 20 |
Agent { description: "Scrape product table from site A", prompt: "...", subagent_type: "browser" }| Parameter | Purpose |
|---|---|
description | Short title, shown to the user as progress |
prompt | The full instruction handed to the subagent |
subagent_type | Subagent type |
| subagent_type | Scenario | Capabilities |
|---|---|---|
general-purpose | General tasks (default) | Full tool set |
explore | Codebase/doc exploration, read-only analysis | Read-only tools |
plan | Solution design, produce an implementation plan | Read-only tools |
| Any of the 6 built-in subagent names above | Specialized tasks | Tool set defined per subagent |
| Custom Agent name | A registered specialized Agent | Tool set defined by that Agent |
The Agent tool waits synchronously by default for the subagent to complete and return — after calling, you immediately get the output and proceed to the next step; no extra wait tool needed.
When a subagent is already running but needs additional instructions or a course correction:
SendMessage { toolCallId: "agent-xxx", message: "Additional requirement: output results in JSON format" }SendMessage auto-resumes a stopped agent — no need to recreate via Agent, avoiding the cost of re-passing the full context.
When sub-tasks are independent of each other, issue multiple Agent calls in the same turn; each returns synchronously, and the master Agent aggregates:
Master Agent decomposes task → issues in parallel:
Agent { description: "Scrape site A", subagent_type: "browser", prompt: "..." }
Agent { description: "Scrape site B", subagent_type: "browser", prompt: "..." }
Agent { description: "Scrape site C", subagent_type: "browser", prompt: "..." }
↓ Each returns synchronously: A / B / C
Master Agent aggregates → final responseGood for parallel: sub-tasks are independent and parallelism meaningfully shortens total runtime. Not for parallel: later tasks depend on earlier tasks' output (serial dependency); total count exceeds the concurrency limit of 4 and needs batching.
Subagents automatically inherit from the master Agent:
email-ops)This means you don't need to repeat environment information in the prompt — the subagent can derive it from inherited context.
| Limit | Value | Rationale |
|---|---|---|
| Max delegation depth | 2 (master → sub; sub cannot spawn further) | Each level copies context — deeper nesting grows token consumption exponentially; also avoids cascading failures that are hard to diagnose |
| Max concurrency | 4 subagents | Balance point between response speed and system resources (memory, API connections) |
| Auto cleanup | 5 minutes | Completed Agents are auto-removed from memory to prevent accumulation leaks |
| Hard step limit | Master 200 / Sub 10-20 | Sub values as listed above; Master has a larger budget for coordination work |
Subagent streaming output is pushed to the frontend via data-sub-agent-start / delta / chunk / end events. Each toolCallId corresponds to one independent stream, supporting multiple concurrent subagents streaming simultaneously. State transitions: output-streaming → output-available | output-error.
Agent when one already exists: use SendMessage to append instructions and reuse the existing context.a1ab5be
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.