In this guide
  1. Prerequisites
  2. How It Works
  3. Create a New Telegram Bot
  4. Tell Your Agent to Add the New Bot
  5. Tell Your Agent to Create the New Agent
  6. The All-in-One Prompt
  7. Going Further

Before You StartPrerequisites

A working OpenClaw install with at least one agent already running on Telegram. That's it — your agent handles the config changes for you.

⚠ Back up first

Before making config changes, back up your current config. Your agent can do this too — just ask. If anything goes wrong, you can restore it in seconds.

💬 Prompt for your agent
Back up my current OpenClaw config before we make any changes. Save a copy somewhere safe.

The Mental ModelHow It Works

Think of it like departments in a company. Each agent has its own bot, its own chat, and its own job. You message them separately — just like texting different people.

Bot A → Agent 1 (social media)
Bot B → Agent 2 (research)
Bot C → Agent 3 (operations)

One machine. Multiple agents. Each with their own number.

Step 1 of 3Create a New Telegram Bot

Open Telegram and message @BotFather. Send /newbot, give it a name and username, and copy the bot token it gives you.

Tip Name your bots after their role — "Acme Social Bot", "Acme Research Bot" — so they're easy to tell apart in your chat list.

This is the only manual step. Everything else, your agent handles.

Step 2 of 3Tell Your Agent to Add the New Bot

Send this to your main agent. It will add the new Telegram bot token to your config and create a binding that routes messages from that bot to a new agent.

💬 Prompt for your agent
I created a new Telegram bot for a second agent. The bot token is: [PASTE YOUR TOKEN HERE]

Add this as a new Telegram account called "research" in my config, and create a binding that routes it to a new agent called "research". Don't restart yet — I want to set up the agent first.

Your agent will update channels.telegram.accounts and bindings in your config. Here's what the relevant sections look like after the change:

openclaw.json — what changes
{
  "channels": {
    "telegram": {
      "accounts": {
        "default": {
          "token": "YOUR_EXISTING_BOT_TOKEN"
        },
        "research": {
          "token": "YOUR_NEW_BOT_TOKEN"
        }
      }
    }
  },

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

Step 3 of 3Tell Your Agent to Create the New Agent

Now tell your agent to register the new agent instance with its own workspace, and restart the gateway.

💬 Prompt for your agent
Add a new agent instance called "research" with its own workspace at ~/.openclaw/workspace-research. Then restart the gateway so it picks up all the changes.

Your agent will add the instance to agents.instances and restart. Here's what that section looks like:

openclaw.json — what changes
{
  "agents": {
    "instances": {
      "main": {
        "workspace": "~/.openclaw/workspace"
      },
      "research": {
        "workspace": "~/.openclaw/workspace-research"
      }
    }
  }
}

After the restart, message the new bot on Telegram. It's a completely separate agent with its own conversation history.

Give it a personality Tell your main agent to create a SOUL.md file in the new workspace. This is where you define who the agent is — its role, tone, and behavior.
💬 Prompt for your agent
Create a SOUL.md file in ~/.openclaw/workspace-research for the new research agent. Make it a focused research assistant — thorough, cites sources, good at summarizing long documents. Keep it concise.

The ShortcutThe All-in-One Prompt

If you prefer, you can do all three config steps in a single message to your agent:

💬 Prompt for your agent — all at once
I want to add a second agent. Here's what I need:

1. Back up my current config first
2. Add a new Telegram bot token: [PASTE TOKEN HERE]
3. Register it as account "research" and bind it to a new agent called "research"
4. Create the agent instance with workspace at ~/.openclaw/workspace-research
5. Create a SOUL.md for it — make it a research assistant that's thorough and good at summarizing
6. Restart the gateway when everything is ready

Going Further

Let agents talk to each other

Enable tools.agentToAgent in your config with an allow list of agent IDs. Agents can then send messages to each other — useful for handoffs, delegation, or collaborative workflows.

💬 Prompt for your agent
Enable agent-to-agent communication between "main" and "research" so they can message each other.
Add agents to a group chat

Create a Telegram group, add all your bots, and allowlist the group ID in your config. All agents can see and respond to group messages. Set requireMention: true so they only respond when @mentioned — otherwise they'll all try to reply to everything.

💬 Prompt for your agent
I created a Telegram group with both bots. The group ID is [GROUP_ID]. Allowlist it in the config with requireMention set to true so they only respond when @mentioned.
Use different models per agent

Each agent can run a different model. Run your primary agent on a frontier model and helpers on cheaper ones to manage costs.

💬 Prompt for your agent
Set the research agent to use a cheaper model — something fast and cost-effective. Keep the main agent on the current model.
How many agents can I run?

There's no hard limit. Agents are lightweight — they share the same gateway process and only consume resources when actively responding. Running 3–5 agents on a Mac Mini or similar is comfortable. The bottleneck is usually LLM API costs, not compute.

Can I use other channels besides Telegram?

Yes. The same pattern works with Discord, Slack, WhatsApp, Signal, and other supported channels. Each agent can be bound to any channel — or multiple channels. One agent on Telegram and Discord simultaneously, another on Slack only, etc.