创建 OpenClaw 代理并连接到各消息渠道(Telegram、Discord、Slack、飞书、WhatsApp、Signal、Google Chat),包括工作区脚手架
⚡ One-line install:
bash
clawhub install multi-agent-create
Add a new AI agent to your OpenClaw gateway and connect it to any messaging channel.
When the user triggers this skill (e.g. "create a new agent", "add a bot"), follow this guided flow:
Prompt the user:
🤖 Let's create a new agent! First, tell me:
- Agent name — What should this agent be called? (e.g. Luna, Marketing Bot)
- Which channel do you want to connect it to?
Supported channels:
#ChannelDescription1TelegramTelegram Bot2DiscordDiscord Bot3SlackSlack App4Feishu / Lark飞书 / Lark Bot5WhatsAppWhatsApp (QR scan)6SignalSignal (QR scan)7Google ChatGoogle Workspace Bot
Reply with the agent name and channel number (or name), e.g. "Luna, Telegram"
Wait for the user's reply before proceeding.
Based on the user's chosen channel, provide the specific credential instructions:
🔑 Get your Telegram Bot Token:
- Open Telegram and search for @BotFather
- Send
/newbotand follow the prompts to name your bot- BotFather will give you a Bot Token like
123456789:ABCdefGHI...- Paste that token here
Required: botToken
🔑 Get your Discord Bot Token:
- Go to Discord Developer Portal
- Click New Application → name it → go to Bot tab
- Click Reset Token and copy the token
- Under Privileged Gateway Intents, enable Message Content Intent
- Paste the token here
Required: token
🔑 Get your Slack App credentials:
- Go to Slack API → Create New App
- Enable Socket Mode → copy the App-Level Token (starts with
xapp-)- Go to OAuth & Permissions → install to workspace → copy the Bot Token (starts with
xoxb-)- Paste both tokens here
Required: appToken, botToken
🔑 获取飞书机器人凭证:
- 打开 飞书开放平台 → 创建企业自建应用
- 在应用的 凭证与基本信息 页面找到 App ID 和 App Secret
- 在 机器人 功能页启用机器人能力
- 把 App ID 和 App Secret 发给我
For Lark (international): same steps at Lark Developer
Required: appId, appSecret (add "domain": "lark" for Lark international)
📱 WhatsApp uses QR code login:
- I'll run the login command for you
- A QR code will appear — scan it with your WhatsApp app
- That's it!
Ready? Just say "go" and I'll start the QR scan.
Action: run openclaw channels login --channel whatsapp --account {name}
📱 Signal uses QR code login:
- I'll run the login command for you
- A QR code will appear — scan it with your Signal app (Settings → Linked Devices)
- That's it!
Ready? Just say "go" and I'll start the QR scan.
Action: run openclaw channels login --channel signal --account {name}
🔑 Get your Google Chat Service Account:
- Go to Google Cloud Console → create/select a project
- Enable the Google Chat API
- Create a Service Account → download the JSON key file
- Send me the path to the JSON file on this server
Required: serviceAccountPath
Wait for the user to provide credentials before proceeding.
Run the helper script or create manually:
bash
./scripts/setup-agent.sh {name} {channel}
This creates a workspace at workspace-groups/{name}/ with standard files:
IDENTITY.md — Name, role, emojiSOUL.md — Personality and behaviorAGENTS.md — Startup instructionsUSER.md — Owner infoHEARTBEAT.md, TOOLS.mdbash
openclaw agents add {name}-agent
Add account entry and binding to the gateway config.
Binding format (all channels):
json
{
"agentId": "{name}-agent",
"match": {
"channel": "{channel}",
"accountId": "{name}"
}
}
Use
accountIdin the match block — notaccount.
Channel account config reference:
ChannelConfig PathRequired FieldsTelegramchannels.telegram.accounts.{name}``botTokenDiscordchannels.discord.accounts.{name}``tokenSlackchannels.slack.accounts.{name}``mode: "socket", appToken, botTokenFeishuchannels.feishu.accounts.{name}``appId, appSecretWhatsAppchannels.whatsapp.accounts.{name}QR scan via CLISignalchannels.signal.accounts.{name}QR scan via CLIGoogle Chatchannels.googlechat.accounts.{name}``serviceAccountPath
bash
openclaw gateway restart
openclaw agents list --bindings
openclaw channels status --probe
For DM-based channels, the owner sends /start (or first message) to the bot, then approves:
bash
openclaw pairing approve {channel} {CODE}
Report completion:
✅ Agent {name} is live on {channel}!
- Workspace:
~/.openclaw/workspace-groups/{name}/- All agents share your existing model API keys — no extra keys needed
- Add more channels anytime by running this skill again