Agents and automation
Last updated
Hermes Agent bot mode: calling your agent from Telegram and Discord
The bot has shell access, so the gateway starts by admitting nobody.
Bot mode in Hermes Agent is the messaging gateway1. One background process receives Telegram, Discord, Slack and more, and also runs sessions and cron jobs. The default admits no one, so an allowlist2 or DM pairing comes first.
Bot mode is a program called the gateway
In a terminal, Hermes Agent starts with just hermes. Bot mode moves that conversation into a chat app, and a gateway process receives the channel and carries the session forward.
The same process checks cron jobs every 60 seconds, so scheduled work such as a morning digest can run through the bot.

Connecting a channel and installing the service
hermes gateway setup is an arrow-key wizard. It marks channels already configured and offers to start the gateway when it finishes.
Closing the terminal stops the bot, so install it as a service to keep it running: a user systemd service on Linux, launchd on macOS, with status to check it.
hermes gateway setup # 채널을 고르는 대화형 설정
hermes gateway install # 재부팅 후에도 돌도록 서비스 등록
hermes gateway start
hermes gateway statusAdmitting nobody is the default
The gateway denies every user who is neither on the allowlist nor paired by DM. For a bot with terminal access that is the right default.
Allowlisting needs the exact numeric ID: TELEGRAM_ALLOWED_USERS=123456789 for Telegram, DISCORD_ALLOWED_USERS for Discord — the variable name differs per channel.
You do not need the ID in advance: an unknown sender who DMs the bot receives a one-time code, and hermes pairing approve telegram CODE admits them.

Requests from chat run with the same permissions
Tools do not get weaker because the request came from chat. A file deletion or shell command from a message runs exactly as it would from the terminal.
So pin a single working folder and leave paths outside it closed. Check group chats separately: there is a setting that keeps the bot from answering group messages not addressed to it.
One direct message is enough for a first check
After allowlisting and restarting, send a read-only request such as 'count the files' from your own account. A reply means it is wired; silence points back to the allowlist or channel name.
Send a longer job to the background and check that the result returns to the same conversation. If it stalls, start with hermes gateway status and the logs to see whether the session survived.

Terminology notes
Gateway — A program that receives requests across clients, channels, models, or tools and routes them to the appropriate path.
Back to the textAllowlist — A policy that permits only pre-approved targets, such as tools, commands, users, or network destinations.
Back to the text
Frequently asked questions
- What should you check first in this article?
- Bot mode in Hermes Agent is the messaging gateway. One background process receives Telegram, Discord, Slack and more, and also runs sessions and cron jobs. The default admits no one, so an allowlist or DM pairing comes first.
Read next
Executable programs and extensions
Install Hermes Agent and Connect a Local Model: From Your First Task to Permission Checks
Agents and automation
QwenPaw: a personal AI assistant on your own model and chat apps
Executable programs and extensions
Local AI Agent Security: Check Permissions, Network Paths, and Secrets
read first
What Is a Local AI Agent? When It Makes Sense to Run One
