Skip to content

Post

Routing Agents with Jev and Laya: Adding System One Decisions to Quarkus LangChain4j

A hands-on write-up of swapping an LLM routing call for System One decisions in a Quarkus LangChain4j app: a custom Planner asks one Choice question to pick the specialist agent, and an OutputGuardrail asks a Noul question to reject bad replies.
Format
Post
Reading time
3 min
Published by
Community
Author
Kevin Dubois
Last verified
Oct 2026

Highlights

  • Replaces the LLM supervisor's routing chat call with a custom LangChain4j Planner that asks the decision model one Choice question.
  • Adds an OutputGuardrail backed by a Noul question — does the reply actually answer the user? — which the original app lacked.
  • The decision logic is about 285 lines; orchestration, retries and the REST layer stay with Quarkus (Java 25, Quarkus 3.39.x, LangChain4j 1.14.x).
  • Choice returns a choice with probabilities and confidence; Score returns a score and legend; Noul returns a yes-probability between 0 and 1.
  • Jev runs in the post are a deterministic stub because TypeSafe paused signups; Laya runs are real, and switching is one config property.

Watch out

Grounded in the truncated article text read on 2026-10-15; the excerpt ends inside the JevRouter.route method. The author could not test Jev because TypeSafe paused signups, so the Jev path is a stub while Laya runs are real, and no accuracy or latency measurements are reported.

Questions about this entry

Short answers drawn from the linked project or page.

From the Jev guides

Original write-ups on what this entry is for.

From the Jev AI model community

Posts from builders shipping with Jev right now.

Follow @typesafeai