Overview
The Swif Hermes Access Policy controls what the Hermes agent, Nous Research's open-source autonomous AI agent, can do on your devices. You can set:
how Hermes handles dangerous commands: ask the user, let a guardian model decide, or never ask
commands Hermes always blocks, and commands it runs without asking
toolsets Hermes can't use, such as the terminal
where Hermes runs commands: directly on the device, or in a container or remote sandbox
To find where Hermes is installed and how it's set up, use the Swif Agent Inventory Policy.
Important: Only the fields you fill in are managed, and your lists replace the user's. Fields you leave empty aren't managed, so the user's own Hermes settings stay in place. When you set a list, such as Denied Commands, it replaces the user's own list. It isn't added to it.
Requirements
Requirement | Details |
Operating systems | macOS, Linux, and Windows |
Device ownership | Company-owned and BYOD |
Hermes | Installed on the device |
Swif agent | Swif Agentic Security agent installed and running |
Sandbox backend | If you choose a backend other than |
How the settings are applied
Platform | Where Swif writes the settings | Can users change them? |
Linux, with Linux Lock on (default) | Hermes's machine-wide settings, in | No |
Linux, with Linux Lock off | Each user's own Hermes settings | Yes, but Swif puts them back |
macOS and Windows | Each user's own Hermes settings | Yes, but Swif puts them back |
Swif applies the policy every minute, so a setting a user changes is put back within a minute.
Hermes profiles. Each Hermes profile (started with hermes -p name) has its own settings. Swif applies the policy to every user's profiles, as well as their main settings.
Sandbox Backend is the exception. Hermes reads it only from each user's own settings, so Swif writes it there on every platform, even with Linux Lock on, and puts it back if it's changed.
Settings reference
Setting | What it does | Default |
Approval Mode | How Hermes handles dangerous commands. See below. |
|
Denied Commands | Command patterns Hermes always blocks | Not managed |
Allowed Commands | Dangerous command patterns Hermes runs without asking | Not managed |
Disabled Toolsets | Toolsets removed from Hermes, so it can't use them | Not managed |
Sandbox Backend | Where Hermes runs shell commands and code. See below. | Not managed |
Linux Lock | On Linux, puts the settings where users can't change them. Ignored on macOS and Windows. | On |
Approval Mode
Mode | What Hermes does with a dangerous command |
| A guardian model assesses the risk. If it's unsure, Hermes asks the user. |
| Asks the user every time |
| Never asks. This is the same as running Hermes with |
smart is also Hermes's own default. Assigning the policy with this default keeps Hermes's behavior, and stops users from changing it. Choose manual to make Hermes stricter.
Denied Commands and Allowed Commands
Setting | Use |
Denied Commands | Commands Hermes always blocks, even when Approval Mode is |
Allowed Commands | Dangerous commands Hermes runs without asking, such as a routine cleanup command your team trusts |
Writing patterns:
Matching ignores case.
*matches any characters. For example,git push --force*matchesgit push --forceandgit push --force-with-lease.Up to 200 patterns per list, each up to 512 characters.
Denied Commands is your hard limit. Hermes checks it before anything else, so a denied command is blocked whatever the approval mode, and in every Sandbox Backend, including containers.
Denied Commands covers terminal commands only. It doesn't match code that Hermes runs with its code execution tool. To stop that too, add code_execution to Disabled Toolsets.
Disabled Toolsets
Removes toolsets from Hermes, so the model can't use them. For example:
Toolset | What disabling it does |
| Hermes can't run shell commands |
| Hermes can't run code |
Toolset names use lowercase letters, digits, -, and _. See Hermes's tools and toolsets documentation for the full list.
Sandbox Backend
Where Hermes runs shell commands and code:
Backend | Where commands run |
| Directly on the device |
| In a Docker container on the device |
| In a Singularity or Apptainer container. Linux only. |
| On a remote server, over SSH |
| In a Modal cloud sandbox |
| In a Daytona cloud environment |
| In a Vercel Sandbox |
The backend must already be set up. For example, docker needs Docker installed. If it isn't set up, Hermes refuses to run commands.
Container backends skip approval prompts. With docker, singularity, modal, daytona, or vercel_sandbox, Hermes doesn't ask for approval of dangerous commands, because the container is the security boundary. Approval Mode doesn't apply there, but Denied Commands still do.
Change or remove the policy
Unassigning the policy: Swif removes everything it set. Each user's own values are put back, including their original lists, and any settings section or file Swif created is removed.
Clearing a field: removing a field's value from the policy does the same for that field. The user's own value comes back.
Before you start
Find where Hermes is installed, with the Swif Agent Inventory Policy.
Decide on your hard limits for Denied Commands, such as force-pushing or deleting important folders.
Check sandbox backends. If you choose a backend other than
local, set it up on every device first.Tell users that their Hermes settings will be managed, and that the lists you set replace their own.
Choose a pilot group of devices.
Create the policy
In Swif, go to Agentic Security > Policies.
Select Swif Hermes Access Policy.
Set Approval Mode.
Add Denied Commands and Allowed Commands, if needed.
Add any Disabled Toolsets.
Choose a Sandbox Backend, or leave it empty to keep each user's choice.
On Linux, keep Linux Lock on, so users can't change the settings.
Assign the policy to your devices and save.
Example configurations
Example 1: Safe defaults for all developers
Setting | Value |
Approval Mode |
|
Denied Commands |
|
Linux Lock | On |
Hermes asks the user only when the guardian model is unsure, and never runs a force-push or deletes from the root folder. Users can't change the approval mode.
Example 2: Strict approval
Setting | Value |
Approval Mode |
|
Denied Commands |
|
Disabled Toolsets |
|
Hermes asks before every dangerous command, never runs those patterns, and can't run code, so the denied patterns can't be worked around with the code execution tool.
Example 3: Run everything in Docker
Setting | Value |
Sandbox Backend |
|
Denied Commands |
|
Hermes runs commands in a Docker container instead of directly on the device. Install Docker on every assigned device first. Hermes doesn't ask for approval inside the container, but it still blocks force-pushes.
Verify the policy
Confirm that the device is online and the policy shows as applied.
On the device, ask Hermes to run a command in Denied Commands. It should refuse, even with
--yolo.If you set Approval Mode to
manual, ask Hermes to run a dangerous command. It should ask for approval.On Linux with Linux Lock on, check that
/etc/hermesis owned by root, and not writable by users.Use the Swif Agent Inventory Policy to check Hermes's reported approval mode, rule counts, disabled toolsets, and terminal backend.
Troubleshooting
Hermes refuses to run any command
Sandbox Backend is set to a backend that isn't set up on the device. For example, docker needs Docker installed. Set it up, or change the backend.
A user's own denied or allowed commands disappeared
This is expected. A list you set in the policy replaces the user's own list. Add any patterns they still need to the policy. Their own list comes back if you clear the field or unassign the policy.
A user changed a setting, and it changed back
This is expected. On macOS, Windows, and Linux with Linux Lock off, Swif puts managed settings back within a minute.
Approval Mode has no effect
The Sandbox Backend is docker, singularity, modal, daytona, or vercel_sandbox. Hermes doesn't ask for approval inside containers. Denied Commands still apply.
Hermes ran something that matches a denied pattern
Check whether it ran as code, through Hermes's code execution tool. Denied Commands covers terminal commands only. Add code_execution to Disabled Toolsets to stop code execution.
A setting doesn't apply to one of the user's Hermes profiles
Swif applies the policy to every profile, every minute. Wait a minute for the next check, then start the profile again.
singularity isn't available on a Mac or Windows device
This is expected. Singularity is Linux only.
Settings didn't apply
Check that Hermes is installed on the device.
Check that the Swif Agentic Security agent is running.
Related resources
Swif
Hermes