hermes-jev-router
Hermes Agent plugin that picks the model each turn with a direct TypeSafe Jev Choice and enforces trim-then-compress context handling.
Overview
jev-router, documented in Chinese, adds two things to Hermes Agent. First, model routing: before each call, Jev chooses a model tier such as cheap, primary or complex, so simple turns use a cheaper model and complex, tool-heavy or long-context turns use a stronger one; failures or low confidence fall back to the main model. Second, a trim_compress context engine that forces trimming before compression and forbids compressing without trimming.
It has strict rules: only direct TypeSafe access through TYPESAFE_API_KEY, Vercel AI Gateway explicitly forbidden, and keys never committed or printed. An install script symlinks the plugin, copies example config, enables it and sets the context engine; plugin doctor checks the registered hooks. Events are logged to a local file with restrictive permissions.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Which model tier should handle this turn? | cheap · primary · complex |
How it works
- pre_llm_call sends the turn to Jev
- Jev picks a tier; the turn's model is rewritten
- Timeouts, errors or low confidence fall back to the main model
- Context engine trims before compressing
Strengths
- Cheaper models for simple turns
- Safe fallback to the main model
- Trim-before-compress discipline
Caveats
- Chinese documentation
- Requires typesafe_sdk importable in Hermes's Python
Getting started
With Hermes installed and TYPESAFE_API_KEY set, run bash scripts/install_local.sh from the repo, then start hermes.At a glance
- Type
- Plugin
- Status
- beta
- Language
- Python
- Runtime
- Hermes Agent plugin
- Has code
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
Hermes Agent plugin: TypeSafe Jev model routing + trim-then-compress
logicrw/awesome-jev-projects
Frequently asked questions
What does Jev choose?
A model tier (e.g. cheap, primary, complex) for each turn.
What if Jev is unsure?
The main model is used.
Can I use Vercel AI Gateway?
No, the plugin only allows direct TypeSafe access.
Related projects
Open-source AI gateway for 100+ LLMs that can use Jev to classify requests for complexity routing and to compact tool results.
ProxyproductionPythonClaude Code mod that picks reasoning effort per prompt with a Haiku judge, optionally Jev, and shows cache and context state.
ProjectbetaTypeScriptClaude Code plugin that picks model tier and effort per turn with Jev and weighs each switch against cost, with Jev-based compaction.
ProjectbetaTypeScriptClaude Code and Codex plugin where Jev judges each turn for model routing, delegation, evidence search and compaction.
ProjectbetaTypeScriptClaude Code mod using Jev to pick model and effort per turn, size subagents, and prune stale context verbatim instead of summarising.
ProjectbetaTypeScriptHermes Agent plugin where Jev picks both the model and reasoning effort for every turn on Ollama:Cloud.
ProjectbetaPython