Problem
The Slack adapter unconditionally drops all bot messages at line 631 of gateway/platforms/slack.py:
# Ignore bot messages (including our own)
if event.get("bot_id") or event.get("subtype") == "bot_message":
return
There is no configuration option to override this behavior. This means bot-to-bot communication is impossible on Slack — even when another bot explicitly @mentions the Hermes bot, the message is silently dropped.
Discord already solved this
The Discord adapter (gateway/platforms/discord.py, lines 539-551) has a DISCORD_ALLOW_BOTS env var with three modes:
"none" — ignore all other bots (default)
"mentions" — accept bot messages only when they @mention us
"all" — accept all bot messages
if getattr(message.author, "bot", False):
allow_bots = os.getenv("DISCORD_ALLOW_BOTS", "none").lower().strip()
if allow_bots == "none":
return
elif allow_bots == "mentions":
if not self._client.user or self._client.user not in message.mentions:
return
# "all" falls through to handle_message
Requested change
Add an equivalent SLACK_ALLOW_BOTS env var to the Slack adapter with the same three modes (none / mentions / all), defaulting to "none" for backward compatibility.
The implementation would replace the current hard filter with:
if event.get("bot_id") or event.get("subtype") == "bot_message":
allow_bots = os.getenv("SLACK_ALLOW_BOTS", "none").lower().strip()
if allow_bots == "none":
return
elif allow_bots == "mentions":
bot_user_id = getattr(self, "_bot_user_id", "")
if bot_user_id and f"<@{bot_user_id}>" not in text:
return
# "all" falls through
# Still ignore our own messages
if event.get("bot_id") == getattr(self, "_bot_id", None):
return
Note: The self-message guard should remain to prevent echo loops regardless of mode.
Use case
Multi-agent setups where different AI agents (running on different platforms/frameworks) coexist in the same Slack workspace and need to communicate via @mentions. Without this, Slack is the only platform where bot-to-bot handoffs are impossible.
Additional context
The SLACK_ALLOWED_USERS allowlist may also need consideration — bot user IDs should either be exempt from this check when SLACK_ALLOW_BOTS is set, or documentated as needing to be added to the allowlist separately.
Problem
The Slack adapter unconditionally drops all bot messages at line 631 of
gateway/platforms/slack.py:There is no configuration option to override this behavior. This means bot-to-bot communication is impossible on Slack — even when another bot explicitly @mentions the Hermes bot, the message is silently dropped.
Discord already solved this
The Discord adapter (
gateway/platforms/discord.py, lines 539-551) has aDISCORD_ALLOW_BOTSenv var with three modes:"none"— ignore all other bots (default)"mentions"— accept bot messages only when they @mention us"all"— accept all bot messagesRequested change
Add an equivalent
SLACK_ALLOW_BOTSenv var to the Slack adapter with the same three modes (none/mentions/all), defaulting to"none"for backward compatibility.The implementation would replace the current hard filter with:
Note: The self-message guard should remain to prevent echo loops regardless of mode.
Use case
Multi-agent setups where different AI agents (running on different platforms/frameworks) coexist in the same Slack workspace and need to communicate via @mentions. Without this, Slack is the only platform where bot-to-bot handoffs are impossible.
Additional context
The
SLACK_ALLOWED_USERSallowlist may also need consideration — bot user IDs should either be exempt from this check whenSLACK_ALLOW_BOTSis set, or documentated as needing to be added to the allowlist separately.