# Messaging Gateway Setup Guide

**Source:** r/hermesagent community discussion (May 2026)

---

## Available Messaging Platforms

| Platform | Popularity | Setup Difficulty | Best For |
|----------|-----------|-----------------|----------|
| Telegram | Most popular | Easy | Primary interface, topics for sessions |
| Discord | Second most popular | Medium | Team/family setups, channel mapping |
| WhatsApp | Available | Medium | Personal messaging integration |
| Signal | Available | Medium | Privacy-focused users |
| Email | Available | Medium | Async communication, research delivery |
| CLI | Built-in | None | Local development, testing |

---

## Telegram Setup (Most Popular)

### Basic Configuration

1. Create bot via @BotFather on Telegram
2. Save bot token securely
3. Configure in Hermes config.yaml:
   \`\`\`yaml
   telegram:
     enabled: true
     bot_token: "YOUR_BOT_TOKEN"
   \`\`\`

### Advanced Patterns

**Dedicated Gmail for Bot (u/ButterscotchTiny1114):**
- Create separate Gmail account for Hermes
- Hermes responds to emails sent to it and can reply
- Don't give access to main inbox during testing

**Telegram Groups for Automation:**
- Main chat for general conversation
- Separate group for news digests
- Separate group for weekly SEO/SERP reports
- General chat group for other automations (u/dontforgetthef)

### Upcoming Feature: Topic-to-Profile Routing

Community excitement about routing different Telegram topics to different Hermes profiles through one bot. Each topic gets its own profile context. (u/Plenty_Mixture3001, 167 upvotes)

**Current workaround:** Use separate Telegram groups/channels per profile and map each to a different Hermes instance.

---

## Discord Setup

### Configuration

1. Create Discord application and bot
2. Configure permissions and invite to server
3. Map channels to Hermes sessions/profiles
4. Set up in config.yaml

### Best Practices
- Use separate channels for different purposes (general, coding, research)
- Channel names help Hermes understand context
- Role-based permissions control who can interact with bot

---

## Email Integration

### Gmail API Setup

1. Create Google Cloud project with Gmail API enabled
2. Generate OAuth credentials or service account
3. Configure in Hermes with appropriate scopes

**Security note:** Use dedicated Gmail account, not primary personal email.

### AgentMail Skill

Community mentions "AgentMail" skill for email management (u/brav0charli3). Check skills directory for implementation details.

---

## Multi-Profile Messaging Setup

**Question by u/AnimatorOk130:** Setting up separate profiles for family members with independent bots.

### Pattern: One Profile Per Person

1. Create profile for each user (e.g., "Jonathan", "Wife")
2. Each profile gets own Telegram bot token OR use topic routing
3. Independent workspaces and memories
4. Shared resources via shared calendar/email forwarding

### Google Workspace Setup (u/aaronmcbaron)

- Set up Google Workspace for Hermes accounts
- Two-factor auth solved by having Hermes use pyotp to simulate Authenticator
- Custom skill stores codes for generation and runs token generation autonomously

---

## WhatsApp and Signal

Both available through Hermes messaging gateway. Configuration similar to Telegram but requires platform-specific setup:

**WhatsApp:**
- Requires WhatsApp Business API or personal account linking
- May have rate limits on personal accounts

**Signal:**
- Privacy-focused option
- Setup via signal-cli or similar bridge

---

## Messaging Best Practices

### Session Management
- Use separate chats/groups for different purposes
- Keep conversations focused - start new chats for new topics
- Telegram topics (when available) provide clean session boundaries

### Security
- Dedicated accounts for Hermes on all platforms
- Forward emails rather than giving full inbox access
- Share specific calendar events rather than full calendar access
- Prompt injection through calendar invites is a real threat (u/mseewald)

### Cost Management
- Each message consumes tokens based on context length
- Shorter conversations = lower costs
- Use cron jobs for scheduled deliveries instead of keeping active sessions open

---

## Troubleshooting Messaging Issues

### Bot Not Responding
1. Check gateway logs for errors
2. Verify bot token is correct and active
3. Ensure Hermes process is running
4. Check platform-specific rate limits

### Session Lost After Restart
- Sessions are tied to active gateway process
- Use memory system for cross-session persistence
- Cron jobs run independently of sessions

### Multiple Platforms Conflicting
- Each platform should have separate gateway configuration
- Profile isolation prevents cross-platform contamination
- Memory system provides controlled cross-platform continuity