Understand OpenClaw agent routing, Telegram bindings, and the openclaw.json config structure
How this skill is triggered — by the user, by Claude, or both
Slash command
/openclaw-agent-groups:openclaw-routingThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Background knowledge for working with OpenClaw's multi-agent Telegram routing.
Background knowledge for working with OpenClaw's multi-agent Telegram routing.
OpenClaw supports multiple agents, each with their own model, workspace, and personality. Agents are routed to specific Telegram chats via bindings — rules that match incoming messages to an agent based on channel type and peer ID.
When a message arrives:
channels.telegram.groups to see if the group is allowedbindings for a match on channel + peer kind + peer IDmain agent (default)The config lives at data/.openclaw/openclaw.json inside the Clax-Verbotten repo (host path: ~/repos/Clax-Verbotten/data/.openclaw/openclaw.json).
Array of agent definitions:
{
"id": "research-orchestrator",
"name": "Research Director",
"model": "anthropic/claude-opus-4-6"
}
id — unique identifier, used in bindings and workspace pathsname — display name, used for Telegram admin titlemodel — model alias (resolved via agents.models.aliases)Allowlist of Telegram group chat IDs. Only groups listed here will be processed:
"groups": {
"-5257193888": {
"requireMention": false
}
}
requireMention: if true, the bot only responds when @mentioned. If false, it responds to all messages.Array of routing rules:
{
"agentId": "research-orchestrator",
"match": {
"channel": "telegram",
"peer": {
"kind": "group",
"id": "-5257193888"
}
}
}
agentId — must match an id in agents.listmatch.channel — "telegram" or "whatsapp"match.peer.kind — "group" or "private"match.peer.id — the Telegram chat ID as a stringEach agent gets its own workspace directory:
~/repos/Clax-Verbotten/workspaces/<agent-id>//data/.openclaw/workspace-<agent-id>/main agent uses workspaces/main/ → /data/.openclaw/workspace/ (no suffix)Workspace contents (AGENTS.md, SOUL.md, IDENTITY.md, etc.) define the agent's personality and instructions.
Fetch recent messages sent to the bot. Only works when no other process is polling (the OpenClaw container must be stopped first).
GET https://api.telegram.org/bot<token>/getUpdates
Returns an array of Update objects. Group messages have message.chat.id (negative number) and message.chat.title.
Set a custom title for the bot in a group (e.g. "Research Director"):
POST https://api.telegram.org/bot<token>/setChatAdministratorCustomTitle
chat_id=<group-chat-id>
user_id=<bot-user-id>
custom_title=<title>
Requirements:
Get the bot's own user info (needed for user_id in other calls):
GET https://api.telegram.org/bot<token>/getMe
| What | Path |
|---|---|
| OpenClaw config | ~/repos/Clax-Verbotten/data/.openclaw/openclaw.json |
| Compose file | /docker/clax-verbotten/docker-compose.yml |
| Container name | clax-verbotten-openclaw-1 |
| Bot token env var | TELEGRAM_BOT_TOKEN |
| Agent workspaces | ~/repos/Clax-Verbotten/workspaces/<agent-id>/ |
# Stop/start/restart
sudo docker compose -p clax-verbotten -f /docker/clax-verbotten/docker-compose.yml stop openclaw
sudo docker compose -p clax-verbotten -f /docker/clax-verbotten/docker-compose.yml start openclaw
sudo docker compose -p clax-verbotten -f /docker/clax-verbotten/docker-compose.yml restart openclaw
# Logs
sudo docker compose -p clax-verbotten -f /docker/clax-verbotten/docker-compose.yml logs --tail 30 openclaw
# Read env from running container
sudo docker exec clax-verbotten-openclaw-1 printenv TELEGRAM_BOT_TOKEN
npx claudepluginhub kormie/dot-skillsAnswers OpenClaw questions on configuration, troubleshooting, setup, architecture, features, channels, gateway, automation, models, and design decisions using clawdocs and openclaw CLIs.
Sends messages to Telegram/Slack/Discord, system events to agents, and agent invocations via openclaw CLI. For user notifications, broadcasts, agent coordination, and swarmmail.
Installs, configures, troubleshoots, and manages OpenClaw AI gateway across 23+ messaging platforms including Slack, WhatsApp, Telegram, Discord, and Teams.