How do I set up Jev?
Configure TYPESAFE_API_KEY on the server, then install the official Python SDK or call /v1/systemone. Start with one bounded Choice question and validate the response in application code.
Open the setup and API guideFollow one complete path: decide whether Jev fits the task, choose an output type, write the decision contract, make the call, and handle uncertainty with confidence-aware policy.
Jev accepts state plus closed questions and returns Choice, Score, or Noul instead of free-form text. This is the shortest Python path; the six chapters below explain type selection, question design, and production policy.
python -m pip install typesafe-sdkexport TYPESAFE_API_KEY="your-api-key"from typesafe_sdk import Choice, TypeSafeClient
with TypeSafeClient() as client:
result = client.system_one(
state={"message": "Payment failed for three days."},
questions={
"route": Choice(
instructions="Which team should handle this?",
criteria={
"billing": "Payments or subscriptions",
"technical": "Bugs or integrations",
},
)
},
)
answer = result.answers["route"]
print(answer.choice, answer.confidence) Open the complete Jev Python SDK tutorial → Configure TYPESAFE_API_KEY on the server, then install the official Python SDK or call /v1/systemone. Start with one bounded Choice question and validate the response in application code.
Open the setup and API guideUse Jev to classify a change, estimate a risk band, or decide whether human review is required. Keep Git operations, tests, permissions, and merge policy deterministic.
Read the Jev Git workflow tutorialTypeSafe Jev is a hosted model, not an open-weight model. For local or open-source deployment, compare System One alternatives such as AnyJev, JevK5, Winnow, and Laya.
Open the System One model directoryJev is not a chat model. It turns existing state into a closed Choice, Score, or Noul decision and returns a probability distribution.
Pass a string, object, or array containing the text and related facts the judgment needs. Use named object fields for most real requests.
Each question should ask one focused thing a knowledgeable person could judge quickly from the supplied state.
Questions in one request see the same state, run independently, and do not leak one answer into another.
Weight, threshold, branch, and combine typed answers in ordinary code instead of hiding workflow logic in one prompt.
Official references: Introduction · State · Primitives
Use Choice for mutually exclusive labels, Score for ordered levels, and Noul for one true-or-false judgment.
| Type | You supply | You receive | Use when |
|---|---|---|---|
choice | Named options → descriptions | Selected key + per-option probabilities (+ confidence) | Mutually exclusive labels / routes |
score | Ordered levels (2–10), low → high | Probability-weighted level score + rung probs | Severity, quality, risk rubrics |
noul | Yes/no proposition (+ optional criteria) | Probability of true | Single fact checks |
choiceUp to 255 optionsUse for unordered, fixed alternatives. Add other / none when the list may not cover every state. The chosen value is the highest-probability option.
{
"choice": "technical",
"probabilities": { "technical": 0.85, "billing": 0.15 },
"confidence": 0.78
}score2–10 ordered levelsLevels are indexed from 0. Score is the weighted average across level probabilities, so it can fall between two levels.
{
"score": 1.43,
"probabilities": { "0": 0.0, "1": 0.57, "2": 0.43 },
"confidence": 0.35
}noul0 = no · 1 = yesUse for a clean yes/no judgment. Near 0.5 means uncertainty, not a medium amount of the property. Noul has no separate confidence field.
{
"type": "noul",
"noul": 0.95
}Keep option names stable, define mutually exclusive boundaries, include a residual path, and give each question one decision.
question_idA response lookup key for your code. It is not sent to the model, so instructions must still contain the complete question.
typechoice, score, or noul. Pick the shape your code can act on directly.
instructionsThe complete, specific judgment. It may be a string, object, or array and can reference named state paths.
criteriaChoice options, ordered Score levels, or optional true/false clarification for Noul.
route: {
type: 'choice',
instructions: 'Route this ticket to one queue.',
criteria: {
tech: 'Bugs, outages, API failures, or integrations',
sales: 'Pricing, plans, demos, or new-purchase intent',
billing: 'Charges, invoices, receipts, or subscriptions',
human: 'Ambiguous, sensitive, legal, or multi-issue'
}
}Keep evidence in named state fields and point instructions at them with dot-and-index paths. This reduces ambiguity about which text, record, or policy should control the answer.
const state = {
ticket: {
message: 'I was charged twice. Please refund the duplicate.',
orderId: 'A-104'
},
order: { charges: [49, 49] },
refundPolicy: 'Duplicate charges are eligible for a refund.'
};
const questions = {
refund_requested: {
type: 'noul',
instructions: 'Does `ticket.message` request a refund?'
},
policy_supports_refund: {
type: 'noul',
instructions: 'Does `refundPolicy` support the request given `order.charges`?'
}
}; Official references: Primitives · State
Call the official System One endpoint or SDK from your server, inspect the typed response, and handle validation, rate-limit, and overload errors. Gateway remains an optional access path.
Keep TYPESAFE_API_KEY on the server. Send state, model, and a map of named questions to POST /v1/systemone.
curl -X POST https://api.typesafe.ai/v1/systemone \
-H "Authorization: Bearer $TYPESAFE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"state": "Stripe has failed for 3 days. I am losing sales.",
"model": "jev-latest",
"questions": {
"department": {
"type": "choice",
"instructions": "Which team should handle this?",
"criteria": {
"billing": "Payment or subscription issues",
"technical": "Bugs or integration problems",
"sales": "Pricing or account questions"
}
},
"is_urgent": {
"type": "noul",
"instructions": "Does this message convey urgency?"
}
}
}' The Python SDK reads TYPESAFE_API_KEY from the environment, defaults to jev-latest, exposes typed question/answer classes, and applies its default retry policy.
pip install typesafe-sdk
from typesafe_sdk import Choice, Noul, TypeSafeClient
with TypeSafeClient() as client:
response = client.system_one(
state={"message": "Stripe has failed for 3 days.", "impact": "Losing sales"},
questions={
"department": Choice(
instructions="Which team should handle this?",
criteria={
"billing": "Payment or subscription issues",
"technical": "Bugs or integration problems",
"sales": "Pricing or account questions",
},
),
"is_urgent": Noul(
instructions="Does `message` and `impact` convey urgency?"
),
},
)
department = response.answers["department"]
print(department.choice, department.confidence)
print(response.answers["is_urgent"].noul) {
"model": "jev-1.13.0",
"answers": {
"department": {
"type": "choice",
"choice": "technical",
"confidence": 0.78,
"probabilities": { "technical": 0.85, "billing": 0.15, "sales": 0.0 }
},
"is_urgent": { "type": "noul", "noul": 0.95 }
},
"usage": { "input_tokens": 392, "output_tokens": 54 }
} 401Missing or invalid API key. Check the Bearer token.
422Invalid request shape. Inspect the response for the offending field.
429Rate limit exceeded. Back off before retrying.
529Service temporarily overloaded. Back off before retrying.
This site also documents Gateway as an access layer for AI SDK evaluate. It is an alternative integration path, not part of Jev or TypeSafe.
import { experimental_evaluate as evaluate } from 'ai';
import { gateway } from '@ai-sdk/gateway';
const result = await evaluate({
model: gateway('typesafe-ai/jev'),
state,
questions,
});Official references: Quick start · API reference · SDKs
Do not turn the top probability directly into a final action. Set bands for suggestion, confirmation, and human review based on business risk.
Choice and Score return the complete distribution. Use it when runner-up options, ambiguity, or custom uncertainty measures matter.
Confidence compresses how concentrated or flat the distribution is into 0–1. It is not the same as the selected option probability.
TypeSafe exposes confidence from the option distribution. A practical policy is:
Auto-suggest the Choice (tag, route, or verdict) in your UI.
Show the suggestion, but require an operator to confirm it before continuing.
Send to a human queue with no default action.
Calibrate cutoffs on labeled examples from your stream or inbox. Thresholds are use-case-specific. Never wire suggestions into money or refund side effects.
action = response.answers["action"]
if action.confidence < 0.5:
route_to_human(state) # uncertain: do not guess
elif action.choice == "check_balance":
show_balance(account_id) # reversible, low stakes
elif action.choice == "approve_transfer":
if action.confidence > 0.9:
confirm_then_execute(account_id)
else:
ask_user_to_confirm(account_id) # higher stakes, higher bar Pass a string, object, or array as state. Prefer structured records (comment text + metadata) over dumping a whole chat log when only one message matters.
Official references: Confidence
Build one complete workflow with structured state, parallel questions, code-owned policy, audit evidence, retries, and a human fallback.
Send one structured ticket state and ask three independent questions in parallel. Keep routing and safety policy in code.
const questions = {
department: {
type: 'choice',
instructions: 'Which team should handle `ticket.message`?',
criteria: {
returns: 'Exchanges, wrong or damaged items',
shipping: 'Delivery status, delays, or lost packages',
billing: 'Charges, invoices, or payment problems',
other: 'None of the above'
}
},
frustration: {
type: 'score',
instructions: 'How frustrated is the customer?',
criteria: ['Calm', 'Concerned but civil', 'Very angry']
},
refund_requested: {
type: 'noul',
instructions: 'Does `ticket.message` request money back?'
}
}; const department = result.answers.department;
const frustration = result.answers.frustration;
const refundProbability = result.answers.refund_requested.noul;
if (department.confidence < 0.5) {
return { action: 'manual_triage', reason: 'uncertain_department' };
}
const flags = [];
if (frustration.score > 1.4) flags.push('senior_agent');
if (refundProbability > 0.75) flags.push('refund_review');
return {
action: 'route',
team: department.choice,
flags,
evidence: {
departmentProbabilities: department.probabilities,
frustrationScore: frustration.score,
refundProbability
}
}; These are research paths, not claims that this site built the projects. Each card opens the corresponding category in the open-source radar so you can inspect real implementations and source evidence.
Choose a model, tool, skill, or queue from a bounded catalog; keep budget and fallback policy in code.
Browse sourced projects 02 CHOICE + NOULClassify a record into allow, block, or review, then use a separate true/false check for a specific policy violation.
Browse sourced projects 03 SCORE + NOULScore proposed tool-call risk and gate irreversible actions behind an explicit human confirmation step.
Browse sourced projects 04 CHOICEChoose the next action from controls extracted by an accessibility tree while another system observes and executes.
Browse sourced projects 05 SCORE + NOULEvaluate a diff against named rules, retain probabilities, and route uncertain findings to a reviewer.
Browse sourced projects 06 CHOICE + SCORECombine department Choice, frustration Score, and refund-request Noul without giving the model permission to issue money.
Browse sourced projectsOfficial references: Patterns · Primitives
After the core course, use these official references, public demos, and community directories as needed.
What you learn: See where System One / Jev decisions fit before you pick a pattern.
What you learn: Read the docs baseline, then the launch post on models and Jev.
Link: docs.typesafe.ai · Introducing System One models and Jev
What you learn: Minimal first repo to call Jev and see a typed decision return.
What you learn: Community essay framing when a decision model beats text generation.
What you learn: Watch short demos of Jev in action (community uploads).
What you learn: Recorded walkthrough of a Jev setup / decision flow.
What you learn: Try a live Val Town demo without standing up your own stack.
Link: typesafe-demo.val.run
What you learn: Browser-use launch demo focused on speed and low-latency decisions.
What you learn: Compaction / context-control patterns with Jev in the loop.
What you learn: Harness scaffolding for evaluating and wiring Jev decisions.
What you learn: Agent / tooling experiment that gates actions with Jev-style checks.
What you learn: Browse a community index of Jev links and projects.
What you learn: Browse a curated collection of Jev projects and resources.
What you learn: Another community directory site + GitHub index of Jev resources.
What you learn: Discover more community projects and learning resources.
What you learn: Discover Jev projects grouped around practical use cases.