How to Use OpenClaw Sub-Agents — Parallel Automation 2026 Guide
Learn how OpenClaw sub-agents work: spawning parallel workers, orchestrating multi-step tasks, and building powerful multi-agent workflows.
Sub-agents are one of OpenClaw's most powerful features — they let your main agent spawn isolated workers to handle specific tasks in parallel, then collect and synthesize results. Here's how they work and when to use them.
What is a Sub-Agent?
A sub-agent is a temporary, isolated OpenClaw session spawned by your main agent. Each sub-agent runs independently with its own context window, auto-announces completion back to the parent agent, and is automatically cleaned up after the task completes.
When to Use Sub-Agents
- Analyzing multiple documents simultaneously
- Running different experiments in parallel
- Delegating specialized tasks (one agent for research, one for writing)
- Long-running work that shouldn't block the main agent
- Tasks requiring fresh context without accumulated history
Spawning Sub-Agents via Slack
"Spawn a sub-agent to analyze our three competitors:
- competitor-a.com, competitor-b.com, competitor-c.com
Research each one's pricing, features, and recent news.
Compile into a comparison report at ~/research/competitor-analysis-$(date +%Y-%m-%d).md
Post summary to #marketing when done."Parallel Document Processing
"I have 5 PDFs in ~/documents/reports/. Spawn sub-agents to analyze in parallel — one per PDF. Each should:
1. Extract key metrics and findings
2. Identify top 3 actionable insights
3. Save summary to ~/documents/summaries/[filename]-summary.md
Once all 5 complete, synthesize into a master summary and post to Slack."Multi-Stage Pipeline
"Run a 3-stage content pipeline:
Stage 1: Spawn research sub-agent — find top 5 trending AI topics.
Save findings to ~/pipeline/research.md.
Stage 2: Once done, spawn writing sub-agent — read research.md and write 5 tweet drafts per topic. Save to ~/pipeline/tweets.md.
Stage 3: Review tweets and post top 10 to #marketing for approval."Cron-Triggered Sub-Agent Work
openclaw cron add \
--name "hex-weekly-research" \
--schedule "0 8 * * 1" \
--agent main \
--task "Spawn parallel sub-agents:
1. Scan r/technology and r/MachineLearning for trending topics
2. Check top Hacker News posts from the past week
3. Search for competitor news (see TOOLS.md)
Each saves findings to ~/research/weekly/[source]-$(date +%Y-%m-%d).md
Synthesize all three and post briefing to #hex-ops."Monitoring Sub-Agents
openclaw agents list # Check active sub-agents
openclaw agents logs sub-id # See what a sub-agent is doing
openclaw agents kill sub-id # Kill a runaway sub-agentGet the complete setup guide in The OpenClaw Playbook — everything you need to master OpenClaw for $9.99.
Frequently Asked Questions
How many sub-agents can OpenClaw run at once?
No hard limit, but your LLM provider's rate limits and server resources are practical constraints. Running 3-5 sub-agents in parallel is common. More than 10 simultaneously may hit rate limits with most providers.
Do sub-agents share the same workspace files as the main agent?
Sub-agents inherit the parent workspace directory by default, enabling data handoff — a research sub-agent writes findings, a writing sub-agent reads and processes them.
Can sub-agents spawn their own sub-agents?
Yes, up to a configured depth limit (default 2 levels). This enables complex orchestration trees. Keep hierarchies shallow where possible to manage complexity and debugging.
Get The OpenClaw Playbook
The complete operator's guide to running OpenClaw. 40+ pages covering identity, memory, tools, safety, and daily ops. Written by an AI with a real job.