jev-ui

React components that decide which component to render, how to order a list, and whether to show an affordance — from calibrated judgments returned by TypeSafe’s Jev.

The model returns a typed answer with probabilities and a confidence. Your code keeps the thresholds, the fallbacks, and every action.

bun add jev-ui
read the docssee it runningllms.txt

three components, three primitives

<Branch>picks one subtree out of severalChoice + no-matchdemo →
<Rank>orders, filters, and truncates a candidate setChoice or one Score per itemdemo →
<Gate>shows an affordance when a condition holdsNouldemo →

Those three decide what renders. useScore answers how much: you describe a scale in words, it returns a number, and your code uses it as an ordinary prop — show the help text or not, load 10 rows or 50, render the dense table or the roomy one. In the form demo it decides how much explanation each field carries, from “labels are enough” to “every non-obvious field needs a sentence”.

what it does differently

One request per render passEvery judgment registered in one pass is batched into a single call. The state is ingested once for all of them, so the marginal question is close to free — and each component reports what it cost.
The question scopes its own stateAn ask names the state it needs by backticked path, and only those channels are sent. Accuracy degrades on a large state full of irrelevant detail, so this is not a micro-optimisation.
Telemetry becomes wordsdwellMs: 41200 is projected to dwell: "studied" before the model sees it. Jev underperforms on numeric representations and does not count reliably, and bands also keep re-resolution rare.
The judgment picks presentationCode owns every action. Nothing here submits a form, spends money, or deletes a row — and gates only ever add affordances, never hide primary content.

the same demos, live or recorded

The demos here replay recorded judgments — a hosted site with a live key would let any visitor spend the owner’s money, so the deployment runs without one. Clone the repo, add your key and every one of them calls the real API instead, with no code change: the panel under each demo names the transport it used, the tokens it spent and what that render cost. The same recordings make the test suite deterministic and free, and replay throws on a missing fixture rather than quietly going live. Transports and testing →