Connect
--bot-token, the CLI prompts for it interactively.
What happens
- The bot token is stored in the agent’s secret store
- A webhook is registered with Telegram pointing to
https://<gateway>/gw/agents/<id>/telegram - The core config is updated for webhook mode
- The gateway is restarted (Hermes) or hot-reloaded (OpenClaw)
Prerequisites
Create a Telegram bot first:- Open Telegram and message @BotFather
- Send
/newbot, choose a name and username - Copy the bot token
Disconnect
List channels
How it works
/gw/agents/:agentId/telegram and enqueues them for the agent. The agent processes the message through its core runtime and sends a response back via the Telegram Bot API.
Channels are stateless from the platform’s perspective — disconnecting removes the webhook and config. Nothing to clean up inside the sandbox.