$ ssh clawdbot.space --loading...
$ ssh clawdbot.space --loading...
Orchestrate multiple AI agents that collaborate, delegate, and specialize — from dual-agent basics to enterprise swarms.
A single OpenClaw agent is powerful. Multiple agents working together are transformative. This guide shows you how to set up agent teams where each member has a distinct role — a researcher, a coder, a scheduler — communicating through structured protocols and sharing context intelligently.
Each agent focuses on what it does best. A coding agent doesn't need browsing skills, and a research agent doesn't need file system access.
Multiple agents can work simultaneously on different subtasks, dramatically reducing total completion time.
Each agent has its own context window. No single agent gets overwhelmed with too much information.
Route simple tasks to cheaper models (Haiku) and complex reasoning to expensive ones (Opus). Save 40-60% on API costs.
One coordinator agent delegates to specialist agents. Best for structured workflows. The coordinator uses Sonnet/Opus, specialists use Haiku.
Coordinator → [Research Agent, Code Agent, Summary Agent]Agents pass work sequentially. Agent A researches, Agent B writes, Agent C reviews. Good for content creation workflows.
Research → Writer → Reviewer → PublisherAgents communicate directly with each other. More complex to configure but most flexible. Best for creative/exploratory tasks.
Agent A ↔ Agent B ↔ Agent CDefine agents in AGENTS.md with distinct roles and tools
# AGENTS.md - Define your agent team ## coordinator role: You are the coordinator. Delegate research to @researcher. model: claude-sonnet-4-20250514 tools: [delegate, memory] ## researcher role: You research topics thoroughly using web browsing. model: claude-haiku-4-20250514 tools: [browse, search]
Verify both agents are registered
openclaw agents list
Test that the coordinator correctly delegates to the researcher
openclaw message --agent coordinator "Research the latest OpenClaw security updates"
Agents communicate via typed message channels. Use @agent-name to address specific agents. Messages include context, priority, and expected response format.
Use a shared memory.md or SQLite database for facts that all agents need. Each agent can read but only write to its own section.
For async workflows, use the built-in task queue. Agents pick up tasks based on their role and availability.
| Role | Model | Cost | Reason |
|---|---|---|---|
| Coordinator / Decision-maker | Claude Opus | $$$ | Complex reasoning, planning, and delegation decisions |
| Core task executor | Claude Sonnet | $$ | Balanced performance for most tasks |
| Simple/repetitive tasks | Claude Haiku | $ | Fast, cheap. Summaries, formatting, data extraction |
| Heartbeat / Status checks | Gemini Flash | ¢ | Near-zero cost for routine health checks |