madewithlaya

Catalog / LLM routing & guardrails

0071GitHub

Hermes skill_router: pre-route each task to the right skill with a local Laya model

Hermes plugin that classifies each task against a ~300-skill index with Laya, injects the top skill's SKILL.md as per-turn context, and fails open. Cache-safe by design.

Open source ↗ github.comcost$0, localtime-
cdepuy/hermes-skill-routerREADME ↗
# skill_router

A Hermes plugin that **pre-routes each task to the right skill** before the main
model sees it, using a small calibrated local model (Laya, a 421M System-1
decision model). It implements the idea from [JEV TIP 001](https://x.com/parcadei/status/2101132368949993830):
stop spending your main model's tokens (and trust) on figuring out which skill
to load — classify the task against skill names + short descriptions, then load
the winner deterministically.

**Fixes the "session forgot the skill" failure**: the relevant skill's guidance
is injected as active context every turn, so the main model never has to
remember to call `skill_view()`.

## What it does

- On each new user turn, the plugin's `pre_llm_call` hook runs a tiny routing
  model (Laya, local, `$0`) against the ~300-skill index.
- It classifies the task, picks the top 1-2 skills, reads their `SKILL.md`, and
  injects a compact excerpt as the user-message context.
- Fail-open: if Laya is unavailable, missing, or routing finds nothing, the hook
  injects nothing and Hermes behaves exactly as stock.

## Cache-safe by design

The skill is injected through the **user-message channel** (`pre_llm_call`
returns `{"context": ...}`), never by mutating the system prompt. This preserves
Hermes's byte-stable prompt-cache invariant — only the ephemeral per-turn user
context changes, exactly like the built-in memory-prefetch path.

## Installation (no custom code for you)

The plugin lives in `~/.hermes/plugins/skill_router/` (user state, safe across
`hermes update`). Install once:

```bash
hermes plugins enable skill_router      # if not auto-enabled
```

It requires the local Laya venv (already present on this machine):
`~/.hermes/workspace/laya-venv/bin/python` with `pip install laya`.

Verify: `hermes plugin

Also filed under LLM routing & guardrails

  1. 0100

    laya-jev-lab: a local-first cascade that matches Jev's accuracy at 1.8x the speed

    Independent Jev vs Laya measurements plus a cascade: Laya decides first, high confidence executes, low confidence escalates to Jev. At a 0.60 threshold it matched Jev's 78%.

    @yibie · LLM routing & guardrails · lower than pure Jev

  2. 0096

    Laya Ultrafast: browser-use's jev-ultrafast agent ported to local Laya on MLX

    A port of the jev-ultrafast browser agent that decides with laya-mlx instead of the hosted Jev API. DOM snapshot, executor, safety checks and inspector are the originals.

    @ipenywis · LLM routing & guardrails · free, local

  3. 0088

    laya_router: a model router with Laya matches GPT-5 nano's accuracy, 35x faster, free

    Two routers behind one endpoint, measured on 180 labelled requests. Laya answers small/medium/powerful routing in one forward pass, against a GPT-5 nano router.

    @glukicov · LLM routing & guardrails · free, local

  4. 0076

    laya-browser-agent: browser decisions on Laya, drop-in for jev-ultrafast tooling

    Local decider for the browser-agent loop: hand it a numbered table of page controls and it picks the operation and element. Playwright/CDP driver, speaks /v1/systemone.

    @ChenneyZhuang · LLM routing & guardrails · free, local, no screenshots