hermes - 💡(How to fix) Fix Add generic action buttons / inline keyboard support for messaging platforms [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#15311Fetched 2026-04-25 06:23:00
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×4commented ×1

Root Cause

Telegram ReplyKeyboardMarkup can be used as a workaround because button presses send normal text messages. However, it is not the same UX:

Fix Action

Fix / Workaround

Telegram ReplyKeyboardMarkup can be used as a workaround because button presses send normal text messages. However, it is not the same UX:

Hermes already has some platform-specific button support for built-in flows such as Telegram model picker and approval prompts. This feature request is about exposing a generic reusable mechanism so other workflows can use the same interaction model without patching gateway code for every use case.

Code Example

{
  "target": "telegram",
  "message": "Update available. What should I do?",
  "actions": [
    {
      "label": "Yes, update",
      "value": "update_yes"
    },
    {
      "label": "No, postpone",
      "value": "update_no"
    }
  ]
}
RAW_BUFFERClick to expand / collapse

Feature request

It would be useful to have a generic way for Hermes to send interactive action buttons with messages on messaging platforms, especially Telegram inline keyboards, without hardcoding this behavior for one specific feature.

Motivation

Hermes already supports Telegram inline buttons in some built-in flows, for example model selection and command approval. However, there does not seem to be a generic API/tool/interface for agent-generated or scheduled messages to attach action buttons and handle the user's choice in a platform-agnostic way.

This would be useful for many workflows:

  • "Update Hermes now?" → Yes / No
  • "Run deployment?" → Deploy / Cancel
  • "Approve backup?" → Start / Skip
  • "Choose environment" → Production / Staging / Dev
  • "Confirm destructive action" → Confirm / Cancel
  • Scheduled task reports with follow-up actions
  • Any agent workflow where the next step depends on a small set of user choices

Desired behavior

Hermes should expose a generic messaging action API that allows a message to include buttons.

Conceptually:

{
  "target": "telegram",
  "message": "Update available. What should I do?",
  "actions": [
    {
      "label": "Yes, update",
      "value": "update_yes"
    },
    {
      "label": "No, postpone",
      "value": "update_no"
    }
  ]
}

For Telegram, this could be rendered as an inline keyboard.

When the user clicks a button, Hermes should receive the action as a normal gateway event and route it back into the relevant session/workflow, for example as an equivalent user message or structured action event.

Platform considerations

Telegram:

  • Use InlineKeyboardMarkup.
  • Handle callback_query.
  • Call answerCallbackQuery so the Telegram client does not keep showing a loading spinner.
  • Optionally edit the original message to show the selected action.

Slack/Discord:

  • Could map to native buttons/interactions where supported.
  • If a platform does not support buttons, Hermes could gracefully fall back to text instructions.

Why not use ReplyKeyboardMarkup?

Telegram ReplyKeyboardMarkup can be used as a workaround because button presses send normal text messages. However, it is not the same UX:

  • It changes the user's input keyboard.
  • It is visually less contextual than inline buttons.
  • It is not attached to a specific message.
  • It is less suitable for one-off approval/action prompts.

Inline keyboards are a better fit for contextual action prompts.

Why not implement this outside Hermes?

A separate helper process can send Telegram messages with inline keyboards using the Bot API, but it cannot reliably handle button clicks if Hermes gateway is already receiving updates for the same bot token.

Telegram allows only one active update receiver for a bot token when using getUpdates, and webhooks are mutually exclusive with polling. Therefore, callback handling should live inside the Hermes gateway that already owns Telegram updates.

Suggested design

Add a generic action-button abstraction to the messaging/gateway layer:

  1. Extend messaging send APIs to optionally accept actions/buttons.
  2. Add a platform-neutral action payload format.
  3. Implement Telegram rendering via InlineKeyboardMarkup.
  4. Route callback_query events back into Hermes as:
    • a normal user message, or
    • a structured gateway action event.
  5. Add expiration/session binding for safety.
  6. Provide a text fallback for platforms without button support.

Safety considerations

Buttons should support:

  • session/workflow binding;
  • optional expiration;
  • action IDs that are not directly executable shell commands;
  • clear audit/logging of what action was selected;
  • safe fallback if the session no longer exists.

Existing related behavior

Hermes already has some platform-specific button support for built-in flows such as Telegram model picker and approval prompts. This feature request is about exposing a generic reusable mechanism so other workflows can use the same interaction model without patching gateway code for every use case.

extent analysis

TL;DR

Implement a generic action-button abstraction in the messaging/gateway layer to support interactive buttons on messaging platforms like Telegram.

Guidance

  • Extend the messaging send APIs to accept actions/buttons and define a platform-neutral action payload format.
  • Implement Telegram rendering using InlineKeyboardMarkup and route callback_query events back into Hermes as a normal user message or structured gateway action event.
  • Consider adding expiration/session binding, action ID validation, and clear audit/logging for safety and security.
  • Provide a text fallback for platforms without button support, such as Slack or Discord.

Example

{
  "target": "telegram",
  "message": "Update available. What should I do?",
  "actions": [
    {
      "label": "Yes, update",
      "value": "update_yes"
    },
    {
      "label": "No, postpone",
      "value": "update_no"
    }
  ]
}

Notes

This implementation should be done carefully to ensure compatibility with existing platform-specific button support and to handle potential security concerns, such as validating action IDs and providing clear audit trails.

Recommendation

Apply the suggested design by adding a generic action-button abstraction to the messaging/gateway layer, as it provides a flexible and reusable solution for supporting interactive buttons on various messaging platforms.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Add generic action buttons / inline keyboard support for messaging platforms [1 comments, 2 participants]