Guard a Hermes agent
Install LumoAuth Guard in Hermes, with the same presets and the same checks as for OpenClaw.
What it shows
- You install the plugin and run setup in your terminal.
- Setup shows a code. You approve the code in the portal, and LumoAuth creates the agent with its own key.
- The preset decides which capabilities start ticked on the approval page.
- You decide whether the plugin sends a receipt for each decision, and the number of model tokens that the agent uses. Both are off until you turn them on.
doctorchecks the security settings of Hermes.
The plugin checks each tool call in the Hermes process, outside the model. The rules are the capabilities of the agent in LumoAuth.
Before you start
- Hermes Agent 0.21.6 or later, on Python 3.11 or later.
- A LumoAuth organization, and the address of its portal, for example
https://app.lumoauth.dev/orgs/acme-corp/portal.
Set it up
-
Install the plugin. Hermes scans it first, and asks you to confirm because the plugin names credential paths such as
~/.ssh: it names them to protect them. Answery. Until setup ends, Hermes blocks every tool call.hermes plugins install lumoauth/hermes --enable --yes-deps -
Run setup. Enter the address of your portal and choose the preset assistant. Setup asks whether to send a receipt for each decision, and whether to send token counts. The answer to both is no unless you say yes.
hermes lumoauth setup -
Setup prints a link, a code and a key, and waits. Open the link and sign in. On the page Enroll an agent, check that the code and the key fingerprint match your terminal.
-
Change the ticks under What it may do if you want, then click Approve and create the agent. You become the owner of the agent. The switch May act on your behalf is on, because setup asked for approvals through LumoAuth: keep it on to get approval requests on your phone or in Slack.
-
Back in the terminal, setup saves its settings and runs a self-test. Restart Hermes, or the Hermes gateway, so that it loads the plugin.
-
Run
hermes lumoauth statusto see the agent, its capabilities and the connection to LumoAuth. Runhermes lumoauth doctorto check the security settings of Hermes. Doctor changes nothing. -
To stop every tool call on this machine at once, run
hermes lumoauth lock --reason "Going on holiday". Onlyhermes lumoauth unlockin your terminal lifts the lock.
For a script, add --force to the install command. Setup takes --url, --preset, --approvals auto and --yes. With --yes, setup sends no receipts and no token counts: add --receipts or --report-usage to send them. You still approve the agent in the portal.
These steps were followed on a LumoAuth organization. The steps were followed with a current Hermes Agent and the plugin 0.1.3 against a LumoAuth organization. The tool calls of the checks were sent through the tool dispatch of Hermes, with no model.
Check the result
The end of setup, with receipts turned on:
Approved. Agent agt_cd8482b1b688ae05 is set up; settings are in /home/maya/.lumoauth/guard/hermes/config.json.
Receipts: on. Token counts: off. To change them, set `receipts` or `reportUsage` in config.json.
Hermes: plugins.hook_callback_timeout: 180.
Self-test: token ............ ok
Self-test: capabilities ..... ok (agent active)
Self-test: receipt .......... ok
Granted capabilities (9): files:read, media:read, sessions:read, shell:read, skills:read, tools:read, user:ask, web:fetch, web:search
Everything else asks a person first or is blocked.
Doctor: 1 thing(s) to look at:
WARN hermes.terminal-backend: Commands and code run directly on this machine (terminal.backend: local). The Guard scans them, but a scan is not a sandbox.
Fix: Run `hermes config set terminal.backend docker`.
Restart Hermes (or the gateway) so that it loads the Guard. Check it any time with `hermes lumoauth status`.
- Ask the agent to run
hermes plugins disable lumoauth. The plugin blocks the call, and the model gets the reason: "Blocked by LumoAuth Guard. Protected by a rule that cannot be changed: runs the Hermes admin commandhermes plugins." - Ask the agent to read
~/.ssh/id_rsa. The call is blocked as a credential store. - Ask the agent to run a command. The preset does not grant
shell:exec, so Hermes asks you, with the capability and the reason "Not granted to this agent". - With receipts on, open Audit logs in the portal. Each decision has an entry
agent.tool_call.reported.
Limits
- The plugin is not a sandbox. Commands run with your user account. Run them in a container with
hermes config set terminal.backend docker, asdoctorsuggests. - The plugin does not see processes that a script started inside
execute_code,!commandshell escapes, or a Hermes started with--safe-mode. - When the approvals of Hermes are off, or under
--yolo, Hermes would allow every request. The plugin then blocks those calls instead. - Approvals on your phone, in Slack or in Discord need the switch May act on your behalf of the agent. Check that your plan includes agent governance in the plans matrix. Approvals in Hermes work without it.
- The same plugin for OpenClaw: see Guard an OpenClaw agent.