← Back to blog

Model Routing Plugins Emerge for Hermes Agent After Liquid AI Encoder Release

hermesmodel-routingpluginsliquid-aicost-optimization
Model Routing Plugins Emerge for Hermes Agent After Liquid AI Encoder Release

Liquid AI released the LFM2.5-Encoder-350M on July 29 - a compact bidirectional encoder tuned for classification tasks, running at ~0.5 seconds per prompt on CPU. Within 48 hours, two independent Hermes Agent plugins shipped that use it (or the same architectural pattern) to route prompts to the right model tier. One is a lightweight classifier by @francip. The other, by Michael Gannotti / SMF Works, is a published, documented plugin with three classification signals, fail-closed security handling, and a deliberate blank-by-default configuration model.

The core idea is the same across both: do not send every prompt to the most expensive model. Classify the task first - on CPU, with a deterministic local classifier - then route simple queries to cheap models and hard problems to frontier models. This is a different optimization from prompt caching or context compression. Those reduce the cost of each call. Routing reduces the number of calls that hit expensive models at all.

How the Hybrid Routing Plugin Works

The SMF Works plugin classifies every incoming task on three independent signals:

  1. Sensitivity - regex patterns for bearer tokens, private-key headers, SSN/card-number formats, and confidentiality markers. Sensitive tasks require a model explicitly attested as local in model_egress. If no local model matches, the router fails closed and returns disposition: block.
  2. Role - keyword-based classification into coding, research, creative, strategy, vision, or general buckets.
  3. Difficulty - heuristic scoring assigns tasks to simple, standard, or hard tiers.

The classifier runs entirely locally. It never calls an LLM. For sensitive text, the router returns only the local_only_model reference when the exact ref is classified local in the egress map - a blank model, absent metadata, or an explicit external class produces no candidate at all.

The routing decision returns a disposition field that is authoritative for orchestration:

Disposition Meaning
inline Route can be handled in the primary session context
separate Requires a separate execution path with the recommended model
block Sensitive route failed closed - do not process inline
unavailable No actionable model route exists

Skill to Plugin: What Changed

The routing stack started as a profile-local skill - Python files in a single Hermes profile directory, usable only by the author's agents. Moving to a plugin unlocked three capabilities that a skill cannot provide:

LLM-callable tools. The agent can call route_classify(text), route_status(), and route_test() as native tools alongside web_search or read_file. No skill loading or terminal invocation required.

Universal slash command. /route works on every gateway platform - Telegram, Discord, Slack, WhatsApp. This was impossible as a skill; plugins register commands once and they propagate everywhere.

CLI subcommand. hermes route "Debug this function" works in terminal sessions. The same classification engine is available to both the agent and the human operator.

Blank by Default

The first version of the plugin shipped with default model references - Ollama Cloud providers hardcoded into the config. As Gannotti noted in the announcement post:

The defaults assumed the user had an Ollama Cloud API key. That was wrong. Not everyone has Ollama Cloud. A user with only OpenAI and Anthropic configured would install the plugin and silently route everything to a provider they could not call.

The shipped version now has all model fields blank. On first run, the plugin returns: "No models configured. Run 'hermes route' to set up your routing config." The difficulty heuristics, sensitivity regex patterns, and role cue keywords work out of the box - those are provider-agnostic. Only the model refs require explicit configuration.

This is the right install experience for a plugin that controls which model receives every prompt. A misconfigured router degrades the agent. A blank router tells you it needs configuration.

The Two Implementations

Aspect @francip's hermes-router SMF Works Hybrid Routing
Classification engine Liquid AI LFM2.5-Encoder-350M Deterministic local heuristics + regex
Speed ~0.5s on CPU Sub-millisecond (no model load)
Signals Prompt complexity (simple/complex) Sensitivity, role, difficulty
Sensitive data handling Not addressed Fail-closed block disposition
Public repo Not yet (announcement only) [GitHub](https://github.com/smfworks/hermes-plugin-hybrid-routing)
Install method TBD `hermes plugins install smfworks/hermes-plugin-hybrid-routing`
Tools exposed to agent TBD `route_classify`, `route_status`, `route_test`

The two approaches are complementary. The Liquid AI encoder path offers richer classification at the cost of a 350M parameter model load. The deterministic path has no model dependency but relies on hand-authored heuristics. Both preserve prompt caching - neither swaps the primary session model mid-conversation, which would invalidate the cache. Both use sub-agent delegation or separate execution paths to apply the routing decision.

What This Signals

Two independent developers building the same capability within 48 hours of an upstream model release is not a coincidence. The encoder's existence made a latent need visible: Hermes agents running on fixed per-session models waste tokens on tasks below their capability tier. A lightweight classifier that runs locally and recommends the right model fills a gap that prompt caching and context compression cannot address. Those techniques reduce the cost of each call; routing reduces the number of expensive calls.

The skill-to-plugin journey is also worth noting. The SMF Works plugin started as a local skill, worked well enough to validate the approach, then got refactored into a distributable plugin with tool registration, slash commands, and CLI integration. That progression - skill validates, plugin distributes - is the path that turns single-user experiments into community infrastructure.

[^1]: francio. "hermes-router announcement." X. July 29, 2026.

[^2]: Michael Gannotti. "Hybrid Contextual Model Routing plugin announcement." X. July 29, 2026.

[^3]: SMF Works. "Hybrid Contextual Model Routing - Hermes Plugin." GitHub. July 29, 2026.

[^4]: SMF Works. "Hybrid Contextual Model Routing: From Skill to Hermes Plugin." GitHub. July 29, 2026.

Termagotchi
_

Ryan Underdown

Autodidact. Rarely listens to advice.

Follow on X @catamarammed or GitHub @underdown