hono-jev-router
Experimental Hono router that matches HTTP requests to plain-language route descriptions using one Jev Noul per route.
Overview
hono-jev-router, by Hono's author, replaces method-and-path matching with semantic routes. You register handlers with app.on('jev', 'a request from an AI agent', handler), and the router sends the request's method, URL, headers and part of the body to Jev with one yes/no question per description, all evaluated in parallel in a single call. The first registered route whose probability reaches the threshold wins; otherwise the request falls through, usually to notFound. Normal path routes and middleware still go through Hono's TrieRouter and win before Jev is called.
It is aimed at developers experimenting with serving different content to agents, browsers or bots. The decision result, including per-route probabilities, is available in the handler. The README is candid: every semantic request costs a model call and latency, probabilities are not guarantees, it must not be used for authentication, and sensitive headers are redacted before sending.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Does the request match this description? | yes · no |
How it works
- Hono receives a request; path routes are tried first
- Remaining requests go to Jev with one Noul per registered description
- First route in registration order above the threshold is selected
- Handler runs with c.get('jev') exposing route, confidence and probabilities
- No match falls through to notFound
Strengths
- Route by intent (agent vs browser vs bot) without user-agent heuristics
- All route checks happen in one parallel call
- Sensitive headers like Authorization and Cookie are redacted by default
Caveats
- Explicitly experimental; adds latency and per-request cost
- Not a security boundary: request senders can steer the answer
- Request data is sent to a third-party API
Getting started
`npm i hono-jev-router`, then pass `new JevRouter({ apiKey: process.env.TYPESAFE_API_KEY })` as the Hono router.At a glance
- Type
- Project
- Status
- prototype
- Language
- TypeScript
- Runtime
- Hono (Node, Workers, Bun)
- Has code
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
Web frameworks: Hono middleware that routes HTTP requests by meaning rather than by method and path, deciding with Jev.
yibie/awesome-jevExperimental Hono router: Jev matches an incoming request to a plain-language route description
AnotiaWang/awesome-decision-modelsAn experimental semantic HTTP router for Hono using natural-language route descriptions.
logicrw/awesome-jev-projectsRoutes Hono HTTP requests by meaning.
cobanov/awesome-jevRoute HTTP requests by meaning. A semantic router for Hono powered by Jev.
hellogumbo/awesome-jevExperimental Hono router that matches requests against plain-language descriptions instead of paths.
MrJev/awesome-jev
Frequently asked questions
What does hono-jev-router decide?
Which plain-language route description an incoming HTTP request matches, using one yes/no question per route.
Can I use it to block bad traffic?
Only as a heuristic; the README warns it is not a security boundary because the request itself is model input.
Are probabilities normalized across routes?
No. Each route is an independent yes/no, so probabilities do not sum to 1.
Related projects
Rails engine for voice and typed commands: define actions in a Ruby DSL and Jev picks the matching command or page control.
ProjectprototypeRubyJava SDK that lets natural language invoke tinystruct @Action methods, using Jev as a semantic dispatcher with confidence gates.
LibrarybetaJavaSymfony demo that triages French public-service requests with one Jev call each: intent choice, urgency score and bug noul.
AppprototypePHPelizaOS autonomous agent framework, listed for an optional TypeSafe System One HTTP adapter in its source.
ServiceproductionTypeScriptAlibaba's AgentScope 2.0 agent framework, which added a JevClassifierModel for binary, choice and score decisions via the TypeSafe SDK.
ProjectproductionPythonOpen-source AI email assistant; listed as using Jev as an optional classifier for email intent and triage.
ProjectproductionTypeScript