- Home
- Skills
- Agents & Orchestration
- Subagent Orchestration
Works with the AI Agents you already use
Subagent Orchestration
Best practices for delegating work to sub-agents , when to spawn one vs. work inline, how to write self-contained prompts, orchestration patterns, and how to author reusable agent-type definitions.
$10
Subagent Orchestration
Example session with this skill installed
I need to audit our entire mono-repo for hardcoded AWS credentials. Use the sub-agent orchestration skill to plan a parallel search and synthesis.
- Read your context and instructions
- Compiled the subagent orchestration
I will coordinate a parallel discovery workflow to sweep the repository for hardcoded AWS credentials. I am spawning four specialized sub-agents to scan high-risk directories concurrently, followed by a synthesis step to deduplicate findings.
Orchestration Plan: AWS Credential Audit
| Phase | Agent Role | Scope | Pattern |
|---|---|---|---|
| Discovery | secret-finder-1 | /src/services & /src/api | Fan-out |
| Discovery | secret-finder-2 | /config & /.github | Fan-out |
| Discovery | secret-finder-3 | /infra & /scripts | Fan-out |
| Discovery | secret-finder-4 | Root & all .env, .yml, .json | Fan-out |
| Synthesis | audit-synthesizer | Merge & Verify Discovery Output | Pipeline |
Sub-agent Prompt Template (Discovery)
Task: Identify hardcoded AWS credentials (access keys, secret keys, session tokens).
Scope: Search files in [TARGET_PATH] for patterns matching 'AKIA', 'secret_key', 'aws_access_key'.
Constraints: Return ONLY a list of file paths and line numbers. Do not attempt to fix.
Return Format:
- path/to/file.ext:line_number -> [Type of match]
Next steps
- Review the generated list of potential credential leaks from the synthesis agent.
- Initiate a targeted rotation for any confirmed production keys found.
- Apply the
Completeness criticpattern to ensure no naming conventions were missed in the initial sweep.
Connects securely to your tools. The creator never sees your data.
About this skill
Scaling agentic workflows requires moving beyond monolithic context windows. This skill provides the architectural framework for sub-agent orchestration, teaching your agent when to delegate tasks, how to manage parallel execution, and how to maintain context hygiene. It solves the twin problems of context bloat from broad repository sweeps and the high latency of serial task execution.
What it does
- Delegation logic provides a clear framework for deciding between inline work and sub-agent spawning based on task size and payload.
- Orchestration patterns defines structures for fan-out maps, multi-stage pipelines, adversarial verification, and judge panels.
- Context management maintains clean parent contexts by isolating large-but-disposable intermediate outputs in sub-agent windows.
- Reusable definitions establishes standards for naming, system prompting, and tool-scoping recurring agent personas.
How it works
- Analyze the task to determine if the work is large to perform but small to report, or if it can be parallelized.
- Brief the sub-agent using the included self-contained prompt templates to ensure the child has all necessary paths and constraints.
- Execute the pattern, choosing between parallel barriers for combined results or pipelines for independent multi-stage flow.
- Synthesize the return, treating sub-agent output as raw data to be filtered and summarized for the user.
Frameworks & tools
This skill is framework-agnostic, designed for use with any harness featuring a Task, Agent, or Workflow tool primitive. It includes specific guidance for OpenAI mini-models and Hermes-based delegation.
Why this beats prompting it yourself
Most agents over-delegate trivial tasks or under-delegate massive sweeps that drown their context in noise. This skill provides the specific "effort dial" and "one-line test" logic needed to optimize for both token cost and wall-clock time.
Use cases
- Repository-wide discovery to map architectural patterns across hundreds of files without hitting context limits.
- Parallel code reviews where independent files in a large PR are audited concurrently by specialized reviewer sub-agents.
- Adversarial verification to spawn a skeptic agent that audits a proposed solution before it is finalized.
- Log and test triage to extract specific failures from thousands of lines of output without polluting the main chat history.
Known limitations
Sub-agents share no memory and cannot coordinate mid-flight, making them unsuitable for tasks with tight turn-by-turn dependencies. Coordination overhead may exceed the benefits for tasks requiring fewer than three tool calls.
Sub-agents lack shared memory and cannot coordinate mid-flight. Not suitable for tasks with tight turn-by-turn dependencies or trivial operations under three tool calls.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 26 days ago