Independent Jev guide
See how Jev
makes a decision.
Give it a message and a set of options. Explore the result, inspect the probabilities, and learn how to use it in your app.
Explore a recorded example. Live testing is currently unavailable.
Message to department
Recorded exampleNo recorded result is available yet for this sample, and live testing is currently unavailable. See how a result is produced below.
How it works
One request, one typed answer.
- 1
Provide the context
Send the text to evaluate as the request's state. A plain string is enough.
- 2
Define the possible answers
A Choice question lists the options Jev may pick from, each with a short description.
- 3
Use the returned decision
Jev returns the chosen option, a probability for every option, and a confidence value your code can branch on.
Confidence is reported by TypeSafe alongside the probabilities and reflects how spread out they are: a single clear peak means high confidence, a flat distribution means low. Use it to decide when to act and when to hand off to a person.
// Route a support message to a department with Jev.
// Requires Node.js 20+ and TYPESAFE_API_KEY in the environment.
// npm install @typesafe-ai/sdk
import { choice, TypeSafeClient } from "@typesafe-ai/sdk";
const client = new TypeSafeClient(); // reads TYPESAFE_API_KEY, defaults to jev-latest
const message =
"Hi, I was charged twice for my subscription this month. Can you refund one of them?";
const { answers } = await client.systemOne({
state: message,
questions: {
department: choice("Which department should handle this customer message?", {
billing: "Charges, invoices, refunds, payment methods",
account: "Login, password, profile, closing an account",
technical: "Bugs, errors, outages, integrations",
sales: "Pricing, plan comparisons, upgrades",
other: "Anything that does not fit the departments above",
}),
},
});
const { choice: department, probabilities, confidence } = answers.department;
// Your code decides what to do with the answer.
if (confidence < 0.5) {
console.log("Unsure. Route to a person.", probabilities);
} else {
console.log(`Route to ${department} (confidence ${confidence.toFixed(2)})`);
}Technical details
The example uses the official @typesafe-ai/sdk package (Node.js 20+). It reads TYPESAFE_API_KEY from the environment and defaults to the jev-latest model. The choice() helper builds a Choice question whose answer type is inferred from the option keys.
Under the hood this is one HTTP call: POST /v1/systemone with state, model and a questions map. The response holds one answer per question id with choice, probabilities (summing to 1) and confidence. The demo on this page makes the same call from a server route so the key never reaches the browser.
Testing status: the file is compiled by this site's TypeScript build against SDK 0.6.0, and the request shape was checked against the TypeSafe API reference in September 2026. It has not been run against the live API by this guide. The SDK refuses to run in a browser unless explicitly allowed, because the key would be visible to visitors.
Resources
Go deeper.
Official material and three community projects that call Jev. Listing is not an endorsement.
- TypeSafe documentationOfficialConcepts, the three question types, confidence, and patterns. (opens in a new tab)
- HTTP API referenceOfficialRequest and response fields for /v1/systemone, plus error codes. (opens in a new tab)
- typesafe-sdk-jsOfficialThe TypeScript client used in the example above. MIT licensed. (opens in a new tab)
- Jev ReviewCommunityby devagrawal09Code-review pipeline that asks Jev narrow questions about risk, evidence and severity. (opens in a new tab)
- pg-jevCommunityby realZachiPostgreSQL extension that turns plain-language conditions into row-level predicates. (opens in a new tab)
- Jev MCPCommunityby jkudishMCP server exposing Jev judgments to coding agents: verify, classify, rerank, gate. (opens in a new tab)