From 05048760c9ae61bdfc2baed63ea523e8db94475e Mon Sep 17 00:00:00 2001 From: Teknium Date: Thu, 2 Apr 2026 12:23:09 -0700 Subject: [PATCH] docs: add Configuration Options section to Slack docs Documents all config.yaml options for the Slack bot: - Thread & reply behavior (reply_to_mode, reply_broadcast) - Session isolation (group_sessions_per_user) - Mention & trigger behavior (require_mention, mention_patterns, reply_prefix) - Unauthorized user handling (unauthorized_dm_behavior) - Voice transcription (stt_enabled) - Full example config showing all options together Includes a note about Slack's hardcoded @mention requirement in channels (no free_response_channels equivalent like Discord/Telegram). --- website/docs/user-guide/messaging/slack.md | 111 +++++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/website/docs/user-guide/messaging/slack.md b/website/docs/user-guide/messaging/slack.md index 21511f77dc..fee618955d 100644 --- a/website/docs/user-guide/messaging/slack.md +++ b/website/docs/user-guide/messaging/slack.md @@ -219,6 +219,117 @@ This is intentional — it prevents the bot from responding to every message in --- +## Configuration Options + +Beyond the required environment variables from Step 8, you can customize Slack bot behavior through `~/.hermes/config.yaml`. + +### Thread & Reply Behavior + +```yaml +platforms: + slack: + # Controls how multi-part responses are threaded + # "off" — never thread replies to the original message + # "first" — first chunk threads to user's message (default) + # "all" — all chunks thread to user's message + reply_to_mode: "first" + + extra: + # Also post thread replies to the main channel + # (Slack's "Also send to channel" feature). + # Only the first chunk of the first reply is broadcast. + reply_broadcast: false +``` + +| Key | Default | Description | +|-----|---------|-------------| +| `platforms.slack.reply_to_mode` | `"first"` | Threading mode for multi-part messages: `"off"`, `"first"`, or `"all"` | +| `platforms.slack.extra.reply_broadcast` | `false` | When `true`, thread replies are also posted to the main channel. Only the first chunk is broadcast. | + +### Session Isolation + +```yaml +# Global setting — applies to Slack and all other platforms +group_sessions_per_user: true +``` + +When `true` (the default), each user in a shared channel gets their own isolated conversation session. Two people talking to Hermes in `#general` will have separate histories and contexts. + +Set to `false` if you want a collaborative mode where the entire channel shares one conversation session. Be aware this means users share context growth and token costs, and one user's `/reset` clears the session for everyone. + +### Mention & Trigger Behavior + +```yaml +slack: + # Require @mention in channels (this is the default behavior; + # the Slack adapter enforces @mention gating in channels regardless, + # but you can set this explicitly for consistency with other platforms) + require_mention: true + + # Custom mention patterns that trigger the bot + # (in addition to the default @mention detection) + mention_patterns: + - "hey hermes" + - "hermes," + + # Text prepended to every outgoing message + reply_prefix: "" +``` + +:::info +Unlike Discord and Telegram, Slack does not have a `free_response_channels` equivalent. The Slack adapter always requires `@mention` in channels — this is hardcoded behavior. In DMs, the bot always responds without needing a mention. +::: + +### Unauthorized User Handling + +```yaml +slack: + # What happens when an unauthorized user (not in SLACK_ALLOWED_USERS) DMs the bot + # "pair" — prompt them for a pairing code (default) + # "ignore" — silently drop the message + unauthorized_dm_behavior: "pair" +``` + +You can also set this globally for all platforms: + +```yaml +unauthorized_dm_behavior: "pair" +``` + +The platform-specific setting under `slack:` takes precedence over the global setting. + +### Voice Transcription + +```yaml +# Global setting — enable/disable automatic transcription of incoming voice messages +stt_enabled: true +``` + +When `true` (the default), incoming audio messages are automatically transcribed using the configured STT provider before being processed by the agent. + +### Full Example + +```yaml +# Global gateway settings +group_sessions_per_user: true +unauthorized_dm_behavior: "pair" +stt_enabled: true + +# Slack-specific settings +slack: + require_mention: true + unauthorized_dm_behavior: "pair" + +# Platform config +platforms: + slack: + reply_to_mode: "first" + extra: + reply_broadcast: false +``` + +--- + ## Home Channel