#How to set up multiple agents
1 messages · Page 1 of 1 (latest)
Yes — there’s built-in support, so I’d avoid using Discord as the primary “agent bus” unless you specifically want a visible chat transcript.
Use OpenClaw multi-agent routing for multiple full agents: each agentId gets its own workspace, auth, session store, persona files, etc. Add them with:
openclaw agents add research
openclaw agents add coding
openclaw agents list --bindings
Then route channels/accounts/threads to them with bindings.
For agent-to-agent communication, use the built-in session/subagent tools:
sessions_spawn//subagents spawnfor “main agent delegates to worker agents”sessions_sendfor one session/agent messaging anothertools.sessions.visibility: "all"+tools.agentToAgent.enabled: trueif you want cross-agent session targeting
agents.defaults.subagents.allowAgentsor per-agentsubagents.allowAgentsto restrict who can spawn whom
A rough config shape:
{
agents: {
list: [
{ id: "main", workspace: "~/.openclaw/workspace-main" },
{ id: "research", workspace: "~/.openclaw/workspace-research" },
{ id: "coding", workspace: "~/.openclaw/workspace-coding" },
],
defaults: {
subagents: {
allowAgents: ["research", "coding"],
},
},
},
tools: {
profile: "coding",
sessions: { visibility: "all" },
agentToAgent: {
enabled: true,
allow: ["main", "research", "coding"],
},
},
}
Discord is still useful if you want them to “socially” interact in a private guild/channel, but I’d treat that as UI/observability, not the core coordination layer.
Docs:
https://docs.openclaw.ai/concepts/multi-agent
https://docs.openclaw.ai/concepts/session-tool
https://docs.openclaw.ai/tools/subagents
If you want exact config, paste your openclaw --version and whether you want “main orchestrator + workers” or “independent peers chatting.”
OpenClaw 2026.4.24 (cbcfdf6). independent peers chatting with the added constraint that i can talk directly with them
For independent peers + you can talk to each directly, I’d use a hybrid:
- Built-in multi-agent/session tools for agent↔agent communication.
- One channel account per agent for human-facing access — e.g. separate Telegram bots, or separate Discord bots in your own private server.
Config shape:
{
agents: {
list: [
{ id: "alice", workspace: "~/.openclaw/workspace-alice" },
{ id: "bob", workspace: "~/.openclaw/workspace-bob" },
{ id: "charlie", workspace: "~/.openclaw/workspace-charlie" },
],
},
tools: {
profile: "messaging",
sessions: {
visibility: "all", // lets sessions_send target other agents' sessions
},
agentToAgent: {
enabled: true,
allow: ["alice", "bob", "charlie"],
},
},
bindings: [
{ agentId: "alice", match: { channel: "discord", accountId: "alice" } },
{ agentId: "bob", match: { channel: "discord", accountId: "bob" } },
{ agentId: "charlie", match: { channel: "discord", accountId: "charlie" } },
],
}
Then each agent can use sessions_list / sessions_send to talk to another agent, while you can talk to each directly through its bound bot/account.
Important caveat: if you put multiple bots in one Discord channel, use mention gating / allowlists or they may create noisy loops. For “autonomous peer society” vibes, Discord is a nice UI; for controlled coordination, sessions_send is cleaner.
Docs:
https://docs.openclaw.ai/concepts/multi-agent
https://docs.openclaw.ai/concepts/session-tool
https://docs.openclaw.ai/gateway/config-tools
would they be able to have bigger group conversations?
Yes, but with caveats.
Built-in A2A (sessions_send) is mostly pairwise, not a true N-agent group room. It can do agent↔agent exchanges, with a limited reply-back loop.
For bigger group conversations, you have two practical options:
-
Use a private Discord/Telegram/WhatsApp group as the visible room
- One bot/account per agent.
- You can DM each agent directly.
- You can also talk to all of them in the shared room.
- Add mention gating / strict prompts to avoid infinite bot chatter.
-
Use OpenClaw Broadcast Groups — currently experimental and WhatsApp-focused
This lets one group message fan out to multiple agents: