Connect It To Telegram Or WhatsApp.
How do you connect an AI agent to Telegram or WhatsApp?
Install Hermes, a free open-source agent from Nous Research that ships its own messaging gateway. For Telegram, message @BotFather, create a bot, and paste the token into hermes gateway setup. For WhatsApp, run hermes whatsapp and scan the QR code with your phone. Either way, the same agent, memory, and model now live inside a chat app you already have open.
How Do You Set It Up?
Watch the walkthrough, then read the steps below.
Open A Terminal.
A terminal is just a plain-text way to talk to your computer directly, one line at a time — no icons, no windows to click through. Every "black screen" in this lesson is that same window. On a Mac: press Cmd+Space, type Terminal, hit Enter. It is already installed, nothing to download. On Windows: search for Terminal in the Start menu.
You only open it once. Every step below that shows a command just means switching back to this same window and typing into it.
Confirm Hermes Is Ready.
In that terminal window, type the command below and press Enter. It shows the model, provider, and which API keys are configured. Fix anything missing before wiring up a chat platform.
- →
hermes status
Already running Hermes for something else? Create a separate sandbox first: hermes profile create lesson. Each profile gets its own gateway, its own bot slot, and its own config, so testing a new bot can never knock an existing one offline.
Create A Telegram Bot.
Open Telegram, message @BotFather, and send the command below. It will then ask for a name (anything you want) and a username ending in "bot". BotFather hands back a token immediately. That token is the bot's password — copy it, do not post it anywhere.
- →
/newbot
One Telegram account can hold many bots. Give this one a name that will not be confused with any bot you already run.
Wire The Token Into Hermes.
Back in that same terminal window, type the first command below and press Enter. Choose Telegram, and paste the token when asked. Then type the second command — the gateway only picks up a new token on restart, not automatically.
- →
hermes gateway setup - →
hermes gateway restart
It will also ask which numeric Telegram user IDs are allowed to message the bot. Skipping this lets anyone who finds the bot talk to it.
Message The Bot.
Open the new bot in Telegram and send it something real. It answers using whatever model you picked, with Hermes' own memory and tools behind it, not a blank first message.
Pair WhatsApp.
Same terminal window again: type the command below and press Enter. Choose personal number (self-chat) unless you have a second phone number set aside for a dedicated bot. It prints a QR code, then scan it — but from inside the WhatsApp app itself (Settings, Linked Devices, Link a Device), never from your phone's regular Camera app, which just tries to open it as a generic code.
- →
hermes whatsapp
The QR refreshes every 20-30 seconds. Have WhatsApp's scanner already open before you run the command so you are not racing the refresh.
Restart, Then Message It On WhatsApp Too.
In the terminal, type the command below once more so the new WhatsApp pairing loads. Then message your own number in WhatsApp and watch the same agent answer there — one brain, two chat apps.
- →
hermes gateway restart
What Should You Use It For?
A daily-driver assistant that lives where you already are all day, instead of one more browser tab you have to remember to open.
Message the agent from your phone between calls to draft a reply, check a number, or kick off a task, then get the result back in the same thread.
Voice-memo a task into WhatsApp while you're out, and it's already working by the time you're back at a keyboard.
When Should You Skip It?
- •You just want a chatbot in Telegram. Telegram already has a free, official Grok bot built in for that. Hermes is worth the extra setup only once you want it to act, not just answer, or want it running on infrastructure that outlives your phone battery.
- •You never plan to leave your laptop. If the agent only ever needs to run in a terminal in front of you, the messaging gateway is a step you can skip entirely.
- •You want it fully unattended on WhatsApp with no allow-list. The setup wizard asks for allowed numbers up front (WHATSAPP_ALLOWED_USERS) — do not skip it, or anyone who finds the paired number can prompt your agent.
What Does This Replace?
Nothing you were already paying for — Hermes is free and open source. What it replaces is the habit of opening a browser tab to talk to an AI: the same agent now answers wherever you already are.
Where Next?
* Tool outputs shown in video walkthroughs are representative. Results vary by account, setup, and configuration.
Verification
- Last verified:
- September 7, 2026
- Platform tested:
- Hermes Agent v0.20.0 (2026.8.3), macOS, gateway service running via launchd
- Plan tested:
- Free and open source. A model provider (OpenRouter, OpenAI, or your own endpoint) is separate and billed by that provider, not by Hermes.
- Model shown:
- qwen/qwen3.7-flash via OpenRouter
- Official source:
- Hermes Agent docs
- Screenshots updated:
- September 7, 2026 (hero + all 6 steps rendered from a harness built from real captured session text — fake-ui-video-projects/learn-hermes-connect-to-telegram-and-whatsapp)