Home / Blog / Hermes Agent gateway setup: Telegram, Discord, WhatsApp, Email and 11 more
The README says 12+ platforms. It's actually 15. Here's how to set up each one.

Hermes Agent gateway setup: Telegram, Discord, WhatsApp, Email and 11 more

Hermes Agent can receive messages and send responses through 15 distinct platforms: Telegram, Discord, Slack, WhatsApp, Signal, SMS, Email, Home Assistant, Mattermost, Matrix, DingTalk, Feishu/Lark, WeCom, Open WebUI, and Webhooks. This guide covers the practical setup for the most commonly used ones, the security model that applies across all of them, and the tradeoffs worth knowing before you connect anything.

Hermes OS team15 April 202613 min read

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. The gateway delivers messages to the agent, runs the inference loop, and sends responses back to the originating platform.

Security is opt-in per platform. Every platform has an ALLOWED_USERS environment variable that acts as a whitelist. Without it, the gateway accepts messages from anyone who finds your bot. That's 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>. This is more scalable than maintaining allowlists for multiple users.

Telegram

Telegram is the most commonly used Hermes gateway. Setup:

  1. Message @BotFather in Telegram → send /newbot → follow prompts → copy the token
  2. Message @userinfobot to get your numeric user ID
  3. Add to ~/.hermes/.env:
TELEGRAM_BOT_TOKEN=1234567890:AAF...
TELEGRAM_ALLOWED_USERS=123456789
# Multiple users: TELEGRAM_ALLOWED_USERS=123456789,987654321
  1. Test manually: hermes gateway
  2. Install as service: hermes gateway install

Or use the interactive setup wizard:

hermes gateway setup

For webhook mode instead of long-polling (more reliable, lower latency):

TELEGRAM_WEBHOOK_URL=https://your-domain.com/webhooks/telegram

You need a public HTTPS endpoint for webhook mode. Long-polling works fine for personal use without a domain.

Group chat access is disabled by default. If you want Hermes responding in a Telegram group, 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:

  1. Go to discord.com/developers/applications → New Application → name it
  2. Bot tab → Add Bot → copy the token
  3. OAuth2 tab → URL Generator → select bot and applications.commands scopes, Send Messages + Read Message History + Use Slash Commands permissions → copy and visit the generated URL to add the bot to your server
  4. Enable Message Content Intent in the Bot tab (required for reading messages)
  5. Add to .env:
DISCORD_BOT_TOKEN=MTq...
DISCORD_ALLOWED_USERS=123456789012345678  # Discord user ID (18 digits)
DISCORD_ALLOWED_GUILDS=987654321098765432  # Optional: restrict to specific server

Discord voice channel integration uses voice recognition to transcribe speech and pass it to the agent. This requires the voice dependencies:

hermes install --extras voice

The agent responds in text by default. Voice output (text-to-speech back into the voice channel) is supported with additional config — check the official docs for TTS provider setup.

For slash commands (typing /ask instead of mentioning the bot), the bot registers its commands automatically on first connection. If slash commands don't appear, kick and re-add the bot to the server to force a command re-registration.

WhatsApp

WhatsApp integration uses the Baileys library — an unofficial bridge that emulates the WhatsApp Web session protocol. No Meta developer account is required, and no WhatsApp Business API verification is needed. The tradeoff: it is unofficial, and WhatsApp can restrict accounts that automate message sending.

Setup:

hermes whatsapp

The wizard will:

  1. Install the Baileys bridge dependencies (requires Node.js v18+)
  2. Display a QR code in the terminal
  3. You scan it: WhatsApp → Settings → Linked Devices → Link a Device
  4. Session saves automatically

Two modes:

  • Separate bot number (recommended): dedicate a phone number to the bot. Lower ban risk, cleaner UX for multiple users.
  • Personal self-chat: use your own WhatsApp number, message yourself to talk to the agent. Easier to set up, 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 contacting people who haven't opted in, the risk is significant. The official WhatsApp Business API (which Hermes does not use) is the compliant alternative for business use cases.

Email

The email gateway uses standard IMAP (inbound) and SMTP (outbound). No external libraries — it uses Python's built-in imaplib, smtplib, and email modules.

For Gmail:

# First: Enable 2FA on your Google account
# Then: myaccount.google.com/apppasswords → create app password for Mail

EMAIL_ADDRESS=hermes@gmail.com
EMAIL_PASSWORD=xxxx-xxxx-xxxx-xxxx  # 16-char app password, NOT your Gmail password
EMAIL_IMAP_HOST=imap.gmail.com
EMAIL_SMTP_HOST=smtp.gmail.com
EMAIL_ALLOWED_USERS=you@yourdomain.com,colleague@work.com

For Outlook/Microsoft 365:

EMAIL_IMAP_HOST=outlook.office365.com
EMAIL_SMTP_HOST=smtp.office365.com
# App password: account.microsoft.com/security → Additional security options

Ports default to IMAP 993 (TLS) and SMTP 587 (STARTTLS). Most providers work with just the host names — override with EMAIL_IMAP_PORT and EMAIL_SMTP_PORT if needed.

The gateway polls IMAP for new messages. 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, letting you connect Hermes to any service that can send webhook events: GitHub, GitLab, JIRA, Stripe, or anything custom.

WEBHOOK_ENABLED=true
WEBHOOK_PORT=8644
WEBHOOK_SECRET=your-global-secret  # Used for HMAC signature validation

Create a named route:

hermes webhook subscribe

Endpoint format: http://your-server:8644/webhooks/<route-name>

Health check: curl http://localhost:8644/health

Common use cases: receive GitHub PR review requests and have the agent write a summary; process JIRA ticket updates; handle Stripe payment events and trigger follow-up actions. The agent receives the webhook payload, interprets it, and can use any of its tools (file access, shell, browser) to respond.

The other 9 platforms

The complete list of Hermes Agent gateways confirmed by the official documentation (15 total, not 12):

  1. Telegram — most popular, long-polling or webhook mode
  2. Discord — slash commands, voice channel, thread support
  3. Slack — Slack app with OAuth, works in DMs and channels
  4. WhatsApp — Baileys bridge, unofficial
  5. Signal — requires Signal CLI installed and linked phone number
  6. SMS — Twilio integration, sends/receives SMS
  7. Email — IMAP/SMTP, any email provider
  8. Home Assistant — integrates directly with HA as a conversation agent
  9. Mattermost — self-hosted Slack alternative
  10. Matrix — decentralized messaging protocol (Element, etc.)
  11. DingTalk — Alibaba's enterprise messaging platform
  12. Feishu/Lark — ByteDance enterprise messenger
  13. WeCom — Tencent's enterprise WeChat variant
  14. Open WebUI / API Server — HTTP API endpoint for custom frontends or integration with Open WebUI
  15. Webhooks — generic HTTP webhook receiver

All gateways share the same security model: ALLOWED_USERS allowlist or DM pairing code approval. Global: GATEWAY_ALLOWED_USERS applies across all connected platforms. Per-platform variables override the global setting. Setting GATEWAY_ALLOW_ALL_USERS=true accepts messages from anyone — never do this for a gateway with shell access.

Running multiple gateways simultaneously

One hermes gateway process handles all configured platforms. If you set up both Telegram and Discord credentials, the same agent instance responds on both. A message from Telegram and a message from Discord reach the same agent with the same memory and context.

The built-in cron scheduler runs inside the gateway process, ticking every 60 seconds. Scheduled tasks can deliver to any connected platform — a morning briefing can go to Telegram, a work-hours alert to Slack, and an end-of-day summary to Email.

Token usage is higher through messaging gateways than CLI. The official documentation notes that Telegram adds roughly 15,000-20,000 tokens of overhead per message (vs 6,000-8,000 in CLI) due to AGENTS.md workspace files and additional context. At OpenRouter pricing for Claude Sonnet, that is approximately $0.03-0.06 per message just in overhead. Use hermes tools to disable unused tool categories to reduce the baseline token cost.

Hermes OS and gateway setup

On Hermes OS, gateway configuration is handled through the dashboard — paste your Telegram bot token and user ID, click connect, done. The gateway service is managed, monitored, and restarted automatically. You do not need to manage the hermes gateway installsystemctlloginctl enable-linger sequence manually.

All 15 gateways are available on Hermes OS. Multi-gateway setup (Telegram + Discord + Email simultaneously) works without any additional configuration beyond adding the credentials for each platform.

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 is unofficial and violates WhatsApp's terms of service. For personal use, ban risk is low. For business use requiring compliance, use the official WhatsApp Business API (which Hermes does not currently support).

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. An alternative is 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?

Telegram and other messaging gateways load additional context files (AGENTS.md, workspace files) per message, adding roughly 15,000-20,000 tokens of overhead vs 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 (transcription) to take voice input and pass it to the agent as text. 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

Deploy in 5 minutes.

7-day money-back guarantee. BYO AI key. From $19/mo.

Start Now
Related reading
How to self-host Hermes Agent on a VPSHermes Agent memory explained: SOUL.md, MEMORY.md, sessions, and HonchoBest VPS for Hermes Agent in 2026: Hetzner vs DigitalOcean vs OVHHermes Agent vs OpenClaw: a direct comparison