Yandex Alice for Hermes

A kind: platform plugin that makes Yandex Alice a gateway platform of
Hermes Agent. It receives the webhook of a private Yandex Dialogs
skill, passes the utterance to an ordinary gateway session (the profile is chosen by gateway.profile_routes), speaks
the agent's reply and, on request, sends the details to Telegram.
It is a conversation, not a single command: after a reply the Alice session stays open, and the next utterance
continues the same Hermes conversation with its history. If the agent does not answer within Alice's limit (about
4.5 s), the plugin holds the request for up to 3.5 s and then offers to wait, ask later or send the answer to Telegram.
Status: beta. One private skill, one owner. Tested on Linux. The voice phrases and intents are in Russian.
Features
- Spoken replies in parts; "дальше" ("next") reads the next part.
- Waiting for a slow answer: wait, ask later, or have it sent to Telegram.
- "New dialog" / "previous": start a new conversation or continue the current one.
- "Повтори" ("repeat") reads the last reply back from the Hermes session history.
- Details and out-of-turn messages from the agent go to Telegram, prefixed with "Алиса:".
- Commands that need approval are confirmed only with a Telegram card (Hermes
approvals); they cannot be approved by
voice and do not run without approval. - Conversation state survives a gateway restart (SQLite in the plugin's data).
- Owner-only access, a secret URL path, a loopback-only listener, a rate limit and request deduplication.
Requirements
- Hermes Agent within the
requires_hermesrange ofplugin.yaml; the tested version is in
compatibility. - A private skill in Yandex Dialogs and an HTTPS reverse proxy you control in front of the loopback listener.
- Optional: the Telegram platform of the same profile (
TELEGRAM_BOT_TOKEN) for details and approval cards. - The plugin runs inside the gateway process: it receives the native Telegram
Applicationthrough
register_platform_handler.
Setup
- Deployment — install the plugin,
configure the profile and the HTTPS proxy (Hermes in Docker included). - Configuration — variables,
config.yaml, profiles, Telegram. - Yandex Dialogs skill — create
the private skill and its intents, then test by voice.
Secrets go into the Hermes .env; the plugin reads them through Hermes's scoped secrets, never from the process
environment or from files.
The detailed documentation is in Russian.
Disclosure
What the plugin does beyond its own data:
- Inbound network. Listens on
127.0.0.1only (portplatforms.yandex_alice.extra.port, required) for
webhooks forwarded by your HTTPS reverse proxy. The secret URL path (ALICE_PATH_SECRET) works as a bearer secret.
The skill ID and the owner's user ID are checked from the request body; Yandex request signatures are not verified.
Requests with a wrong path get 404; requests from another skill or user get a refusal. - Outbound network. Sends details, out-of-turn messages and approval cards to the Telegram Bot API through Hermes's
Telegram sender, with the profile'sTELEGRAM_BOT_TOKEN. Optionaltelegram_base_url,telegram_base_file_url,
telegram_proxy_urlandtelegram_fallback_ipsinextraare passed to that sender. No other third-party
services. No telemetry. - Reads outside its own data. The gateway
config.yaml(forgateway.profile_routes) and, read-only, the target
profile's Hermes session database, to read the last reply back for "repeat". - Stored data. A SQLite database in the plugin's data folder holds the conversation state, including the text of
replies not yet picked up (kept up to 24 hours), and the Telegram delivery queue. - Background work. A tick every 60 seconds (expiry, lost turns) and the Telegram delivery queue, while the gateway
is running. - Hook.
pre_tool_callchanges only the delivery targets ofcronjob_manage(create/update) that point back to
the voice session (originoryandex_alice…), replacing them withtelegram:<ALICE_TELEGRAM_CHAT>, because a
voice skill cannot speak first. Other arguments, actions and tools are untouched. - Approvals. The plugin never approves anything itself. Approval cards go to Telegram with "once" and "deny"
buttons only, and only the owner's press resolves them. The plugin itself only denies: when no card can be delivered
or approvals are not configured. - No shell commands, no subprocesses, no self-update.
License
MIT — see LICENSE. Third-party notices — THIRD_PARTY_NOTICES.md.
README from the reviewed commit 5188f01; it updates when the author re-pins.

IvanovPetrE