Zurück zum Blog
Veröffentlicht am ·von 3 Click Claw Team·5 Min. Lesezeit

Spawning Agents in OpenClaw: Why, When, and How

Agent Spawning turns your AI assistant into a full team. Learn how to launch sub-agents for research, code, and content in parallel.

OpenClawSub-AgentsMulti-AgentAutomation
Spawning Agents in OpenClaw: Why, When, and How

You're working with your AI assistant on a task – and suddenly realize a sub-project could run in parallel. That's exactly what Agent Spawning in OpenClaw is for: you launch a new agent for an isolated task while your main agent keeps working.


What Is Agent Spawning?

Agent Spawning is your OpenClaw agent's ability to independently start sub-agents. Each sub-agent gets its own session, works in isolation, and reports results back – like a team member you hand a clearly defined task to.

The core idea: Your main agent is the conductor. Sub-agents are the specialists.

Property Main Agent Sub-Agent
Session Persistent, ongoing Isolated, temporary
Tool Access All tools All tools minus session tools
Can spawn further agents? Yes No (no chaining)
Result Direct chat Announced back to main chat

When Does a Sub-Agent Make Sense?

Not every task needs its own agent. Here are the scenarios where spawning truly pays off:

1. Deep Research You need a thorough analysis on a topic – but want to keep working in the meantime. Spawn a research agent that searches and summarizes in the background.

2. Code Tasks A sub-agent can write, test, and commit code – isolated in a sandbox without blocking your main workflow. Especially powerful with runtime: "acp" for full coding sessions with Claude Code or Codex.

3. Multi-Language Content A blog post needs to go live in three languages? Spawn three agents in parallel – one per language.

4. Data Processing Analyzing CSVs, evaluating PDFs, summarizing notes – all tasks a sub-agent can handle while you focus on what matters.

5. Specialized Agents with Different Models Your main agent runs on Sonnet for fast responses. For a particularly complex task, spawn a sub-agent with Opus – the best model for heavy lifting without slowing down your main chat.


How It Works: Step by Step

The Simple Way: Just Ask

You don't need to write code. Just tell your agent:

"Research the top 10 AI trends of 2026 in the background and summarize them."

Your agent decides whether to spawn a sub-agent or handle the task directly. For complex or time-intensive tasks, it will automatically spawn.

The Explicit Way: Full Control

When you want to steer exactly what happens:

"Spawn a sub-agent with Opus to create a detailed competitive analysis for our product."

You can specify:

  • Which model the sub-agent should use
  • Which reasoning level (for extra-thorough thinking)
  • Whether it runs in a sandbox (for safety with code execution)
  • Whether it appears in a thread (e.g., on Discord)

What Happens Under the Hood

  1. Your main agent calls sessions_spawn
  2. OpenClaw creates an isolated session
  3. The sub-agent works through the task
  4. On completion: the result is automatically posted to your chat
  5. The sub-agent session is archived after one hour

Multi-Agent Setup: Multiple Personalities

Spawning isn't just for temporary tasks. With OpenClaw's multi-agent setup, you can create permanent, specialized agents:

Example Setup:

  • Agent "Main" → Your personal assistant (Telegram, WhatsApp)
  • Agent "Coding" → Code specialist with sandbox (Discord, IDE)
  • Agent "Social" → Social media manager (Twitter, LinkedIn)
  • Agent "Research" → Deep analysis with Opus model

Each agent has its own workspace, skills, and personality. They can communicate via sessions_send – but only when you explicitly allow it.

Channel-Based Routing: You can define which agent responds on which channel:

  • WhatsApp → fast everyday agent (Sonnet)
  • Telegram → deep work agent (Opus)
  • Discord channel #code → coding agent with sandbox

Pro Tips

Start simple. You don't need a multi-agent setup to begin. Your single main agent can spawn sub-agents – that covers 90% of use cases.

Use threads on Discord. With thread: true, sub-agent results land in their own thread instead of cluttering the main chat.

Set timeouts. Especially for research tasks: a runTimeoutSeconds prevents a sub-agent from running forever.

Sandbox for code. When a sub-agent needs to execute code, use sandbox: "require". It can't break anything.

Different models for different jobs. Quick summaries? Sonnet. Deep analysis? Opus. Code generation? Claude Code via ACP. You decide per task.


Conclusion

Agent Spawning transforms your OpenClaw assistant from a single helper into an entire team. You stay the boss – the agent stays the conductor – and sub-agents do the work in the background.

The best part: you don't need to configure anything to get started. Just tell your agent what to handle in parallel. OpenClaw takes care of the rest.

Ready to build your agent team? Get started with OpenClaw and experience how a single assistant turns into an entire crew.