Problem
When using Hermes Agent through Telegram, the bot sends a push notification for every single message — tool calls, thinking/progress updates, streaming tokens, status messages, commentary. This results in dozens of notifications per turn, making the experience noisy and disruptive.
Telegram's Bot API has a built-in disable_notification parameter on sendMessage (and all other send methods) that allows sending messages silently — they still appear in the chat, but the user's device does not buzz/ding.
Proposed Solution
Add a configurable notifications mode for the Telegram platform adapter:
config.yaml:
display:
platforms:
telegram:
notifications: important # "all" (default) | "important"
Or via env var: HERMES_TELEGRAM_NOTIFICATIONS=important
Modes
| Mode |
Behavior |
all (default) |
Every message triggers a push notification (current behavior, backward compatible) |
important |
Only final responses, approval requests, and slash confirmations trigger notifications. All intermediate messages (tool progress, streaming, status, commentary) are delivered silently via disable_notification=True. |
Messages that become silent in important mode
- Tool progress bubbles ("searching...", "executing code...")
- Streaming previews / progressive edits
- Status messages (context pressure, model fallback)
- Commentary / interim assistant messages ("I'll inspect the repo...")
- Auto-reset notices
Messages that still notify in important mode
- Final response text (the agent's last message before waiting for user input)
- Approval requests (dangerous command confirmations with Allow/Deny buttons)
- Slash confirmations
- Media attachments that are part of the final response
Technical approach
TelegramAdapter gains a _notifications_mode attribute and a _notification_kwargs(metadata) helper
- All send methods (
send, send_voice, send_image, send_document, send_video, send_animation, send_media_group) pass disable_notification=True in important mode unless overridden
send_exec_approval() and send_slash_confirm() never get silenced
- The final response delivery in
BasePlatformAdapter._process_message_background() sets metadata["notify"] = True on the cloned metadata dict, allowing the adapter to override silent mode
- Zero overhead in
all mode — _notification_kwargs returns {}
- Zero impact on non-Telegram platforms
Testing
- All 348 Telegram-related unit tests pass
- Manual verification of
_notification_kwargs() behavior for all metadata/None cases
- Backward compatible: default mode
all produces identical API calls
Problem
When using Hermes Agent through Telegram, the bot sends a push notification for every single message — tool calls, thinking/progress updates, streaming tokens, status messages, commentary. This results in dozens of notifications per turn, making the experience noisy and disruptive.
Telegram's Bot API has a built-in
disable_notificationparameter onsendMessage(and all other send methods) that allows sending messages silently — they still appear in the chat, but the user's device does not buzz/ding.Proposed Solution
Add a configurable
notificationsmode for the Telegram platform adapter:config.yaml:Or via env var:
HERMES_TELEGRAM_NOTIFICATIONS=importantModes
all(default)importantdisable_notification=True.Messages that become silent in
importantmodeMessages that still notify in
importantmodeTechnical approach
TelegramAdaptergains a_notifications_modeattribute and a_notification_kwargs(metadata)helpersend,send_voice,send_image,send_document,send_video,send_animation,send_media_group) passdisable_notification=Trueinimportantmode unless overriddensend_exec_approval()andsend_slash_confirm()never get silencedBasePlatformAdapter._process_message_background()setsmetadata["notify"] = Trueon the cloned metadata dict, allowing the adapter to override silent modeallmode —_notification_kwargsreturns{}Testing
_notification_kwargs()behavior for all metadata/None casesallproduces identical API calls