Wiki · Start here

Telegram and Discord

So the agent answers from your phone — and nobody else can run anything with it.

✅ Verified 15. 10. 2026Source: official documentation →📋 Copy for your AI
📱
The agent does not have to live in a terminal. Connect it to Telegram or Discord and message it from your phone like a friend — it answers, runs commands and sends you a file. Only you (and whoever is on your list) can talk to the bot: access is keyed on a numeric ID, not on a name.

What you need

ItemWhat it is for
A running agent on a serverThe gateway is part of the agent — once it runs, you just switch the gateway on
A bot on Telegram or DiscordFree to create, a two-minute job (steps below)
Your numeric IDNot your name or handle. The number is how the agent knows it is you — and how nobody else can use your bot

Pick one platform, or both. Most people start with Telegram — it is the fastest route to your phone.

Telegram — step by step

  1. Create the bot. Message @BotFather with /newbot, answer the name questions, and it sends you a token. Treat it like a password and never share it.
  2. Find your numeric ID. Message @userinfobot and it replies with your ID (e.g. 123456789).
  3. Configure the agent. The easiest way is the wizard, which asks for the token and your ID and writes everything for you:
    $ hermes gateway setup
    Or do it by hand — add two lines to ~/.hermes/.env:
    # ~/.hermes/.env TELEGRAM_BOT_TOKEN=123456789:ABCdefGHIjklMNOpqrSTUvwxYZ TELEGRAM_ALLOWED_USERS=123456789 # separate several IDs with a comma
  4. Start the gateway and check it.
    $ hermes gateway start $ hermes gateway status
  5. Send the bot a message. It replies within seconds.

You can add the bot to a group, but by default Telegram will not let it read ordinary messages (privacy protection) — it only sees commands and @yourbot mentions. For group use, switch Group Privacy off in @BotFather.

What else it does: send and receive files and photos, transcribe voice messages, and deliver the output of scheduled jobs to a chosen conversation (TELEGRAM_HOME_CHANNEL).

Discord — step by step

  1. Create an application and a bot. At discord.com/developers/applications choose New Application, then Bot in the left menu.
  2. Enable message reading. Turn on Message Content Intent (a privileged permission). Without it the bot cannot see messages and looks dead.
  3. Copy the token (Reset Token) — it is shown once, so save it immediately.
  4. Invite the bot to your server. Generate an invite link in the Installation tab with the read/send messages and attach files permissions.
  5. Find your ID. Enable Developer Mode (User Settings → Advanced), then right-click your name and choose Copy User ID.
  6. Configure and start the agent — same as Telegram:
    # wizard (recommended) — pick Discord $ hermes gateway setup # or by hand in ~/.hermes/.env DISCORD_BOT_TOKEN=your-token DISCORD_ALLOWED_USERS=284102345871466496 # separate several IDs with a comma # and start it $ hermes gateway start

Mention the bot in a channel (@yourbot) — in normal channels it only reacts to mentions so it does not interrupt the conversation. In a direct message it answers anything. It also supports slash commands directly in Discord (for example status or switching the model).

You can split people into admins (all commands) and regular users (only the commands you allow) using allow_admin_from and user_allowed_commands. Handy for a family or a team — everyone else gets access only to what you grant.

Who can talk to the bot

RuleWhy
The token is a passwordWhoever gets it controls your bot. Never paste it into a chat or a repository. If you leak it, revoke it immediately (Reset Token in @BotFather / the Developer Portal)
The allow listThe bot only answers IDs on the list. A stranger who finds your bot gets no reply — and above all runs nothing
An empty list is an open doorLeave the list empty (or the "allow everyone" switch on Discord) and anyone can use your bot. Always add your own ID
One running gateway per tokenTwo agents sharing a token fight over messages and steal each other's replies

When it does not work

SymptomUsual cause and what to do
The bot is silentThe gateway is not running — check hermes gateway status and start it with hermes gateway start
It runs but ignores meYour ID is not on the list, or the wrong number is there (verify with @userinfobot). A common mistake is pasting a username instead of the number
Silent in groups, works in DMsGroup Privacy — turn it off in @BotFather, or address the bot with @yourbot
Looks dead on DiscordMessage Content Intent is off, or the invite link was generated without the needed permissions
Answered once, then nothingMost likely a second agent copy with the same token, or no model credit (see choosing a model)
It disappeared after a rebootThe gateway has to run as a service (systemd) to start by itself. The deployment docs cover it

Tips from running it

TipWhy
Start with TelegramTwo minutes of work and it works from your phone, no computer needed
Discord suits a groupChannels, mentions and separate permissions — the agent does not disturb other conversations
Have long output sent as a fileThe agent can attach a file (a listing or a table), which reads better in a chat than a wall of text
Check the status after every changehermes gateway status tells you whether the gateway runs and which platform is connected
Try a voice messageOn Telegram you can dictate the task instead of typing it

Where next

← Back to the wiki