Short answer
To set up a Hermes Agent gateway, put your platform credentials (a Telegram bot token, say) in ~/.hermes/.env, set an ALLOWED_USERS allowlist so strangers can't use the bot, and start hermes gateway. One process serves whichever of the 15 supported platforms you configure, and the same agent answers on each.
How the gateway works
A single hermes gateway process handles all connected platforms simultaneously. You run it once and it listens on all configured channels, delivering messages to the agent, running the inference loop, and sending responses back to the originating platform.
Security is opt-in per platform. Every platform has an ALLOWED_USERS environment variable that acts as an allowlist. Without it, the gateway accepts messages from anyone who finds your bot. That is a serious problem for an agent with shell access. Set allowlists before exposing any gateway publicly.
The alternative to manual allowlists is DM pairing codes: unknown users message your bot and receive a one-time pairing code that expires after one hour. You approve it with hermes pairing approve <platform> <code>. More scalable than maintaining a static list if you have multiple users.
Telegram
Telegram is the most commonly used Hermes gateway. Setup:
- Message @BotFather in Telegram → send
/newbot→ follow prompts → copy the token - Message @userinfobot to get your numeric user ID
- Add to
~/.hermes/.env:
- Test it:
hermes gateway - Install as service:
hermes gateway install
Or use the interactive wizard:
For webhook mode instead of long-polling (more reliable, lower latency):
Webhook mode requires a public HTTPS endpoint. Long-polling works fine for personal use without a domain.
Group chat access is disabled by default. To enable it: add TELEGRAM_ALLOW_GROUPS=true and be aware that everyone in the group who is in your allowlist can issue commands.
Discord
Discord support includes slash commands, thread responses, and voice channel transcription. Setup:
- Go to discord.com/developers/applications → New Application → name it
- Bot tab → Add Bot → copy the token
- OAuth2 tab → URL Generator → select
botandapplications.commandsscopes,Send Messages+Read Message History+Use Slash Commandspermissions → copy the generated URL and visit it to add the bot to your server - Enable Message Content Intent in the Bot tab (required for reading messages)
- Add to
.env:
Discord voice channel integration uses voice recognition to transcribe speech and pass it to the agent. Install the voice dependencies first:
For slash commands to appear, the bot registers them automatically on first connection. If they do not appear, kick and re-add the bot to the server to force command re-registration.
WhatsApp integration uses the Baileys library, an unofficial bridge that emulates the WhatsApp Web session protocol. No Meta developer account required.
Setup:
The wizard installs the Baileys bridge dependencies (requires Node.js v18+), displays a QR code, and you scan it: WhatsApp → Settings → Linked Devices → Link a Device. Session saves automatically.
Two modes: a separate bot number (dedicate a phone number to the bot for lower ban risk and a cleaner experience for multiple users) or personal self-chat (use your own WhatsApp number and message yourself to talk to the agent, which is easier to set up but carries more account risk).
The main risk: WhatsApp's terms prohibit unofficial automation. For personal use, ban risk is low. For anything resembling bulk messaging or outreach to people who have not opted in, the risk is significant. The official WhatsApp Business API (which Hermes does not use) is the compliant path for business use.
The email gateway uses standard IMAP (inbound) and SMTP (outbound). No external libraries.
For Gmail:
For Outlook/Microsoft 365:
Ports default to IMAP 993 (TLS) and SMTP 587 (STARTTLS). Override with EMAIL_IMAP_PORT and EMAIL_SMTP_PORT if needed.
Use a dedicated email account, not your personal inbox. The gateway reads and processes all incoming email to that address.
Webhooks
The webhook gateway runs an HTTP server on port 8644 and accepts POST requests, connecting Hermes to any service that sends webhooks: GitHub, GitLab, JIRA, Stripe, or custom triggers.
Create a named route:
Endpoint format: http://your-server:8644/webhooks/<route-name>
Health check: curl http://localhost:8644/health
Common uses: receive GitHub PR review requests for the agent to summarize, process JIRA ticket updates, handle Stripe payment events and trigger follow-up tasks. The agent receives the webhook payload, interprets it, and can use any of its tools in response.
The full list: all 15 platforms
The complete gateway list confirmed in the official documentation (15 total, not 12 as the README states):
- Telegram: most popular, long-polling or webhook mode
- Discord: slash commands, voice channel, thread support
- Slack: Slack app with OAuth, works in DMs and channels
- WhatsApp: Baileys bridge, unofficial
- Signal: requires Signal CLI installed and linked phone number
- SMS: Twilio integration, sends/receives SMS
- Email: IMAP/SMTP, any provider
- Home Assistant: integrates directly as a conversation agent
- Mattermost: self-hosted Slack alternative
- Matrix: decentralized messaging protocol (Element, etc.)
- DingTalk: Alibaba's enterprise messaging platform
- Feishu/Lark: ByteDance enterprise messenger
- WeCom: Tencent's enterprise WeChat variant
- Open WebUI / API Server: HTTP API endpoint for custom frontends
- Webhooks: generic HTTP webhook receiver
All gateways share the same security model: ALLOWED_USERS allowlist or DM pairing code approval. GATEWAY_ALLOWED_USERS applies across all connected platforms as a global setting. Per-platform variables override it. GATEWAY_ALLOW_ALL_USERS=true accepts messages from anyone. Do not set this on a gateway with shell access.
Running multiple gateways simultaneously
One hermes gateway process handles all configured platforms. Set credentials for Telegram and Discord both, and the same agent responds on both channels with shared memory and context. A message from Telegram and a message from Discord reach the same agent: your task history and preferences persist regardless of which platform you are messaging from.
The built-in cron scheduler runs inside the gateway process and can deliver to any connected platform. A morning briefing goes to Telegram, a work-hours alert to Slack, an end-of-day summary to Email, all from the same scheduled task configuration.
Token usage is higher through messaging gateways than CLI. Telegram adds roughly 15,000-20,000 tokens of overhead per message (versus 6,000-8,000 in CLI) due to AGENTS.md workspace files and additional context. At Sonnet 4.6 pricing, that is approximately $0.03-0.06 per message in overhead alone. Disable unused tool categories with hermes tools to reduce the baseline cost.
Hivra gateway setup
On Hivra, gateway configuration is handled through the dashboard: paste your Telegram bot token and user ID, click connect. The gateway service is managed, monitored, and restarted automatically. You do not need the hermes gateway install → systemctl → loginctl enable-linger sequence.
The dashboard's channel list includes Telegram, Discord, Slack, WhatsApp, Signal, SMS and Email. Multi-gateway setup (Telegram + Discord + Email simultaneously) works by adding credentials for each platform in the dashboard.
Common questions
How many messaging platforms does Hermes Agent support?
15, as of April 2026. The GitHub README says '12+', but the official documentation lists 15 distinct integrations: Telegram, Discord, Slack, WhatsApp, Signal, SMS (Twilio), Email, Home Assistant, Mattermost, Matrix, DingTalk, Feishu/Lark, WeCom, Open WebUI/API Server, and Webhooks.
Can I run Telegram and Discord at the same time on the same agent?
Yes. A single `hermes gateway` process handles all configured platforms. Set credentials for both in ~/.hermes/.env and the agent responds on both channels simultaneously with shared memory and context.
Is the WhatsApp integration official?
No. It uses the Baileys library, which emulates the WhatsApp Web session protocol. No Meta developer account is required, but the integration violates WhatsApp's terms. For personal use, ban risk is low. For business use requiring compliance, the official WhatsApp Business API is the correct path.
How do I prevent strangers from using my Hermes bot?
Set the ALLOWED_USERS variable for each platform: TELEGRAM_ALLOWED_USERS=your-numeric-id, DISCORD_ALLOWED_USERS=your-18-digit-id, etc. Alternatively, use DM pairing codes: unknown users receive a one-time code that you approve with `hermes pairing approve <platform> <code>`. Never set GATEWAY_ALLOW_ALL_USERS=true on an agent with shell access.
Why does my agent use more API tokens through Telegram than the CLI?
Messaging gateways load additional context files (AGENTS.md, workspace files) per message, adding roughly 15,000-20,000 tokens of overhead versus the CLI's 6,000-8,000. Reduce this with `hermes tools` to disable tool categories you don't use through that gateway.
Can Hermes Agent respond in voice on Discord?
Yes. Discord voice channel integration uses speech recognition to transcribe voice input and pass it as text to the agent. Text-to-speech output back into the voice channel is also supported with additional TTS provider configuration. Install voice dependencies with: hermes install --extras voice