๐Ÿง  OpenClaw Multi-Agent Architecture

Prepared by Chief  |  March 8, 2026

How agents, gateways, Telegram groups, and memory all connect

โ„น๏ธ Purpose of this doc: Plain-English explanation of what "multiple agents" actually means in OpenClaw โ€” how the gateway works, what separates agents, how memory is (not) shared, and what your cleanest setup would look like for managing multiple projects.

PART 1 โ€” The Core Mental Model

One Gateway. Possibly Many Agents.

Think of it like a building:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ GATEWAY (the building) โ”‚ โ”‚ One running process on Mac Mini โ”‚ โ”‚ Manages all connections, routing, channels โ”‚ โ”‚ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ Agent: main โ”‚ โ”‚ Agent: coding โ”‚ โ”‚ โ”‚ โ”‚ Your brain โ”‚ โ”‚ A second brain โ”‚ โ”‚ โ”‚ โ”‚ (Chief) โ”‚ โ”‚ (project-focused) โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ SOUL.md โ”‚ โ”‚ SOUL.md (different) โ”‚ โ”‚ โ”‚ โ”‚ MEMORY.md โ”‚ โ”‚ No personal memory โ”‚ โ”‚ โ”‚ โ”‚ workspace/ โ”‚ โ”‚ workspace-coding/ โ”‚ โ”‚ โ”‚ โ”‚ sessions โ”‚ โ”‚ sessions (separate) โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”‚ โ”‚ One Telegram bot โ”€โ–บ routed by chat/group โ”‚ โ”‚ OR two Telegram bots โ”€โ–บ one per agent โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

The key insight

You don't need multiple gateways. One gateway on Mac Mini handles everything. What you're choosing is whether you want one agent (one brain, all contexts) or multiple agents (separate brains, separate memory, separate sessions). The gateway just routes incoming messages to the right agent.


PART 2 โ€” What "An Agent" Actually Is

Each agent has completely isolated:

ComponentWhat it meansLives where
Workspace SOUL.md, AGENTS.md, USER.md, MEMORY.md, all project files ~/.openclaw/workspace-{agentId}/
Session history Every conversation, message by message โ€” never shared with other agents ~/.openclaw/agents/{agentId}/sessions/
Auth profiles API keys, Google auth, Telegram tokens โ€” not shared by default ~/.openclaw/agents/{agentId}/agent/auth-profiles.json
Persona Different SOUL.md = different personality, instructions, and tone Per-workspace
Skills Can be shared globally or per-agent Global: ~/.openclaw/skills/
โš ๏ธ Memory is NOT shared between agents. MEMORY.md lives inside each agent's workspace. If you want Agent A to know something Agent B knows, you have to explicitly write it to a shared file or pass it manually. This is intentional isolation โ€” it's a feature.

PART 3 โ€” Telegram Groups = Session Isolation (without multiple agents)

Here's the thing you may not have realized: you already get session isolation just by using different Telegram groups โ€” even with one agent.

OpenClaw keys sessions by chat ID. So:

Your DM with Chief bot โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Session key: agent:main:telegram:direct:8447049886 (your current main session) Telegram Group "Fraud Work" โ”€โ”€โ–บ Session key: agent:main:telegram:group:-1009876543 (completely separate message history) Telegram Group "EHI Ignite" โ”€โ”€โ–บ Session key: agent:main:telegram:group:-1001234567 (another completely separate message history)

What this means practically

If you create a Telegram group called "Fraud Detection" and add the Chief bot, every message in that group = a separate thread. The bot remembers the full history of that group independently from your DM and from every other group. No extra setup needed. The isolation already exists.

What you DON'T get with this approach: the agent loads the same context files (MEMORY.md, SOUL.md, etc.) in every group. So Chief brings your personal memory into the fraud detection group. That's usually fine โ€” but if you want truly isolated context loading (no personal memory, different project files), that's when you'd want a second agent.


PART 4 โ€” When to Use Multiple Agents vs. Multiple Groups

Scenario Multiple Telegram Groups
(one agent)
Multiple Agents
Separate conversation history per project โœ… Works โœ… Works
No context bleed between project threads โœ… Works โœ… Works
Different SOUL/persona per context โœ— Same personality โœ… Works
Keep personal memory OUT of code sessions โœ— Always loads MEMORY.md โœ… Separate workspace
Different tools/permissions per context โœ— Same toolset โœ… Per-agent tool policy
Setup complexity Minimal โ€” create group, add bot More setup โ€” new bot, config change
Sharing files between contexts Easy โ€” same filesystem Manual โ€” different workspaces
โœ… Honest recommendation for you right now: Start with multiple Telegram groups, one agent. Create groups for each active project thread. You get separate histories immediately, no config changes needed. If you later want true context isolation (no personal memory in your coding sessions), we can add a second agent then.

PART 5 โ€” If/When You Add a Second Agent

The "Coding Agent" Setup

This is what a second agent would look like for Blake's setup:

Agent: main (Chief) โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Your current bot Workspace: ~/.openclaw/workspace/ Has: MEMORY.md, personal context, ALL projects Good for: personal logistics, strategy, cross-project thinking Agent: coding โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ New bot (separate BotFather token) Workspace: ~/.openclaw/workspace-coding/ Has: CLAUDE.md files per project, server configs, NO personal memory Good for: writing code, server management, deploys, technical deep-dives

How the Gateway Routes Messages

You'd add 4 lines to openclaw.json:

agents: {
  list: [
    { id: "main" },                                        // Chief โ€” already exists
    { id: "coding", workspace: "~/.openclaw/workspace-coding" }  // New
  ]
},
bindings: [
  { agentId: "main",   match: { channel: "telegram", accountId: "default" } },
  { agentId: "coding", match: { channel: "telegram", accountId: "coding" } }
]
channels: {
  telegram: {
    accounts: {
      default: { botToken: "YOUR_EXISTING_TOKEN" },
      coding:  { botToken: "NEW_BOT_TOKEN_FROM_BOTFATHER" }
    }
  }
}

Memory Between Agents

Three options:

Simplest shared memory pattern

Create ~/.openclaw/shared/PROJECT-MAP.md with just: project names, repo paths, server IPs, and current status. Both agents read it. Chief keeps his full MEMORY.md private. Coding agent has no personal info but knows the technical landscape.


PART 6 โ€” What "Multiple Gateways" Means (You Probably Don't Need This)

A second gateway = a completely separate running process with its own port, config, state dir. This is for:

You don't need this. One gateway handles multiple agents just fine. The only reason you'd run two gateways is if you needed one to be a safety net for the other, or if two separate people (not just two contexts for you) needed completely isolated setups on the same machine.

PART 7 โ€” Blake's Recommended Path Forward

PhaseWhat to doComplexity
Now Create Telegram groups for active projects: "Fraud Detection", "EHI Ignite", etc. Add Chief bot. Done. Zero config changes
Soon During environment session: add project-specific context files to workspace so Chief loads the right project notes when working in each group. File organization only
Later When coding sessions feel polluted by personal context, add the coding agent: new BotFather bot, 4-line config change, separate workspace. 30 min setup
Never (probably) Second gateway. Unnecessary for your use case. Overkill

OpenClaw Multi-Agent Explainer ยท Chief ยท March 8, 2026 ยท Source: openclaw/docs/concepts/multi-agent.md + gateway/multiple-gateways.md