Guide
Hermes Agent + Telegram: Run Your Hermes Bot on Telegram
Connect Hermes Agent to Telegram and have an AI agent available in your DMs, group chats, or channels — powered by Claude, GPT, Gemini, DeepSeek, Grok, or any other model Hermes supports.
What Is a Hermes Telegram Bot?
A Hermes Telegram bot is a full AI agent that lives in your Telegram account. Unlike simple rule-based Telegram bots that only respond to specific commands, Hermes understands natural language, holds multi-turn conversations, uses real-world tools (web search, code execution, file handling), and remembers context across sessions through its memory system.
You can use a Hermes Telegram bot as a personal AI assistant in DMs, add it to group chats for shared access, or run it as a 24/7 agent for ongoing tasks. The same Hermes instance can simultaneously be active on Telegram and other channels like Discord or WhatsApp.
Step 1: Create a Bot with BotFather
Every Telegram bot starts with a token from BotFather:
- Open Telegram and search for @BotFather.
- Send
/newbotand follow the prompts. Give your bot a display name and a unique username ending in “bot” (e.g.,my_hermes_bot). - BotFather replies with a bot token — a long string like
123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11. Copy it.
Step 2: Deploy Hermes on OpenClaw Launch
With your token ready, deploying on OpenClaw Launch takes about 10 seconds:
- Go to openclawlaunch.com/hermes-hosting and start a Hermes deploy.
- Select Telegram as your channel and paste your BotFather token.
- Pick your AI model — Claude Sonnet 4.6 is a strong default, but you can choose any supported model.
- Click Deploy. Hermes launches with Telegram configured and the pairing policy active.
Step 3: Pair via DM
Hermes uses DM pairing for Telegram by default — dmPolicy: "pairing". This means users must be explicitly approved before the bot responds to them. Pairing prevents unauthorized access (Telegram bots are publicly searchable, so any Telegram user could find and message your bot).
- Open Telegram and DM your bot with any message.
- The bot replies with a pairing code — a short alphanumeric string.
- Go to your Hermes instance dashboard on OpenClaw Launch and paste the pairing code in the DM Pairing section.
- Click Approve. The bot now responds to your messages.
Each user who wants to chat with the bot must pair separately. This is by design — pairing is the primary security layer for Telegram bots.
Why dmPolicy Must Be "pairing" for Telegram
Unlike Discord bots (which are invite-only), Telegram bots are publicly discoverable — any Telegram user can search for and message your bot by username. Setting dmPolicy to "open" would allow anyone on the internet to use your bot, consuming your AI credits and potentially exposing your agent to misuse.
Always use dmPolicy: "pairing" for Telegram. OpenClaw Launch sets this automatically and it cannot be overridden to "open"for Telegram deployments.
Step 4: Configure Your Bot (Optional)
Back in BotFather, you can customize your bot's appearance:
/setdescription— Set the description shown when users first open the bot/setabouttext— Set the About text on the bot's profile/setuserpic— Upload a profile picture/setcommands— Add a command menu (e.g.,/help,/model)
Self-Hosted Hermes + Telegram
For self-hosted Hermes, configure Telegram under the platforms.telegram section of /opt/data/config.yaml. The key fields are the bot token plus an optional extra block for advanced settings (custom API endpoint, forum topics, fallback IPs).
# /opt/data/config.yaml
platforms:
telegram:
token: "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"
reply_to_mode: "first" # "first" | "all" | "off"
extra:
disable_link_previews: true
# base_url: "https://api.telegram.org" # optional overrideAfter editing, restart the Hermes container for the Telegram adapter to load. Refer to the upstream README for the full schema, including DM access controls (Hermes uses GATEWAY_ALLOW_ALL_USERS and per-user pairing rather than the dmPolicy key OpenClaw uses).
Troubleshooting
If your bot is not responding after pairing, check:
- That the bot token is correct — a typo or regenerated token from BotFather will break the connection.
- That the Telegram channel is enabled in your Hermes configuration.
- That the pairing step was completed successfully — messages from unpaired users are silently dropped by design.
- Container logs for any authentication errors from the Telegram adapter.
What's Next?
- Hermes Agent + Discord — Add Hermes to Discord with open DM policy (safe for invite-only bots)
- Hermes Agent + WhatsApp — Connect Hermes to WhatsApp via QR pairing
- Hermes Agent + Claude — Choose the best model for your Telegram bot
- Hermes Agent + MCP — Extend your Telegram bot with web search and tool access