Hermes Tool Router plugin

Hermes Agent spends fewer tokens at start: the plugin drops unneeded toolsets and rolls back to the full set when unsure.

  • 145 ★ on the repository
  • Last commit
  • MIT
Plugin

Extended access

Why this level

  • The plugin changes the toolset the model sees on the first turn.
  • An enabled classifier sends the first request text to OpenRouter or a local server.
All reasons and checks

atlasomnia/hermes-tool-router

Install

Works in

Manual install

hermes profile create router-test --clone
mkdir -p ~/.hermes/profiles/router-test/plugins
cp -R . ~/.hermes/profiles/router-test/plugins/hermes-token-router

Copy from the root of the repository clone into the test profile. Then enable the plugin in its `config.yaml` and start a fresh session.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The plugin changes the toolset the model sees on the first turn.
  • An enabled classifier sends the first request text to OpenRouter or a local server.

This is third-party code. Review the repository files before installing.

What it does

The plugin shrinks the tool list in Hermes Agent's first request to the model. On the first turn it decides which toolsets the task needs and sends only those. If confidence falls below the 0.90 threshold, the full set stays. When a pruned tool is needed later, Hermes adds its toolset for the rest of the session, and the model can request a toolset itself through `request_toolset`. Rules work without any keys. An optional classifier handles ambiguous requests: the README example uses `google/gemini-3.5-flash-lite` through OpenRouter. The plugin is off by default.

Who it is for. Hermes Agent users with many tools whose first request balloons with schemas, and anyone watching token spend.

Good fit when

  • Hermes's starting request drags in dozens of tool schemas while most tasks need two or three toolsets.
  • A profile is wired to several integrations and messengers, and the tool list has grown large.
  • Token spend is compared before and after: `/router off` and `/router on` switch routing without editing configuration.
  • Compatibility with the Hermes version is unclear, and `python diagnostics.py` shows whether a route exists before the provider request.

Not a fit when

  • A primary profile in production: the author advises testing the plugin on a separate profile first.
  • A one-shot `hermes -z` run: the `/router` command does not work there, and the text goes straight to the model.
  • The first request must not go to external services: an enabled classifier sends it out for classification.

Example request

Run `/router status`, show which toolsets remained after routing and compare the starting request with the router off.

Limitations

The plugin is experimental and off by default: enable it with `enabled: true` for the right profile in `config.yaml` and start a fresh session. First-turn savings depend on the Hermes version: exit code 2 from `python diagnostics.py` means they cannot be promised. README figures come from the Hermes token estimator and the author's measurements, not provider bills. The classifier adds one short network request and needs `OPENROUTER_API_KEY` or a local model. Keep backups outside `plugins/`: Hermes treats a directory with `plugin.yaml` as a separate live plugin.

How to disable. `/router off` stops routing in the running process, and `HERMES_TOKEN_ROUTER_ENABLED=0` is a kill switch that `/router on` cannot override. To remove the plugin, delete the profile's `plugins/hermes-token-router` directory.

FAQ

How do I install Hermes Tool Router?

Create a test profile with `hermes profile create router-test --clone`, copy the repository into that profile's `plugins/hermes-token-router` and enable the plugin in its `config.yaml`. Then start a fresh session.

Is an OpenRouter key required?

No. Rules work without a key, but ambiguous requests then get the full toolset. The `OPENROUTER_API_KEY` key enables the fast classifier.

What happens if the router pruned a tool that is needed?

Hermes adds that tool's toolset for the whole session, and the call continues the usual way. The router prunes tools only at confidence of 0.90 or higher.

How do I switch the router on and off on the fly?

With `/router on`, `/router off`, `/router reset` and `/router status`. They do not work in a one-shot `hermes -z` run.

How do I check that first-turn savings are possible?

Run `python diagnostics.py`. Exit code 0 means a route exists before the provider request; code 2 means first-turn savings cannot be promised.

Discussion

No questions or reviews yet.

Plugins

A pack of 19 plugins for Hermes Desktop: provider quotas, an iteration meter, a memory review queue, session management and RSS.

PluginBroad access52Repository stars

A pack of practical skills for Hermes Agent: notes, trips, code security, browser automation and interface themes.

SkillExtended access78Repository stars

Official Hermes Agent plugins: Home Assistant, Spotify, Blender, Snyk, Langfuse, sandboxes and importers for other agents

PluginBroad access672Repository stars

Memory provider for Hermes Agent: duplicates are merged, contradictions surface and every recalled memory carries a reason.

PluginExtended access96Repository stars

Thirteen stable and six experimental skills for Hermes Agent: stack diagnosis, migration, token and skill audits

SkillExtended access127Repository stars

A library of skills and plugins for Hermes Agent covering research, media, scraping, documents, DevOps and agent upkeep.

SkillBroad access123Repository stars

README in short

The version 0.2 design in the documentation: first-turn routing only, a session-sticky surface and one-way expansion. Compatibility, diagnostics and profile handling get their own sections. It ends with measurements: on a live registry of 39 tools, the schema for a web request shrinks from 18,627 to 490 tokens by the Hermes estimate.

README badge

Report a problem