Running a single OpenClaw agent is powerful. But running multiple specialized agents that work together? That's when things get serious.
This guide shows you how to architect a multi-agent OpenClaw system—from the folder structure to memory sharing to coordination patterns. By the end, you'll understand how companies like Riley Brown's are running 11+ agents to manage £500k+ businesses.
Why Multi-Agent?
A single OpenClaw agent can do everything—but that doesn't mean it should. Here's why you want specialized agents:
- Lower token costs: Each agent only loads the context it needs. An email agent doesn't need your Notion docs loaded.
- Better reliability: If one agent crashes, the others keep running.
- Clearer responsibility: "Email agent handles inbox, Research agent handles web lookups, Writer agent handles drafts."
- Easier debugging: When something breaks, you know exactly which agent to check.
- Parallel execution: Multiple agents can work simultaneously on different tasks.
Architecture Overview
A multi-agent OpenClaw system has three key components:
- Agent folders: Each agent gets its own
.openclaw/directory with SOUL.md, MEMORY.md, and skills - Shared memory: A central location where agents store information other agents need
- Orchestration layer: A coordinator that routes tasks to the right agent
Example: 3-Agent System
Let's build a simple system with three agents:
- Email Agent: Monitors inbox, drafts responses, flags urgent items
- Research Agent: Gathers information from web, compiles summaries
- Writer Agent: Creates blog posts, social content, documentation
Step 1: Folder Structure
Create separate directories for each agent:
~/agents/
├── email-agent/
│ ├── .openclaw/
│ │ ├── SOUL.md
│ │ ├── MEMORY.md
│ │ ├── AGENTS.md
│ │ └── skills/
│ └── workspace/
├── research-agent/
│ ├── .openclaw/
│ │ ├── SOUL.md
│ │ ├── MEMORY.md
│ │ ├── AGENTS.md
│ │ └── skills/
│ └── workspace/
├── writer-agent/
│ ├── .openclaw/
│ │ ├── SOUL.md
│ │ ├── MEMORY.md
│ │ ├── AGENTS.md
│ │ └── skills/
│ └── workspace/
└── shared/
├── memory/
├── tasks/
└── logs/Step 2: Configure Each Agent's SOUL.md
Each agent needs a clear identity and scope. Here's what Email Agent's SOUL.md looks like:
# Email Agent - SOUL.md
## Identity
You are the Email Agent. Your ONLY job is managing Dan's inbox.
## Responsibilities
- Check inbox every 30 minutes
- Draft responses to customer inquiries
- Flag urgent emails (investors, legal, complaints)
- Categorize newsletters vs actionable emails
- Log all interactions to shared/memory/email-log.md
## What You DON'T Do
- Don't research topics (that's Research Agent's job)
- Don't write blog posts (that's Writer Agent's job)
- Don't send emails without approval
## Shared Memory Access
- READ: shared/memory/contact-context.md (customer history)
- WRITE: shared/memory/email-log.md (all email activity)
- WRITE: shared/tasks/pending-research.md (research requests)
## Escalation Rules
- Investor emails → Flag immediately, notify via Telegram
- Legal emails → Flag immediately, do not respond
- Customer complaints → Draft empathetic response, flag for reviewNotice the clear boundaries. Email Agent knows exactly what it handles and what it passes to other agents.
Research Agent's SOUL.md
# Research Agent - SOUL.md
## Identity
You are the Research Agent. Your job is gathering information.
## Responsibilities
- Monitor shared/tasks/pending-research.md for requests
- Use web search, scraping, APIs to gather data
- Compile findings into concise summaries
- Store results in shared/memory/research-results/
- Log all research activities
## What You DON'T Do
- Don't monitor emails (that's Email Agent's job)
- Don't write final content (that's Writer Agent's job)
## Shared Memory Access
- READ: shared/tasks/pending-research.md (requests from other agents)
- WRITE: shared/memory/research-results/ (research findings)
- WRITE: shared/tasks/pending-writing.md (content requests)
## Output Format
All research results must include:
- Summary (3-5 bullet points)
- Key findings (detailed)
- Sources (URLs with access dates)
- Confidence level (High/Medium/Low)Writer Agent's SOUL.md
# Writer Agent - SOUL.md
## Identity
You are the Writer Agent. Your job is creating written content.
## Responsibilities
- Monitor shared/tasks/pending-writing.md for requests
- Write blog posts, social content, documentation
- Use research from shared/memory/research-results/
- Deploy drafts to review pages
- Log all writing activities
## What You DON'T Do
- Don't do original research (that's Research Agent's job)
- Don't manage emails (that's Email Agent's job)
## Shared Memory Access
- READ: shared/tasks/pending-writing.md (requests)
- READ: shared/memory/research-results/ (research data)
- WRITE: shared/memory/published-content.md (content log)
## Quality Standards
- All blog posts must be 1,500+ words
- Include real examples, not generic advice
- Add internal links to 3+ related pages
- Deploy to Netlify preview before marking completeStep 3: Shared Memory System
Agents coordinate through shared files. Here's the structure:
shared/
├── memory/
│ ├── contact-context.md # Customer history, preferences
│ ├── email-log.md # All email activity
│ ├── research-results/ # Research Agent outputs
│ │ ├── 2026-03-18-competitor-pricing.md
│ │ ├── 2026-03-17-seo-keywords.md
│ │ └── ...
│ └── published-content.md # What Writer Agent has published
├── tasks/
│ ├── pending-research.md # Research requests
│ ├── pending-writing.md # Writing requests
│ └── pending-emails.md # Emails needing responses
└── logs/
├── email-agent.log
├── research-agent.log
└── writer-agent.logExample: pending-research.md
# Pending Research Requests
## Request #1 (2026-03-18 10:30) - OPEN
**Requested by:** Email Agent
**Topic:** OpenClaw vs Make.com pricing comparison
**Context:** Customer asked about cost differences
**Priority:** Medium
**Deadline:** 2026-03-19
## Request #2 (2026-03-18 09:15) - IN PROGRESS
**Requested by:** Writer Agent
**Topic:** Top 10 OpenClaw use cases in e-commerce
**Context:** Blog post on OpenClaw for online stores
**Priority:** Low
**Deadline:** 2026-03-22
## Request #3 (2026-03-17 14:20) - COMPLETE
**Requested by:** Email Agent
**Topic:** Customer's website tech stack
**Results:** shared/memory/research-results/2026-03-17-customer-tech-stack.mdEach agent checks this file, picks up relevant requests, updates status, and stores results.
Step 4: Cron Jobs for Each Agent
Each agent runs on its own schedule:
# Email Agent - Every 30 minutes
*/30 * * * * cd ~/agents/email-agent && openclaw run
# Research Agent - Every hour
0 * * * * cd ~/agents/research-agent && openclaw run
# Writer Agent - Twice daily (9am, 5pm)
0 9,17 * * * cd ~/agents/writer-agent && openclaw runStep 5: Coordination Patterns
Agents coordinate through three patterns:
1. Task Handoff
Email Agent encounters a question it can't answer:
1. Email Agent appends to shared/tasks/pending-research.md
2. Research Agent sees new request, processes it
3. Research Agent writes results to shared/memory/research-results/
4. Research Agent appends to shared/tasks/pending-emails.md with research link
5. Email Agent picks up task, drafts response using research2. Memory Sharing
Writer Agent needs customer context before writing a case study:
1. Writer Agent reads shared/memory/contact-context.md
2. Finds customer's industry, pain points, results
3. Writes case study using real data
4. Updates shared/memory/published-content.md3. Broadcast Updates
Email Agent discovers a customer canceled their subscription:
1. Email Agent updates shared/memory/contact-context.md (status = churned)
2. Research Agent (next run) sees this, stops researching use cases for that customer
3. Writer Agent (next run) sees this, removes them from case study pipelineStep 6: Monitoring & Debugging
With multiple agents, you need visibility. Create a monitoring dashboard:
~/agents/monitor.sh
#!/bin/bash
echo "=== Multi-Agent Status ==="
echo ""
echo "Email Agent:"
tail -1 ~/agents/email-agent/shared/logs/email-agent.log
echo ""
echo "Research Agent:"
tail -1 ~/agents/research-agent/shared/logs/research-agent.log
echo ""
echo "Writer Agent:"
tail -1 ~/agents/writer-agent/shared/logs/writer-agent.log
echo ""
echo "Pending Tasks:"
grep "OPEN" ~/agents/shared/tasks/*.md | wc -l
echo ""Run this script daily to catch issues early.
Real-World Example: Riley Brown's 11-Agent System
Riley Brown runs a £500k+ business with 11 specialized agents:
- Inbox Agent: Customer support, sales inquiries
- Twitter Agent: Monitors mentions, drafts replies
- LinkedIn Agent: Posts content, engages with comments
- Research Agent: Competitor tracking, trend analysis
- SEO Agent: Keyword research, content optimization
- Writer Agent: Blog posts, case studies
- Data Agent: Analytics reporting, dashboard updates
- Sales Agent: Lead qualification, demo scheduling
- Product Agent: Feature requests, bug triage
- Finance Agent: Invoice tracking, expense categorization
- Orchestrator Agent: Routes tasks to the right agent
This system runs 24/7. Token cost? About £180/month for all 11 agents combined—less than one junior employee.
Advanced: The Orchestrator Pattern
For 5+ agents, add an Orchestrator Agent that routes tasks intelligently:
# Orchestrator Agent - SOUL.md
## Identity
You route incoming tasks to the right specialist agent.
## Routing Rules
- Email-related → Email Agent
- "Research X" → Research Agent
- "Write about X" → Writer Agent
- Ambiguous → Ask for clarification
## Process
1. Check shared/tasks/incoming.md every 15 minutes
2. For each task, determine which agent should handle it
3. Move task to the appropriate pending-X.md file
4. Log routing decision to shared/logs/orchestrator.logNow you have a central entry point. Add a task to incoming.md, and Orchestrator routes it automatically.
Token Cost Reality Check
Single agent handling everything: £240/month (loads full context every run, 50k tokens/session)
Three specialized agents: £85/month (Email: 10k tokens, Research: 15k tokens, Writer: 12k tokens)
Savings: 65%
Why? Each agent only loads what it needs. Email Agent doesn't need your entire knowledge base—just customer context and email templates.
Quick Start: 3-Agent System in 30 Minutes
- Create folder structure (5 mins)
- Write SOUL.md for each agent (10 mins)
- Set up shared/ directory with task files (5 mins)
- Add cron jobs (5 mins)
- Test with a simple task handoff (5 mins)
Start with Email + Research agents. Add Writer agent once the handoff pattern is working smoothly.
Troubleshooting
Agents aren't coordinating
Fix: Check file permissions. All agents need read/write access to shared/. Run chmod -R 755 ~/agents/shared/
Tasks get stuck in "OPEN" status
Fix: Check the receiving agent's SOUL.md. Does it know to check that task file? Add the file path to its "Responsibilities" section.
Agents duplicate work
Fix: Add task locking. When an agent picks up a task, it changes status from "OPEN" to "IN PROGRESS [Agent Name]". Other agents skip tasks marked IN PROGRESS.
Token costs are still high
Fix: Each agent should only load relevant context. If Email Agent is loading 40k tokens, its SOUL.md is too broad. Narrow the scope.
Want to Master Multi-Agent OpenClaw?
This guide covers the basics. The full OpenClaw Course includes:
- Advanced orchestration patterns (9 agents working together)
- Heartbeat monitoring (know when an agent fails)
- Cost optimization strategies (65-83% savings)
- Security hardening (prevent prompt injection)
- Gateway setup (control agents from your phone)
- Real configs from £500k+ businesses
Next Steps
Once you have a working multi-agent system:
- Add gateway control: Trigger agents from Telegram/Slack instead of just cron
- Implement heartbeat monitoring: Get alerted when an agent stops responding
- Create a mission control dashboard: Visualize agent activity in Notion
- Scale to 10+ agents: Add specialized agents for Twitter, LinkedIn, analytics, etc.
The pattern is the same—clear identity, shared memory, task handoffs. You can scale to 20+ agents using the same architecture.