langgraph-jev-router
LangGraph decorator that lets Jev take routing decisions it is confident about and falls back to your existing LLM router otherwise.
Overview
langgraph-jev-router puts Jev in front of routing you already have in LangGraph. Adding the @jev_first decorator to an existing conditional-edge router means that when Jev is confident it decides and your LLM router is never called; when Jev is unsure, unavailable or mid-conversation, your router runs exactly as before. The existing router becomes the safety net, so adoption cannot make routing worse and nothing breaks if Jev fails.
An optional attach_routes call lets Jev read node docstrings as route descriptions for better accuracy. It supports conditional-edge functions, nodes returning Command(goto=...), and code you cannot edit such as prebuilt supervisors or compiled subgraphs via an install_shortcut helper. A recommended rollout runs Jev in shadow mode before going live. Without a key, examples use a deterministic keyword-based FakeJev and say so, and 59 tests run offline; a check command verifies key, network and model.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Which route should this message take (e.g. billing, tech, account)? | billing · tech · account |
How it works
- Decorate the existing router with @jev_first
- New message triggers a Jev routing question over the route names
- If confident, Jev's route is used
- If unsure, unavailable or mid-conversation, the original router runs
- Optionally run in shadow mode first
Strengths
- Cannot make routing worse than the existing router
- One-line adoption
- Shadow-then-live rollout
- Offline tests and fake client
Caveats
- Benefit depends on how often Jev is confident
- Requires a TypeSafe key for real use
- LangGraph-specific
Getting started
Decorate your router with @jev_first, export TYPESAFE_API_KEY, and run jev-router check.At a glance
- Type
- Library
- Status
- beta
- Language
- Python
- Runtime
- LangGraph library
- Has code
- yes
- Has tests
- yes
Use cases and integrations
How curated lists describe it
A native LangGraph conditional edge that replaces slow generative LLMs with…
wh000wh000/awesome-jev-live
Frequently asked questions
What if Jev is wrong or down?
Unsure, unavailable or mid-conversation cases fall through to your existing router.
Do I have to change my router?
No, you add one decorator; your router stays as the fallback.
Can I test without a key?
Yes, examples use a deterministic FakeJev and tests run offline.
Related projects
Policy-driven router that sends each LLM request to the cheapest capable model tier, escalating when Jev finds a reason.
ProjectbetaTypeScript, PythonAlibaba's AgentScope 2.0 agent framework, which added a JevClassifierModel for binary, choice and score decisions via the TypeSafe SDK.
ProjectproductionPythonLocal-first routing engine for long-running agent tasks that uses a Jev decider to pick a model group per turn.
PluginproductionRust, TypeScriptOpen-source AI gateway for 100+ LLMs that can use Jev to classify requests for complexity routing and to compact tool results.
ProxyproductionPythonOpen-source workspace for running and reviewing AI coding agents across devices, with an optional Jev-based automatic model router.
ProjectproductionTypeScript- jev-router★ 593
Per-turn model routing for Claude Code and Codex: wraps the real CLI and lets Jev send simple turns to fast models and hard ones to strong.
ProxybetaJavaScript