Skip to content

Install for Hermes

alr install hermes installs the OpenALR plugin into Hermes. The plugin writes one record for each turn of a Hermes gateway, and answers the in-session commands. You need the alr command first: see Quickstart steps 1 and 2.

Requires Hermes 0.21 or later.

Before You Start

You need terminal Hermes, the hermes command, and not only the desktop app. If hermes --version does not answer, install Hermes with its own installer:

iex (irm https://hermes-agent.nousresearch.com/install.ps1)

This command comes from the Hermes project, not from OpenALR.

Then open a NEW PowerShell window: an older window does not see the new PATH.

Follow the install instructions in the Hermes documentation. They come from the Hermes project, not from OpenALR. Then open a new shell, so that it sees the new PATH.

Install

alr install hermes            # prints the install preview; changes nothing
alr install hermes --yes      # does the whole install

The preview lists each step it would take as well as each file it would add or change; the rest works as on every install (see How Every Install Works).

Then fetch the latest price book with alr prices update: see Get the Latest Price Book.

alr install hermes --yes does all of this, with nothing left for you to do by hand:

  1. Checks that terminal Hermes is installed (hermes --version), and says how to install it if not.
  2. Copies the plugin into Hermes's plugins folder, with alr-emit==<this version> in its python_dependencies.
  3. Runs hermes plugins enable alr-emit, so Hermes's own package manager installs alr-emit into Hermes's Python. With a wheel at hand, it keeps the wheel in ~/.alr-emit/kit/hermes-wheels/ (on Windows, %USERPROFILE%\.alr-emit\kit\hermes-wheels\) and names that folder in UV_FIND_LINKS, with the package index off. With none, it sets no UV_FIND_LINKS, and Hermes's package manager installs alr-emit==<this version> from PyPI. OpenALR never runs pip.
  4. Restarts a running gateway (hermes gateway restart), or says plainly that one must be restarted.
  5. Proves the load: hermes --run-module alr_emit.kit must import alr-emit under Hermes's own Python, load the installed plugin and run its register, and Hermes's logs/errors.log must name no failed load.

A wheel at hand is the one you named with --wheel, the copy a former install kept, or the one you installed alr from. To name one yourself, use --wheel alr_emit-0.1.0-py3-none-any.whl. If you installed from PyPI, there is no wheel, and the preview says that Hermes installs the package from PyPI. If terminal Hermes is missing, the preview says so, and --yes refuses until you fix it.

What It Writes

The plugin goes to %LOCALAPPDATA%\hermes\plugins\alr-emit\, and the /alr-plan and /alr-prices skills to skills\alr-plan\SKILL.md and skills\alr-prices\SKILL.md in the same Hermes home.

The plugin goes to ~/.hermes/plugins/alr-emit/, and the /alr-plan and /alr-prices skills to skills/alr-plan/SKILL.md and skills/alr-prices/SKILL.md in the same Hermes home.

A Hermes kept outside its default home needs to be named:

alr install hermes --hermes-home DIR

The directory must exist. OpenALR never reads HERMES_HOME to decide where to install: it uses Hermes's default home unless you name another with --hermes-home. If HERMES_HOME points elsewhere, the install preview says so.

Do not copy the plugin folder by hand. A manual copy carries a plugin.yaml that does not pin the alr-emit version, so Hermes would never get the matching package from it.

The Gateway Restart

A running gateway keeps its old load until it restarts. The install asks Hermes whether a gateway is running, and restarts it if it is. If it cannot tell (the Hermes desktop app starts a gateway of its own, for one), it prints what to do:

hermes gateway restart

Check It

Open a NEW hermes chat and type /alr-ctl. It must answer. If it says Unknown command, the plugin is not loaded: run alr check.

alr check

alr check says whether Hermes can load the plugin. It flags a plugin that is installed but not enabled, one copied by an older install, and an enabled plugin that Hermes cannot load. After hermes update or hermes pm repair has rebuilt Hermes's environment and dropped the package, alr check names that, and the recovery is to run alr install hermes --yes again.

The commands are answered inline, with no model call, in the interactive CLI and in the gateway. A one-shot hermes -q sends them to the model instead.

Hermes reports no cost, so these records carry cost_usd: null. ALR_EMIT_COST_BASIS stamps the cost basis (metered or api-equivalent) on a record, and without it the field is omitted. ALR_EMIT_AGENT_ID names the agent on the records. When Hermes runs as a service and you move the record file with ALR_EMIT_SINK, set that variable in the gateway's service environment.

Uninstall and Purge

alr uninstall hermes --yes            # removes the plugin
alr uninstall hermes --purge --yes    # ... and deletes Hermes's records

The uninstall runs hermes plugins disable alr-emit, removes the plugin's __pycache__, and then the emptied plugin folder, takes alr-emit out of plugins.disabled in Hermes's config.yaml (Hermes has no command for that, so this is an edit the uninstall preview names, and a copy is kept beside the file), and restarts a running gateway. Afterwards alr check says nothing about Hermes.

If terminal Hermes cannot be found, the uninstall tells you the step to do by hand: hermes plugins disable alr-emit, then restart a running gateway.

Your records are kept unless you pass --purge. --purge deletes only the Hermes records from the shared record file, and the grades, cost corrections, and tag events that name only those records. Every other harness's records stay, byte for byte. Without --yes, --purge previews what it would delete.

Why It Works This Way

  • Hermes installs its own plugin. The install goes through Hermes's own commands (hermes plugins enable), so Hermes's package manager admits the package, and OpenALR never runs pip into an environment it does not own.
  • The install proves the load. A plugin that is copied but never loaded records nothing, and says nothing. The install imports alr-emit under Hermes's own Python and checks Hermes's error log before it reports success.
  • The install preview names what it will not do for you. If a gateway might be running and OpenALR cannot tell, it says so, and gives you the command.

Next: tag your work.

Report a problem with this page