Lesson 3: Multi-Platform Gateway

Lesson 3: Multi-Platform Gateway

Learning Objectives

  • Configure Hermes gateways for Slack, Discord, Email, and Matrix
  • Implement message routing and team-specific channels
  • Design a unified communication architecture for the organization

NovaCraft’s Communication Stack

NovaCraft uses multiple platforms:

Platform Users Usage
Slack All 50 Primary internal comms
Discord Engineering (20) Dev discussions, on-call
Email All 50 External comms, formal requests
Matrix Security team (5) Sensitive discussions

Priya wants Hermes available on all platforms so teams don’t have to switch tools.


3.1 Why Multi-Platform

Without multi-platform:
  Engineer → Switch to CLI → Ask Hermes → Copy answer → Paste in Slack

With multi-platform:
  Engineer → @hermes in Slack → Answer appears in-thread

Unified Experience

┌────────────────────────────────────────┐
│              Hermes Agent               │
│                                         │
│  ┌────────┐ ┌────────┐ ┌───────────┐  │
│  │ Slack  │ │Discord │ │  Email    │  │
│  │Gateway │ │Gateway │ │ Gateway   │  │
│  └───┬────┘ └───┬────┘ └────┬──────┘  │
│      │          │           │          │
│  ┌───▼──────────▼───────────▼──────┐   │
│  │     Shared Context & Memory      │   │
│  │     SOUL.md · Skills · MCP       │   │
│  └─────────────────────────────────┘   │
└────────────────────────────────────────┘

All platforms share the same memory, skills, and context.


3.2 Slack Gateway

Create Slack App

1. Go to api.slack.com/apps → Create New App
2. Name: "NovaCraft AI"
3. Workspace: NovaCraft

Bot Token Scopes:
  - chat:write
  - channels:history
  - channels:read
  - groups:history
  - groups:read
  - im:history
  - im:read
  - im:write
  - app_mentions:read

4. Install to workspace
5. Copy Bot User OAuth Token (xoxb-...)

Connect to Hermes

hermes gateway setup slack
# Paste Bot Token when prompted

hermes gateway start slack

Channel Routing

# Configure which channels Hermes responds in
slack:
  channels:
    - name: "#engineering"
      skills: ["deploy-checklist", "incident-triage", "pr-summary"]
      require_mention: true    # Only respond when @mentioned
    
    - name: "#marketing"
      skills: ["content-review", "analytics-report"]
      require_mention: true
    
    - name: "#hermes-general"
      require_mention: false   # Always respond in dedicated channel

Thread Management

User in #engineering:
  @hermes summarize the last 3 PRs

Hermes replies in-thread:
  Here's a summary of the 3 most recent PRs:
  
  1. **PR #342** — Add OAuth2 flow
     Author: @alex | Status: Ready for review
     Changes: 12 files, +480/-120 lines
  
  2. **PR #341** — Fix pagination bug
     Author: @sam | Status: Merged
     ...

3.3 Discord Gateway

Create Discord Bot

1. Go to discord.com/developers → New Application
2. Name: "NovaCraft AI"
3. Bot tab → Add Bot
4. Enable Message Content Intent
5. Permissions:
   - Send Messages
   - Read Message History
   - Use Slash Commands
   - Manage Threads
6. Copy Bot Token
7. Invite to server with OAuth2 URL

Connect to Hermes

hermes gateway setup discord
# Paste Bot Token

hermes gateway start discord

Role-Based Access

discord:
  server: "NovaCraft Dev"
  role_permissions:
    engineers:
      skills: ["all"]
      tools: ["all"]
    on-call:
      skills: ["incident-triage", "deploy-status"]
      tools: ["terminal", "monitoring"]
    general:
      skills: ["general-qa"]
      tools: ["search"]

3.4 Email Gateway

Configuration

hermes gateway setup email
email:
  imap:
    host: imap.gmail.com
    port: 993
    username: hermes@novacraft.io
    password: ${EMAIL_PASSWORD}
  smtp:
    host: smtp.gmail.com
    port: 587
    username: hermes@novacraft.io
    password: ${EMAIL_PASSWORD}
  
  allowed_senders:
    - "*@novacraft.io"      # All company emails
  
  auto_reply: true
  signature: |
    ---
    NovaCraft AI Assistant
    Powered by Hermes Agent

Email Threading

From: priya@novacraft.io
To: hermes@novacraft.io
Subject: Q1 Revenue Summary

Can you pull our Q1 revenue numbers from the dashboard
and create a summary for the board?

---

From: hermes@novacraft.io
To: priya@novacraft.io
Subject: Re: Q1 Revenue Summary

Here's the Q1 revenue summary:

**NovaCraft Q1 2026 Revenue**
- Total ARR: $5.2M (+18% QoQ)
- New customers: 34
- Churn rate: 2.1%
- NRR: 115%
...

3.5 Matrix Gateway

Setup

hermes gateway setup matrix
matrix:
  homeserver: "https://matrix.novacraft.internal"
  username: "@hermes:novacraft.internal"
  password: ${MATRIX_PASSWORD}
  
  rooms:
    - "!abc123:novacraft.internal"  # Security team room
  
  end_to_end_encryption: true   # E2EE for sensitive topics

Matrix is ideal for the security team because:

  • Self-hosted (no third-party data access)
  • End-to-end encrypted
  • Federated (can communicate with external partners)

3.6 Multi-Gateway Architecture

Platform Priority

When a message could come from multiple platforms, configure priority:

gateways:
  priority: [slack, discord, email, matrix]
  
  deduplication: true    # Don't process the same request twice
  
  cross_platform:
    enabled: false       # Don't send Slack messages to Discord

Monitoring

# Check gateway status
hermes gateway list

# Output:
# Gateway     Status    Messages (24h)
# slack       ✅ Active  142
# discord     ✅ Active   38
# email       ✅ Active   15
# matrix      ✅ Active    7

3.7 Hands-On Exercise

  1. Slack Setup: Create a Slack app and connect to Hermes

  2. Channel Routing: Configure 3 channels with different skill sets

  3. Email Setup: Configure IMAP/SMTP for your team email

  4. Test Cross-Platform: Send the same query on Slack and Email, verify identical responses

  5. Monitor: Check hermes gateway list for message counts


Lesson Summary

Key Point Details
Multi-Platform Same Agent, same memory, all platforms
Slack @mention-based, thread-aware
Discord Role-based permissions
Email Auto-reply with threading
Matrix E2EE for sensitive teams

Next Lesson: Security Hardening—protecting your organization with approval workflows.