Secure OpenClaw and Hermes agents
A personal agent such as OpenClaw or Hermes runs tools on your machine. It reads and writes files, runs commands, browses the web, sends messages and calls MCP servers. The model that drives it also reads text that other people wrote. A web page or an e-mail can therefore contain instructions that you did not write.
LumoAuth Guard is a plugin for OpenClaw and Hermes. It checks every tool call before the tool runs. The check happens in the agent host, outside the conversation, so nothing in the conversation can change its result. You set the rules in LumoAuth.
| What | How the Guard protects it |
|---|---|
| Tool calls | Each call is allowed, sent to you for approval, or blocked, depending on what you allowed the agent in LumoAuth. |
| The Guard itself | The agent cannot read the Guard's key, change the host's or the Guard's settings, disable or update plugins, or stop the host. No setting can lift these rules. |
| Your secrets | SSH keys, cloud credentials, tokens for package registries, browser profiles and .env files are blocked or need your approval. |
| Untrusted text | After the agent reads a web page or another untrusted source, sending messages and changing its memory need your approval. |
| The agent's identity | The agent signs in with its own key. The key never leaves your machine, and LumoAuth stores no secret for it. |
| Stopping the agent | Suspend the agent in LumoAuth, and every tool call stops within a minute. |
| A record of what happened | Each decision can appear in your audit log. See The audit log. |
| The host's own settings | doctor checks the host's security settings and tells you what to change. |
Install
You need a LumoAuth organization and the address of its dashboard, for example https://app.lumoauth.dev/orgs/acme/portal.
OpenClaw (2026.11.5 or later):
openclaw plugins install npm:@lumoauth/openclaw
openclaw lumoauth setup
Hermes Agent:
hermes plugins install lumoauth/hermes --enable --yes-deps
hermes lumoauth setup
Both installers ask you to confirm the install. OpenClaw asks because the plugin comes from npm instead of ClawHub, and then asks you to accept what the plugin registers. Hermes scans the plugin first and asks because the plugin names credential paths such as ~/.ssh, which it protects. In a script, add --force --accept-capabilities to the OpenClaw command and --force to the Hermes command. Restart the host, or its gateway, after setup.
What setup does
- Setup asks for your dashboard address and lists the tools and MCP servers that the host has.
- You pick a preset (see Presets). On Hermes, setup also asks whether to send a receipt for each decision to your audit log, and the number of model tokens that the agent uses. Both answers default to no.
- Setup creates a key pair on your machine. The private key stays there.
- Setup prints a link, a code and a key fingerprint, and waits.
- You open the link and sign in. The page shows the agent's name, the code, the key fingerprint and the capabilities that the agent asks for, by their real names. Check that the code and the fingerprint match your terminal. Capabilities that only read data are ticked when the preset asked for them. Every other capability starts unticked, also when the preset includes it: one that changes data, runs code, acts outside the machine, deletes, administers, or covers a whole group of actions (a wildcard such as an MCP server's tools). Tick what you want to allow, then select Approve.
- Setup saves its settings, turns the plugin on and runs a self-test.
The machine never receives an administrator token. It sends only its public key and the list of capabilities that it asks for. You decide on the LumoAuth page.
Approve only if you ran the setup command yourself, just now, and the code and fingerprint match. If someone sends you a code or a link, deny it: approving it would give their machine access to your organization in your name.
Setup can run without questions:
openclaw lumoauth setup --url https://app.lumoauth.dev/orgs/acme/portal --preset assistant --approvals auto --yes
hermes lumoauth setup --url https://app.lumoauth.dev/orgs/acme/portal --preset assistant --approvals auto --yes
For the EU region, use --region eu or an https://eu.app.lumoauth.dev address.
How a tool call is decided
The Guard checks these things, in this order. The first check that applies sets the outcome.
- Locked. You ran
lumoauth lock: every call is blocked until you runlumoauth unlock. - Protected. The call touches something that is always protected (see Always protected). It is blocked, or it needs your approval.
- LumoAuth confirms the agent. The Guard refreshes the agent's capabilities from LumoAuth every minute. If the agent is suspended, every call is blocked. If LumoAuth cannot be reached, the Guard keeps using the last capabilities for five minutes, then blocks every call.
- Allowed in LumoAuth. The agent has the capability for this call: it runs. After the agent reads untrusted text, some calls still need your approval (see After untrusted text).
- Not allowed. The Guard asks you to approve this call.
Each tool maps to a capability. For example, read maps to files:read, exec maps to shell:exec, and message maps to messages:send. An MCP tool maps to mcp:<server>:<risk>:<tool>, where the risk comes from the tool's name: mcp:github:read:list_issues, mcp:github:destructive:delete_repository. To allow every read-only tool of an MCP server, give the agent mcp:github:read:*.
The Guard decides on your machine with the capabilities from LumoAuth, so it makes no call to the Ask API for each tool call. To have LumoAuth decide each call instead, and record every decision, set "decisionMode": "server" in the Guard's settings. Each tool call then counts as a call to the Ask API.
Presets
Setup ticks the capabilities of a preset on the approval page. You can change the ticks there, and later on the agent's page in LumoAuth.
| Preset | Runs without asking | Asks you first |
|---|---|---|
| Observer | Reading files, web search, opening web pages, reading memory, read-only MCP tools | Everything else |
| Personal assistant (recommended) | The above, plus writing files in its workspace, changing its memory, tasks, generating media, MCP tools that create or change data | Commands, code, sending messages, MCP tools that send, delete or change settings |
| Builder | The above, plus commands, code, background processes, sub-agents and a browser | Sending messages, MCP tools that send, delete or change settings |
Some capabilities are never ticked by a preset: sending messages, scheduled jobs, controlling devices, reading stored secrets, changing skills and changing the host. Grant them on purpose.
Approvals
When a call needs approval, the Guard asks you in one of two places:
-
In the agent host. OpenClaw shows the request in its Control UI and on chat channels that support approvals. Hermes asks in its terminal or with buttons on its messaging platforms. This works on every LumoAuth plan.
-
Through LumoAuth. LumoAuth sends the request to you, the agent's owner, in these places:
- on your phone, in the LumoAuth app (see Push approval for agent actions);
- in Slack and in Discord, on every approval channel with the switch Send approval requests from AI agents (LumoAuth Guard) on.
The first answer counts. The other messages then show it, for example "Approved by Maya Chen in Slack". Until you answer, the Guard shows in the host where you can answer, for example "Waiting for approval in Slack".
Only you can answer through LumoAuth. The Guard sends every request to the agent's owner. In Slack or Discord, a request is posted only for that reason, and LumoAuth accepts a button press only from the owner's own account. Another person who presses a button gets a note that only they can see, and the request stays open.
What you need for LumoAuth approvals. The agent's Can act on behalf of users switch and approval channels are part of the Agent Governance add-on. You also need the LumoAuth app on your phone, an approval channel with the switch on, or both.
With --approvals auto, the default, the Guard asks through LumoAuth when the agent has the switch, and in the host otherwise. When LumoAuth cannot reach you (no phone and no channel), the Guard asks in the host for that call. When nobody can answer, for example in a scheduled run, the call is blocked.
The Guard sets how long you have to answer, from 60 seconds to 10 minutes. It uses the time for which the host holds the call. After that, the request expires and the call does not run.
"Allow always" applies only to a capability that the agent does not have. Calls that touch something protected, and calls after untrusted text, ask every time. To allow something permanently, add the capability to the agent in LumoAuth.
When Hermes's own approvals are switched off (approvals.mode: off, or yolo), Hermes would allow every request without asking you. The Guard then blocks those calls instead.
Always protected
These rules apply whatever capabilities the agent has:
- Blocked: reading or changing the Guard's files (
~/.lumoauth/), the host's configuration, credentials and plugins (~/.openclaw/openclaw.json,~/.hermes/config.yaml,~/.hermes/.envand similar), and credential stores (~/.ssh,~/.aws,~/.kube,~/.config/gcloud, browser profiles). This also applies to MCP tools that receive such a path. - Blocked: commands that change the host or its plugins:
openclaw plugins …,openclaw config …,hermes plugins …,hermes config …,lumoauth unlock, installing or removing the host or the plugin, stopping the host, and starting the host in safe mode. - Needs your approval: reading or changing
.envfiles, keys (*.pem,*.key,id_rsa) and shell start-up files (~/.bashrc,~/.zshrc), reading another process's environment, and changing your crontab. - Needs your approval: creating or changing skills. A skill holds instructions that every later session reads.
After untrusted text
Some tools bring text from outside into the conversation: web search, web pages, browsers, e-mail and chat messages from other people. After such a call, the session is tainted for 30 minutes. In a tainted session, these calls need your approval even when the agent has the capability:
- calls that send data out: messages, e-mail, posts, payments;
- calls that change the agent's memory or standing instructions.
The strict setting also covers commands, code, opening web pages and browsers: set "taint": {"escalate": ["external", "execute", "egress"]}.
Stop an agent
- Everywhere: suspend the agent in LumoAuth (Agents → the agent → Suspend). Tool calls stop within a minute.
- On one machine: run
openclaw lumoauth lockorhermes lumoauth lock. The agent cannot unlock itself: onlylumoauth unlockin your terminal does.
The audit log
Each decision becomes an agent.tool_call.reported entry in the audit log. The entry holds the tool, the decision (allowed, approved, denied, refused, expired or blocked), how the call ended, how long it took and a SHA-256 hash of the arguments. The arguments themselves are never sent. The agent's host reports these entries, so they are marked reported_by: agent.
- Hermes sends these entries only if you said yes in setup, or set
receiptstotruein the Guard'sconfig.json. Token counts work the same way, withreportUsage. - OpenClaw sends them unless
receiptsisfalsein the Guard's settings.
Check the host
openclaw lumoauth doctor and hermes lumoauth doctor check the host's own security settings. For example, they check:
- whether commands run in a sandbox;
- who may message the agent;
- whether the gateway is open to the network;
- whether approvals are switched off;
- which files hold secrets in plain text, and who may read them.
Each finding comes with the command or setting that fixes it. doctor never changes anything.
Commands
| Command | What it does |
|---|---|
lumoauth setup | Registers the agent with LumoAuth and turns the Guard on. |
lumoauth status | Shows the agent, its capabilities, the connection to LumoAuth and recent decisions. Add --json for scripts. |
lumoauth doctor | Checks the host's security settings. Add --json for scripts. |
lumoauth lock / unlock | Blocks every tool call on this machine, and lifts the block. |
lumoauth reset | Deletes the key and the settings on this machine. Delete the agent in LumoAuth too. |
Prefix each command with openclaw or hermes. In a chat with the agent, the owner can also use /lumoauth for the status and to lock.
Limits
- Same user account. The Guard runs inside the agent host. An agent that can run code as your user could change files that the Guard does not see it touch. The Guard scans commands for protected paths and host commands, but a scan is not a sandbox. Run commands in the host's sandbox: OpenClaw
agents.defaults.sandbox.mode, Hermesterminal.backend: docker.doctorreminds you. - Hermes: the Guard does not see processes that a script started inside
execute_code,!commandshell escapes, or a Hermes started with--safe-mode. - OpenClaw:
openclaw security auditdoes not show the Guard's checks. Useopenclaw lumoauth doctor.
For developers: the APIs that the Guard uses
- Enrollment by code:
POST /orgs/{orgId}/api/v1/agents/enrollmentsstarts an enrollment with one public key and a list of capabilities, without a credential. Therisk,labelandcheckedmembers of a capability are the machine's own description: the approval page shows the scope itself, grades it from the scope, and pre-ticks only plain reads. An organization holds at most 20 waiting requests and one address at most 3. When a queue is full, a new request replaces a waiting one that nobody has opened on the approval page, and that one then answersexpired_token. The Enroll an agent page lists the waiting requests, and you can deny the ones that nobody in your organization started.POST /orgs/{orgId}/api/v1/agents/enrollments/tokenpolls for the result, like the device authorization grant (RFC 8628):authorization_pending,slow_down,access_denied,expired_token, and the agent once approved. An approved agent signs in with private key JWT and gets only DPoP-bound tokens. - Approval requests:
POST /orgs/{orgId}/api/v1/agents/me/approvalstakesexpires_in(60 to 600 seconds, default 120) and ametaobject with the tool call's details (kind,host,tool,server,capability,risk,why,title, up to fiveargslines andarguments_sha256). LumoAuth keeps only these keys and cleans every value. The201answer lists indeliverywhere the request went:push,slack,discord. PollGET …/approvals/{approval_token}/statusuntil it isapproved,deniedorexpired. - Tool-call receipts:
POST /orgs/{orgId}/api/v1/agents/me/tool-callsrecords up to 50 calls per request. It refuses unknown fields, so arguments and results cannot be sent. - Every Ask API decision on record: send
"audit": "always"with an Ask API call to record allowed decisions asagent.capability_check_allowed. See Ask API.