Skip to main content

Swif Hermes Access Policy

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 local, it must already be set up on the device, for example with Docker installed


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 /etc/hermes. Swif keeps this folder owned by root, and not writable by users.

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.

smart

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

smart

A guardian model assesses the risk. If it's unsure, Hermes asks the user.

manual

Asks the user every time

off

Never asks. This is the same as running Hermes with --yolo.

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 off, or the user runs Hermes with --yolo

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* matches git push --force and git 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

terminal

Hermes can't run shell commands

code_execution

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

local

Directly on the device

docker

In a Docker container on the device

singularity

In a Singularity or Apptainer container. Linux only.

ssh

On a remote server, over SSH

modal

In a Modal cloud sandbox

daytona

In a Daytona cloud environment

vercel_sandbox

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

  1. Find where Hermes is installed, with the Swif Agent Inventory Policy.

  2. Decide on your hard limits for Denied Commands, such as force-pushing or deleting important folders.

  3. Check sandbox backends. If you choose a backend other than local, set it up on every device first.

  4. Tell users that their Hermes settings will be managed, and that the lists you set replace their own.

  5. Choose a pilot group of devices.


Create the policy

  1. In Swif, go to Agentic Security > Policies.

  2. Select Swif Hermes Access Policy.

  3. Set Approval Mode.

  4. Add Denied Commands and Allowed Commands, if needed.

  5. Add any Disabled Toolsets.

  6. Choose a Sandbox Backend, or leave it empty to keep each user's choice.

  7. On Linux, keep Linux Lock on, so users can't change the settings.

  8. Assign the policy to your devices and save.


Example configurations

Example 1: Safe defaults for all developers

Setting

Value

Approval Mode

smart

Denied Commands

git push --force*, rm -rf /*

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

manual

Denied Commands

git push --force*, chmod -R 777*

Disabled Toolsets

code_execution

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

docker

Denied Commands

git push --force*

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

  1. Confirm that the device is online and the policy shows as applied.

  2. On the device, ask Hermes to run a command in Denied Commands. It should refuse, even with --yolo.

  3. If you set Approval Mode to manual, ask Hermes to run a dangerous command. It should ask for approval.

  4. On Linux with Linux Lock on, check that /etc/hermes is owned by root, and not writable by users.

  5. 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

Did this answer your question?