#Trying to make a new agent

1 messages · Page 1 of 1 (latest)

hidden summit
#

Hey, I'm trying to set up a second agent on a separate Telegram bot and running into issues.
I have one agent working fine on one Telegram bot. I'm trying to create a second agent (with a different identity/soul) on a separate bot token. When I add a second bot token to the identity config and map it to agent id "forge", the gateway starts but returns unknown agent id "forge" for every request — so the second bot never responds.
I also tried adding a forge key under agents in openclaw.json but the gateway rejects it with Unrecognized key: "forge".
From what I can tell, OpenClaw only supports one agent id (main) and the Telegram channel only accepts a single botToken. Is there a supported way to run multiple agents on separate Telegram bots from the same installation? Or does this require running two separate gateway instances with separate configs/ports?
Running v2026.4.15 on macOS. Any help appreciated!

harsh lichenBOT
sullen spokeBOT
#

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

mortal doveBOT
#

I’m checking the actual docs and source now so I don’t guess on config keys.

#

I checked the v2026.4.15 docs, and yes, this is supported in one Gateway. You do not need two gateway instances just to run two Telegram bots with two different agents/personas.

What your errors mean:

  • unknown agent id "forge" = something is routing to forge, but forge is not defined in agents.list[]
  • Unrecognized key: "forge" under agents = agents is not a map keyed by agent id. The schema is agents.defaults + agents.list[]
  • identity does not create an agent, it only decorates an existing one

Minimal working shape:

{
  agents: {
    list: [
      { id: "main", default: true, workspace: "~/.openclaw/workspace" },
      { id: "forge", workspace: "~/.openclaw/workspace-forge" },
#
    ],
  },

  bindings: [
    { agentId: "main", match: { channel: "telegram", accountId: "default" } },
    { agentId: "forge", match: { channel: "telegram", accountId: "forge" } },
  ],

  channels: {
    telegram: {
      defaultAccount: "default",
      accounts: {
        default: { botToken: "123:AAA..." },
        forge: { botToken: "456:BBB..." },
      },
#
    },
  },
}

So the key bits are:

  • second bot token goes in channels.telegram.accounts.forge.botToken
  • second agent goes in agents.list[] with id: "forge"
  • routing happens via bindings[]

CLI path is usually easier:

openclaw agents add forge --workspace ~/.openclaw/workspace-forge --non-interactive