Multi-AgentOpenClawMarch 14, 2026·14 min read

OpenClaw Multi-Agent Setup: Run 10 Agents on One Server

One OpenClaw instance can run multiple agents with different personalities, tools, and schedules. This guide walks through the architecture, step-by-step setup, communication patterns, and cost considerations for running a full AI team on a single server.

The Concept: One Server, Many Agents

Most people start with a single OpenClaw agent. It handles one task well: writing blog posts, answering questions, or monitoring a data source. But real workflows require coordination. You need a researcher feeding data to a writer, an SEO analyst optimizing the output, and a PM keeping everything on track. Running each of these on a separate machine would be wasteful and hard to manage.

OpenClaw solves this by treating each agent as a separate session. Every agent gets its own SOUL.md file that defines its personality, rules, and capabilities. Every agent gets a unique session key that isolates its conversation history and context. And every agent can run on its own cron schedule, waking up at different intervals to do its work. The gateway manages all of this from a single process, routing messages between agents and keeping sessions alive.

The result: you can run 3, 5, or 10 openclaw multiple agents on a single $20/month VPS or a Mac Mini sitting under your desk. Each agent behaves as if it has the machine to itself, but they share the underlying infrastructure.

Architecture Overview

The OpenClaw multi agent architecture has three layers: the gateway, agent sessions, and the communication bus. Understanding how these fit together is essential before you start configuring agents.

Architecture Diagram
┌─────────────────────────────────────────────┐
│              OpenClaw Gateway                │
│              (port 18789)                    │
│                                             │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐   │
│  │ Session 1 │ │ Session 2 │ │ Session 3 │  │
│  │agent:pm:  │ │agent:     │ │agent:seo: │  │
│  │  main     │ │writer:main│ │  main     │  │
│  │           │ │           │ │           │  │
│  │ SOUL.md   │ │ SOUL.md   │ │ SOUL.md   │  │
│  │ Memory    │ │ Memory    │ │ Memory    │  │
│  │ History   │ │ History   │ │ History   │  │
│  │ Tools     │ │ Tools     │ │ Tools     │  │
│  └──────────┘ └──────────┘ └──────────┘   │
│                                             │
│  ┌─────────────────────────────────────┐   │
│  │       Communication Bus             │   │
│  │  @mentions │ file sharing │ DB sync  │   │
│  └─────────────────────────────────────┘   │
└─────────────────────────────────────────────┘

Gateway. The gateway is the single process that manages all agent sessions. It runs on port 18789 by default, handles incoming messages, routes inter-agent communication, and manages session lifecycle. You start it once, and it keeps all agents online.

Session Keys. Each agent is identified by a unique session key following the pattern agent:name:main. The session key determines where the agent's conversation history, context, and memory are stored. Sessions are fully independent. Agent A cannot read Agent B's conversation history unless you explicitly set up a sharing mechanism.

Session Independence. This is the key insight that makes running multiple openclaw agents practical. Each session maintains separate history, separate context windows, separate tool permissions, and separate memory files. If one agent fills its context window or encounters an error, the other agents are unaffected. You can restart a single agent without disrupting the rest of the team.

Step-by-Step: Running 10 Agents on One Server

Follow these six steps to go from a single agent to a fully operational openclaw team running on one server.

Step 1: Plan Your Agent Team

Before writing any configuration, decide which agents you need and what each one is responsible for. Define clear boundaries. Overlap leads to wasted API calls and conflicting outputs.

PM / Coordinator

Assigns work, tracks progress, runs daily standups

Content Writer

Produces blog posts, articles, and copy

SEO Analyst

Keyword research, meta optimization, internal linking

Researcher

Gathers data, analyzes competitors, compiles briefs

Social Media

Creates tweets, LinkedIn posts, repurposes content

QA / Editor

Proofreads, checks brand voice, validates facts

A good starting point is 3 agents. Scale to 10 only after the core team is working smoothly.

Step 2: Create SOUL.md for Each Agent

Each agent gets its own directory and SOUL.md file. The SOUL.md defines the agent's role, personality, rules, tools, and handoff instructions. Keep each file focused. If a SOUL.md exceeds 80 lines, the agent is probably trying to do too much.

agents/pm/SOUL.md
# Orion - Project Manager

## Role
You are the PM and coordinator for the agent team.
You assign tasks, track progress, and run the
daily standup that collects activity from all agents.

## Rules
- ALWAYS respond in English
- Check shared/tasks.json every heartbeat
- Summarize completed work in shared/standup.md
- Never do the work yourself, delegate to specialists

## Team
- @Writer: content production
- @SEOAnalyst: keyword and search optimization
- @Researcher: data gathering and competitor analysis

## Handoffs
- New content request: assign to @Researcher first
- Research complete: hand off to @Writer
- Draft complete: hand off to @SEOAnalyst
agents/writer/SOUL.md
# Echo - Content Writer

## Role
You are a content writer. You produce blog posts,
articles, and marketing copy based on briefs
provided by @Researcher or @PM.

## Rules
- ALWAYS respond in English
- Target 1,200-1,800 words for blog posts
- Use H2 headers every 200-300 words
- Write in active voice, short sentences
- Save drafts to shared/drafts/

## Handoffs
- When you need keyword data, ask @SEOAnalyst
- When draft is complete, hand off to @SEOAnalyst
  for optimization review

Step 3: Configure Session Keys

Each agent needs a unique session key. The convention is agent:name:main. Session keys determine where conversation history, memory, and context are stored. Never reuse a session key across agents.

Session Key Configuration
# Each agent gets a unique session key
# Format: agent:[name]:main

agent:pm:main          # PM / Coordinator
agent:writer:main      # Content Writer
agent:seo:main         # SEO Analyst
agent:researcher:main  # Researcher
agent:social:main      # Social Media
agent:editor:main      # QA / Editor
agent:monitor:main     # System Monitor
agent:analytics:main   # Analytics Reporter
agent:outreach:main    # Outreach Agent
agent:scheduler:main   # Scheduler / Cron Manager

# Session data stored at:
# ~/.openclaw/agents/[name]/sessions/sessions.json

Step 4: Set Up Staggered Heartbeat Crons

Heartbeats wake agents up at regular intervals to check for new tasks. The critical rule: do not wake all agents at the same time. Stagger the cron schedules so only 1-2 agents are active simultaneously. This prevents API rate limit hits and keeps memory usage stable.

crontab -e (staggered schedule)
# Stagger heartbeats - never wake all agents at once
# PM checks every 30 min (at :00 and :30)
*/30 * * * * openclaw agent --agent pm --message 'heartbeat'
# Writer checks every 15 min (at :05, :20, :35, :50)
5,20,35,50 * * * * openclaw agent --agent writer --message 'heartbeat'
# SEO checks every hour (at :10)
10 * * * * openclaw agent --agent seo --message 'heartbeat'
# Researcher checks every hour (at :25)
25 * * * * openclaw agent --agent researcher --message 'heartbeat'
# Social runs 3x daily (9am, 1pm, 5pm at :15)
15 9,13,17 * * * openclaw agent --agent social --message 'heartbeat'
# Daily standup at 9:00 AM
0 9 * * * openclaw agent --agent pm --message 'run daily standup'

Notice the offset minutes: :00, :05, :10, :15, :20, :25. No two agents wake at the same minute. This is the single most important optimization for running multiple openclaw agents on shared infrastructure.

Step 5: Create a Shared Workspace

Agents are isolated by design, but they need a way to pass information between each other. The simplest solution: a shared directory that all agents can read from and write to.

Shared Workspace Structure
project/
├── agents/
│   ├── pm/SOUL.md
│   ├── writer/SOUL.md
│   ├── seo/SOUL.md
│   └── researcher/SOUL.md
├── shared/
│   ├── tasks.json        # Task queue (all agents read/write)
│   ├── standup.md         # Daily standup summary (PM writes)
│   ├── drafts/            # Writer outputs drafts here
│   ├── research/          # Researcher saves briefs here
│   ├── seo-reports/       # SEO saves analysis here
│   └── knowledge/         # Brand guidelines, style guide
└── agents.md              # Central agent registry

Each agent's SOUL.md should reference the shared directory explicitly. Tell the writer: "Save drafts to shared/drafts/". Tell the researcher: "Save briefs to shared/research/". This creates clear data flow between agents without coupling their sessions.

Step 6: Set Up the Notification System

When Agent A finishes a task and needs Agent B to pick it up, it uses @mentions through the gateway. Include mention rules in every SOUL.md so agents know who to notify and when.

@mention Routing Example
# Researcher completes a brief:
openclaw agent --agent researcher --message \
  "@Writer research brief ready at shared/research/seo-tools-brief.md"

# Gateway routes the @mention to the Writer agent
# Writer wakes up, reads the brief, starts drafting

# Writer completes draft:
openclaw agent --agent writer --message \
  "@SEOAnalyst draft ready at shared/drafts/seo-tools-post.md"

# SEO agent picks it up on next heartbeat

Agent Communication Patterns

There are three proven patterns for inter-agent communication in an openclaw multi agent setup. Most production teams use a combination of all three.

PatternHow It WorksProsBest For
Direct Session Messaging@mentions through the gateway message bus. Gateway routes messages to the target agent's session.Real-time, logged, easy to debugTask handoffs, urgent notifications
Shared DatabaseAgents read/write to Convex, Notion, or a SQLite database. Each agent queries the DB on heartbeat.Structured data, queryable, persistentTask queues, status tracking, analytics
File-BasedAgents read/write to shared directories. One agent writes output, another reads it as input.Simple, no external deps, version-controllableContent pipelines, research briefs, reports

File-based communication is the simplest to set up and the easiest to debug. You can literally open the shared directory and see what each agent has produced. Start here. Move to a shared database when you need structured queries or real-time status tracking. Use direct session messaging for urgent handoffs that cannot wait for the next heartbeat cycle.

Example: 3-Agent Content Team

Here is a complete, working example of an openclaw team with three agents. This is the configuration I run in production for content operations.

agents.md - Team Roster
# Agent Team

## Orion (PM/Coordinator)
- soul: agents/pm/SOUL.md
- model: claude-haiku-4-20250414
- session: agent:pm:main
- heartbeat: every 30 minutes
- description: Assigns tasks, tracks progress, runs daily standup

## Echo (Content Writer)
- soul: agents/writer/SOUL.md
- model: claude-sonnet-4-20250514
- session: agent:writer:main
- heartbeat: every 15 minutes
- description: Writes blog posts and articles from research briefs

## Radar (SEO Analyst)
- soul: agents/seo/SOUL.md
- model: gpt-4o
- session: agent:seo:main
- heartbeat: every 60 minutes
- description: Keyword research, content optimization, meta tags

Notice the model selection. The PM agent uses Claude Haiku because it makes many short decisions (checking task status, routing work). The Writer uses Claude Sonnet for strong reasoning and long-form output. The SEO Analyst uses GPT-4o for structured analytical work. This mix keeps costs down while putting the most capable model where it matters most.

Daily Workflow
9:00 AM  - PM runs daily standup
           Reads shared/tasks.json
           Summarizes yesterday's completed work
           Assigns today's tasks

9:05 AM  - Writer wakes up
           Checks shared/research/ for new briefs
           Starts drafting assigned blog post
           Saves draft to shared/drafts/

9:10 AM  - SEO Analyst wakes up
           Checks shared/drafts/ for new content
           Runs keyword analysis
           Saves optimization notes to shared/seo-reports/

9:15 AM  - Social agent wakes up (3x daily)
           Reads published content
           Creates tweet threads and LinkedIn posts

... cycle continues throughout the day

The Daily Standup: Automated Team Coordination

One of the most useful patterns in a multi-agent setup is the automated daily standup. A cron job fires at a set time (e.g., 9:00 AM) and tells the PM agent to collect activity from all other agents. The PM reads each agent's recent outputs, compiles a summary, and writes it to a shared location.

Daily Standup Script
#!/bin/bash
# daily-standup.sh - runs at 9:00 AM via cron

# Tell PM to collect and summarize all agent activity
openclaw agent --agent pm --message "Run daily standup.
Read shared/drafts/ for new content from Writer.
Read shared/research/ for new briefs from Researcher.
Read shared/seo-reports/ for optimization notes from SEO.
Compile a summary and save to shared/standup.md.
List: what was completed yesterday, what is in progress,
what is blocked."

# Optional: send standup to Telegram
cat shared/standup.md | curl -s -X POST \
  "https://api.telegram.org/bot[TOKEN]/sendMessage" \
  -d chat_id=[CHAT_ID] \
  -d text="$(cat shared/standup.md)"

This gives you a daily digest of what your AI team accomplished without logging into any dashboard. You get a Telegram message every morning with a clear summary of completed tasks, work in progress, and blockers.

Cost Considerations

Running multiple openclaw agents means multiple API calls. Each heartbeat triggers a model call. If you run 10 agents with 15-minute heartbeats, that is 960 API calls per day. With heavier models, costs add up fast.

SetupHeartbeatDaily CallsEst. Daily Cost
3 agents (Haiku)30 min144~$0.50
5 agents (mixed models)15-60 min~350~$3-8
10 agents (mixed models)15-60 min~700~$8-20

Use lightweight models for high-frequency agents

Agents that check in every 15 minutes should use Claude Haiku or GPT-4o-mini. Reserve Sonnet and GPT-4o for agents that run less frequently but need stronger reasoning.

Stagger heartbeats (do not skip this)

If 10 agents all fire at :00, you hit rate limits and spike memory usage. Offset each agent by 2-5 minutes. This is the single biggest cost and reliability optimization.

Use event-driven triggers instead of polling

For agents that only need to act when something happens (new file in drafts/, new task in queue), consider file watchers or webhook triggers instead of periodic heartbeats.

Clear session history periodically

Long conversation histories increase token usage per call. Run 'Delete ~/.openclaw/agents/*/sessions/sessions.json' weekly to keep context lean. Agents rebuild context from SOUL.md and shared files.

Quick Command Reference

Here are the essential commands for managing your openclaw multi agent setup.

# Start the gateway (all agents come online)
openclaw gateway start

# Send a message to a specific agent
openclaw agent --agent writer --message "Write a blog post about X"

# Check which agents are online
openclaw gateway status

# Restart a single agent without affecting others
openclaw gateway restart --agent seo

# Clear all session history (fresh start)
rm ~/.openclaw/agents/*/sessions/sessions.json

# View an agent's recent activity
openclaw agent --agent pm --message "What did you do today?"

# Stop the gateway (all agents go offline)
openclaw gateway stop

Frequently Asked Questions

How many OpenClaw agents can run on a single server?

There is no hard-coded limit. The practical ceiling depends on your hardware, the models each agent calls, and how frequently heartbeats fire. A $5/month VPS can comfortably run 3-5 agents on lightweight models like Claude Haiku. A Mac Mini with 16GB RAM handles 10 agents without issues. The bottleneck is almost always API rate limits and costs, not local compute. If you stagger heartbeats so agents wake up at different times, you reduce peak memory usage significantly.

Do all agents share the same context and conversation history?

No. Each agent runs in its own independent session with a unique session key (e.g., agent:writer:main). Sessions are completely isolated. Each agent has its own conversation history, context window, tool permissions, and memory. One agent crashing or hitting its context limit does not affect the others. This isolation is what makes running multiple agents reliable. If agents need to share information, you set up explicit communication channels like shared files or a database.

How do OpenClaw agents communicate with each other?

Agents communicate through three patterns: direct session messaging via @mentions through the gateway, shared database reads/writes (Convex, Notion, SQLite), and file-based communication where agents read and write to shared directories. The simplest approach is file-based. Agent A writes its output to /shared/research-brief.md, and Agent B reads that file as input for its next task. For real-time coordination, use @mentions through the gateway message bus.

What happens if one agent crashes? Does it take down the others?

No. Because each agent runs in its own session, a crash in one agent does not affect the rest. The gateway monitors session health independently. If Agent 3 hits an API error or runs out of context, Agents 1, 2, and 4-10 continue operating normally. You can restart a single agent without touching the others by targeting its specific session key with openclaw agent --agent [name] --message 'restart'.

Build Your Agent Team from Proven Configs

CrewClaw has 103 agent templates ready to deploy. Skip the blank-page problem and start with battle-tested SOUL.md configurations for PM, Writer, SEO, Researcher, and dozens more roles.

Deploy a Ready-Made AI Agent

Skip the setup. Pick a template and deploy in 60 seconds.

Get a Working AI Employee

Pick a role. Your AI employee starts working in 60 seconds. WhatsApp, Telegram, Slack & Discord. No setup required.

Get Your AI Employee
One-time payment Own the code Money-back guarantee