Skip to content

JEV

LangGraph dental-clinic agent where a local Jev-style router picks which tools to bind each turn, halving LLM token use.

Libraryprototype

Overview

ClinicDesk + Jev is a LangGraph front-desk agent for a dental clinic that uses a local Jev-style router (via the open-alternative-jev project) to decide which tools the LLM receives each turn. The router classifies the user's message in one forward pass of a small open-weights model, choosing one of ten tools or general_chat with a confidence. The agent then binds only that tool and the lookups it depends on, instead of sending all ten tool schemas to gpt-oss-120b on Groq every time.

At confidence of 0.75 or higher, a tool choice binds that tool group and general_chat binds none; below 0.75, all ten tools are bound as a safe fallback. On 82 of 100 labelled questions (some in Arabic), the README reports 51% fewer Groq tokens, mean latency dropping from 9.4 s to 5.4 s, all 72 confident picks correct and no loss in reaching the right tool. Booking was the weak spot, where confidence spread and 9 of 10 turns fell back.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich of the 10 tools, or general_chat, does this message need?—

How it works

  1. router_node asks the local model one choice per turn
  2. Confidence of 0.75 or more binds that tool group (or none for chat)
  3. Lower confidence binds all ten tools
  4. agent_node calls the LLM with the bound tools
  5. Routing label and confidence are traced to LangSmith

Strengths

  • 51% fewer LLM tokens in the reported benchmark
  • Router runs locally, adding no API tokens
  • Safe fallback when uncertain
  • Every routing decision traced

Caveats

  • Benchmark stopped at 82 of 100 questions due to a free-tier cap
  • Multi-step tasks like booking often fall back
  • Requires a local GPU for the router

At a glance

Type
Library
Status
prototype
Language
Python
Runtime
LangGraph agent
Has code
yes

Use cases and integrations

How curated lists describe it

Frequently asked questions

What does the router decide?

Which tool, or plain chat, the next message needs, so only those schemas are sent to the LLM.

Does it use TypeSafe's API?

No. It uses a local open-weights router from open-alternative-jev.

What happens when the router is unsure?

Below 0.75 confidence, all ten tools are bound.

Related projects

  • Decision middleware for AI agents that uses local Laya to pick tools and judge results, falling back to an LLM when unsure.

    ProjectbetaPython
  • Six-file DSPy coding agent where Jev answers closed questions (safety, tool fit, history, delegation) and Python owns policy.

    ProjectprototypePython
  • Open 2B non-autoregressive decision model on Qwen3.5-2B for agent tool routing and DOM actions, with BF16, FP8 and INT8 weights.

    ModelresearchPython
  • Composio agent SDK with an optional TypeSafe provider that uses Jev to shortlist and pick tools and closed-set arguments.

    ProjectproductionTypeScript
  • Python multi-agent runtime with native Jev support: agents ask typed questions via a decision client separate from the text model.

    LibraryproductionPython
  • Middleware for LangChain deepagents where Jev ranks and verifies which SKILL.md skills each turn needs, keeping the rest out of the prompt.

    Agent skillbetaPython