📑 Table of contents

Multi-Platform Gateway: Discord, Slack, WhatsApp, and Beyond

Hermes Agent 🔴 Advanced ⏱️ 12 min read 📅 2026-05-05

Multi-Platform Gateway: Discord, Slack, WhatsApp, and Beyond

One AI agent, all your messaging platforms. That's the promise of the Hermes Agent gateway: a single background process that connects Telegram, Discord, Slack, WhatsApp, Signal, Email, Home Assistant, and Microsoft Teams — with one agent, one memory, one identity.

In this advanced guide, we explore the gateway architecture, per-platform configuration, cross-platform formatting, media handling, per-channel profiles, and best practices for deploying an agent accessible everywhere.

What is the Hermes Agent Gateway?

The gateway is a single background process that connects Hermes to your messaging platforms. It manages sessions, executes scheduled tasks (cron), transcribes voice messages, and delivers responses — all from one central point.

🏗️ Hub-and-spoke architecture: the GatewayRunner orchestrates platform adapters, routes messages to the agent, and persists session state. Each platform has a dedicated adapter implementing BasePlatformAdapter.

In practice, this means you can:
- Start a conversation on Telegram from your smartphone
- Continue it on Slack from your desktop
- Receive a voice response on Discord — with context preserved

Supported Platforms

Hermes Agent natively integrates with over a dozen platforms:

  • Telegram — webhook or polling, voice messages, topic groups
  • Discord — server bot, channels, private messages
  • Slack — workspace, channels, threads, bot app
  • WhatsApp — via WhatsApp Business API (Cloud API or Baileys)
  • Signal — end-to-end encrypted messaging
  • Email — receive and send via SMTP/IMAP
  • Home Assistant — notifications and smart home commands
  • Microsoft Teams — via plugin (extended adapter)
  • Matrix, Mattermost, IRC — communities and self-hosting
  • DingTalk, Feishu, WeChat — Chinese ecosystem (some via plugins)

Each adapter implements the same interfaces: message reception, response sending, media handling, slash commands — with platform-specific optimizations.

hermes gateway setup: Interactive Configuration

Everything starts with the setup wizard:

hermes gateway setup

This command launches an interactive wizard that guides you step by step:

  1. Platform selection — choose which platforms to enable
  2. Token configuration — enter API keys/bot tokens for each platform
  3. Allowlist setup — define who can interact with the agent
  4. Default channels — configure home channels and log channels
  5. Advanced settings — retry, timeout, session reset policy

💡 Tip: to reconfigure a single platform without relaunching the entire wizard, use hermes setup gateway which offers incremental configuration.

Tokens and secrets are stored in the .env file (never in the config YAML), ensuring separation between functional configuration and sensitive secrets.

hermes gateway status: Real-Time Diagnostics

Once the gateway is configured, diagnostics are essential:

hermes gateway status

This command displays the status of each connected platform:
- ✅ Connected — the adapter is working
- ⚠️ Degraded — working with limitations
- ❌ Disconnected — unable to reach the platform
- 🔄 Reconnecting — reconnection attempt in progress

For a complete diagnostic including the AI provider, cron tasks, and overall health:

hermes status

Per-Platform Configuration

Configuration File

The gateway configuration is located in ~/.hermes/config.yaml under the gateway: key:

gateway:
  platforms:
    telegram:
      enabled: true
      token: ${TELEGRAM_BOT_TOKEN}
      home_channel:
        platform: telegram
        chat_id: "-1001234567890"
        name: "Hermes Home"
    discord:
      enabled: true
      token: ${DISCORD_BOT_TOKEN}
      allowed_guilds:
        - "1234567890"
    slack:
      enabled: true
      bot_token: ${SLACK_BOT_TOKEN}
      app_token: ${SLACK_APP_TOKEN}
    whatsapp:
      enabled: true
    signal:
      enabled: true
      phone_number: "+1234567890"
    email:
      enabled: true
      smtp_host: ${SMTP_HOST}
      imap_host: ${IMAP_HOST}

Allowlists: Who Can Talk to Your Agent?

Security relies on platform-specific allowlists:

  • Telegram: allowlist by user_id or chat_id
  • Discord: allowlist by server (guild_id) and/or role
  • Slack: allowlist by workspace and channel
  • WhatsApp: allowlist by phone number
  • Signal: allowlist by phone number
  • Email: whitelist by domain or address
gateway:
  allowed_users:
    telegram: [123456789, 987654321]
    discord:
      guilds: ["1234567890"]
      roles: ["admin", "hermes-user"]
    slack:
      channels: ["C01ABCDEF", "C02GHIJKL"]
    email:
      whitelist: ["*@mycompany.com", "[email protected]"]

🔒 Security: without a configured allowlist, the agent could respond to anyone. Always configure an allowlist in production.

Cross-Platform Formatting: Automatic Adaptation

Each platform has its own formatting rules. Hermes handles this automatically:

  • Markdown → adapted per platform (Telegram takes a subset, Discord has its own markdown, Slack its own)
  • Mentions@user translated to each platform's native format
  • Code blocks → syntax highlighting adapted (some clients don't support colored code blocks)
  • Links → previews managed according to client capabilities
  • Long messages → automatic chunking to respect platform limits

For example, a response with Markdown code is rendered differently:
- Telegram: <pre><code class="language-python"> in HTML
- Discord: `python` with Discord syntax highlighting - **Slack**: `python ` in Markdown mode
- WhatsApp: plain text with indentation (no native markdown)

Media and File Handling Across Platforms

Hermes uses the MEDIA: system for files:

  • Images: sent/received on all media-capable platforms
  • Documents: PDF, text files — transferred across platforms
  • Voice messages: automatic transcription via Whisper (local, Groq, or OpenAI)
  • Generated files: scripts, reports — delivered as attachments

Images are validated before caching (cross-platform), and downloads are size-limited to prevent abuse.

Per-Platform Profiles: Different Tools per Channel

A powerful feature: configure different tools and behaviors per platform. For example:

  • Slack (work): productivity tools enabled, document search
  • Telegram (personal): smart home tools, reminders, daily summaries
  • Discord (community): moderation, FAQ, server bot integration
gateway:
  platform_profiles:
    slack:
      toolset: "work-productivity"
      personality: "professional"
    telegram:
      toolset: "personal-assistant"
      personality: "friendly"
    discord:
      toolset: "community-bot"
      personality: "helpful-bot"

Webhook vs Polling

Hermes supports both connection modes:

Webhook (recommended when possible):
- The platform pushes messages to your server
- Minimal latency
- Requires a publicly accessible server (HTTPS)
- Used by Telegram, Discord, Slack, Teams

Polling (fallback when webhook isn't possible):
- Hermes polls the platform periodically
- Slight latency (a few seconds)
- Works behind NAT/firewall
- Used by WhatsApp, Signal, Email

💡 VPS recommended: for webhooks, a VPS with a public IP is ideal. Hostinger offers VPS starting from a few euros per month, perfect for hosting the Hermes gateway 24/7.

# Install as systemd service (daemon)
hermes gateway install
# Start/stop
hermes gateway start    # foreground
hermes gateway stop     # stops the service

Gateway Logs and Monitoring

Structured Logs

The gateway generates detailed logs in ~/.hermes/logs/:
- Messages received and sent per platform
- Connection errors and retry attempts
- AI model response times
- Token usage per session

Monitoring Commands

hermes gateway status    # Connection status
hermes status            # Overall health (provider, cron, gateway)
hermes doctor            # Full diagnostic

Monitoring Webhook

Hermes exposes a webhook endpoint for external alerts — useful for integration with monitoring systems like Uptime Kuma or Grafana.

Complete Example: Multi-Platform Configuration

Here's a realistic scenario for an advanced user:

# ~/.hermes/config.yaml
gateway:
  platforms:
    telegram:
      enabled: true
      token: ${TELEGRAM_BOT_TOKEN}
      home_channel:
        platform: telegram
        chat_id: "-1001234567890"
    discord:
      enabled: true
      token: ${DISCORD_BOT_TOKEN}
      allowed_guilds: ["1234567890"]
    slack:
      enabled: true
      bot_token: ${SLACK_BOT_TOKEN}
      app_token: ${SLACK_APP_TOKEN}

  allowed_users:
    telegram: [123456789, 987654321]
    discord:
      guilds: ["1234567890"]
    slack:
      channels: ["C01ABCDEF"]

  platform_profiles:
    telegram:
      toolset: "personal-assistant"
      personality: "friendly"
    discord:
      toolset: "community-bot"
      personality: "helpful-bot"
    slack:
      toolset: "work-tools"
      personality: "professional"

  session:
    reset_policy: "after_idle_24h"
    cross_platform: true
# 1. Configure
hermes gateway setup

# 2. Verify configuration
hermes gateway status

# 3. Install as service
hermes gateway install

# 4. Start
hermes gateway start

Once running, your agent responds simultaneously on Telegram, Discord, and Slack — with personalities and tools adapted to each context.

Best Practices

  1. Start with one platform — add others one by one after validation
  2. Always configure an allowlist — never expose an agent without access control
  3. Use .env for secrets — never put tokens in plain text in the config YAML
  4. Install as a systemd service — for 24/7 operation with auto-restart
  5. Monitor logs — connection errors are the #1 cause of problems
  6. Test with hermes gateway status — after every configuration change
  7. Separate profiles by context — pro on Slack, personal on Telegram, community on Discord

Common Pitfalls

  • Expired token → platforms revoke tokens. Verify with hermes gateway setup
  • Forgotten allowlist → the agent won't respond to anyone if the allowlist is empty in restrictive mode
  • Inaccessible webhook → verify your server is reachable via HTTPS
  • Message too long → Hermes chunks automatically, but some platforms have strict limits
  • Media too heavy → images >20MB are rejected, PDFs >50MB too
  • Session conflict → same user on two platforms creates two sessions unless cross_platform: true

Per-Platform Security

Each platform has its own security requirements:

  • Telegram: secured bot token, allowlist by user_id, private mode for sensitive groups
  • Discord: restrictions by guild and role, limited intents
  • Slack: verification token, app-level restrictions, minimal OAuth scopes
  • WhatsApp: HMAC signature for webhooks, phone number verification
  • Signal: native E2E encryption, verified number
  • Email: SPF/DKIM/DMARC for deliverability, mandatory TLS

For more on security, check out our Telegram connection guide which details best practices for securing a bot.

Conclusion

The Hermes Agent multi-platform gateway transforms a terminal agent into an omnipresent assistant. One process, one memory, one identity — available on Telegram, Discord, Slack, WhatsApp, Signal, Email, and much more.

For a complete introduction to Hermes Agent, check out our installation and setup guide. For advanced configuration mastery, the models and providers guide is essential. And to fully exploit the agent's potential, discover the skills system that enables Hermes to learn and improve continuously.

The power of Hermes lies in its ability to adapt to every context — every platform, every user, every conversation. The gateway is the bridge that makes it all possible.