#How to set up multiple agents

1 messages · Page 1 of 1 (latest)

young falcon
#

i wanna run multiple full agents and allow them to communicate with eachother. is there a built in way to do this or should i give them a discord server or similar?

naive nightBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

fickle skiffBOT
#

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 spawn for “main agent delegates to worker agents”
  • sessions_send for one session/agent messaging another
  • tools.sessions.visibility: "all" + tools.agentToAgent.enabled: true if you want cross-agent session targeting
#
  • agents.defaults.subagents.allowAgents or per-agent subagents.allowAgents to 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:

young falcon
#

OpenClaw 2026.4.24 (cbcfdf6). independent peers chatting with the added constraint that i can talk directly with them

fickle skiffBOT
#

For independent peers + you can talk to each directly, I’d use a hybrid:

  1. Built-in multi-agent/session tools for agent↔agent communication.
  2. 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

young falcon
#

would they be able to have bigger group conversations?

fickle skiffBOT
#

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:

  1. 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.
  2. Use OpenClaw Broadcast Groups — currently experimental and WhatsApp-focused
    This lets one group message fan out to multiple agents: