Build a Discord Bot Agent
Combine an Aether Forge agent with the Hermes MCP server to build a Discord bot that responds with LLM-driven decisions.
Architecture
User → Discord → Hermes Agent → MCP server → Aether Forge agentHermes Agent is a messaging gateway that exposes Discord (and 14 other platforms) as MCP tools. Your agent declares Hermes as an MCP server and calls messages_send / messages_list tools.
1. Install Hermes
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
hermes login discord
hermes accounts list2. Create the agent
forge generate-fast \
--name discord-helper \
--idea "Discord bot that answers crypto questions using market data" \
--strategy-file strategy.md \
--planner-mode openrouter \
--planner-model anthropic/claude-sonnet-4 \
--output ./discord-helper3. Wire Hermes as MCP
Edit discord-helper/aether-forge.json:
{
"planner": {
"mode": "openrouter",
"model": "anthropic/claude-sonnet-4"
},
"mcp_servers": {
"hermes": {
"command": "hermes",
"args": ["mcp", "serve"]
}
}
}4. Strategy: respond to mentions
discord-helper/strategy.md:
# Discord Crypto Helper
## Mission
Monitor my Discord channel #crypto. When someone mentions @me or asks a question
about ETH/BTC/SOL prices, respond with current market data.
## Workflow each tick
1. Call `messages_list` with platform=discord, channel=#crypto, since=last_tick
2. For each new message that mentions me OR contains "?":
- Identify the token mentioned (ETH, BTC, SOL)
- Call `cap-market-btc-price` to get current data
- Compose a helpful response
- Call `messages_send` to reply
## Rules
- Never send more than 5 messages per minute
- Never respond to bots
- If price data is unavailable, say "data not available right now"
- Keep responses under 280 characters
## Memory
- Track which messages I've already responded to (don't double-reply)
- Remember user preferences (e.g., "@user prefers prices in EUR")5. Run
forge run ./discord-helper --mode paper --auto-approve --interval 30 \
--planner-mode openrouter --planner-model anthropic/claude-sonnet-4The agent now polls Discord every 30 seconds and responds to mentions.
6. Verify with forge doctor
forge doctor ./discord-helper/aether-forge.json[ ok] MCP server [hermes]: 10 tools available (stdio)Adding cost control
If responses use a paid LLM, cap daily spend. Edit aether-forge.json:
{
"x402_budget": {
"max_per_call_usd": 0.01,
"max_session_usd": 1.00,
"max_daily_usd": 5.00
}
}The framework tracks LLM cost in x402_state.json and refuses calls past the cap.
Adding personality
Add to strategy.md:
## Voice
- Friendly but concise
- Use emojis sparingly (one per message max)
- Quote actual numbers, not "high" or "low"
- Sign off with "—" if the conversation feels doneProduction deploy
- Wrap Hermes credentials and OPENROUTER_API_KEY as secrets
- Use the generated
Dockerfile - Set
--health-port 8080and monitor/ready - Add a kill switch alert: if
forge halttriggers, page someone
docker run -d \
-e HERMES_TOKEN=$HERMES_TOKEN \
-e OPENROUTER_API_KEY=$OPENROUTER_API_KEY \
-p 8080:8080 \
-v $(pwd)/.ows:/app/.ows \
-v $(pwd)/memory.db:/app/memory.db \
discord-helperVariants
- Telegram trading alerts — same pattern, swap
discord→telegramin strategy - Slack ops bot — respond to
/incidentslash commands - Whatsapp DCA reminder — daily ping when it’s time to buy
Last updated on