Skip to content

hono-jev-router

Experimental Hono router that matches HTTP requests to plain-language route descriptions using one Jev Noul per route.

ProjectprototypeMIT

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

TypeQuestionAnswers
Yes / noDoes the request match this description?yes · no

How it works

  1. Hono receives a request; path routes are tried first
  2. Remaining requests go to Jev with one Noul per registered description
  3. First route in registration order above the threshold is selected
  4. Handler runs with c.get('jev') exposing route, confidence and probabilities
  5. 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

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.

    ProjectprototypeRuby
  • Java SDK that lets natural language invoke tinystruct @Action methods, using Jev as a semantic dispatcher with confidence gates.

    LibrarybetaJava
  • Symfony demo that triages French public-service requests with one Jev call each: intent choice, urgency score and bug noul.

    AppprototypePHP
  • elizaOS autonomous agent framework, listed for an optional TypeSafe System One HTTP adapter in its source.

    ServiceproductionTypeScript
  • Alibaba's AgentScope 2.0 agent framework, which added a JevClassifierModel for binary, choice and score decisions via the TypeSafe SDK.

    ProjectproductionPython
  • Open-source AI email assistant; listed as using Jev as an optional classifier for email intent and triage.

    ProjectproductionTypeScript