Employee training · Jev APIs
Decisions,
not conversations
How decision models like TypeSafe’s Jev work, and how they save time and money.
state + questions
typed answers + probabilities
The idea
A decision model answers typed questions about a block of state
Jev is TypeSafe’s “System One” model. It does not write text. You hand it the situation and the questions; it hands back one structured answer per question, each with a probability.
Non-generative
No prose to parse, no token-by-token wait for an answer.
Typed
Every answer is one of the options you declared, so code can branch on it directly.
Calibrated
Trained so that stated probabilities track how often the answer is right.
Jev API training
2
The contrast
Generative LLM and decision model, side by side
Generative LLM
Decision model (Jev)
Output
Free text, token by token
One typed answer per question
Your code must
Prompt for a format, parse, retry
Read a field and branch
Confidence
Not built in; often self-reported
Probability on every answer
Explanation
Can show its reasoning
None returned
Best at
Open-ended writing and reasoning
Classify, score, route, verify
They are complements: the LLM does the open-ended work, the decision model handles the many small judgments around it.
Jev API training
3
How a call works
One request in, one answer per question out
state
The situation
A string: a ticket, a transcript, a tool result, a draft to check.
+
questions
What to decide
A map of named, typed questions, each carrying its own answer options.
answers
The decisions
Keyed by your question names, with probabilities. Your code branches.
Endpoint. TypeSafe’s native route is POST api.typesafe.ai/v1/systemone with a bearer key.
Budget. Up to 64,000 tokens per request; the state plus the longest single question must fit in 32,000. Only input tokens are billed.
Endpoint verified by live calls, Nov 2026; limits per docs.typesafe.ai
4
Question types
Three primitives cover most decisions
Noul
Yes or no
You give: instructions.
You get: one probability of “yes”.
“Does this message report an outage?”
Choice
Pick one label
You give: instructions and named options.
You get: the winner and a probability per option.
“Which team owns this ticket?”
Score
Rate on a scale
You give: instructions and ordered levels.
You get: a level and a probability per level.
“How frustrated is the customer?”
Jev API training
5
Making the call · Python
Send state and questions together
from typesafe_sdk import TypeSafeClient, Noul, Choice, Score
client = TypeSafeClient(model="jev-1.14.0")
r = client.system_one(
state=ticket_text,
questions={
"outage": Noul(instructions="Is an outage reported?"),
"topic": Choice(
instructions="Which team owns this ticket?",
criteria={"billing": None, "bug": None, "sales": None}),
"frustration": Score(
instructions="How frustrated is the customer?",
criteria=["calm", "annoyed", "angry"]),
})
Key stays out of code
The SDK reads TYPESAFE_API_KEY from the environment.
Pin the model
jev-latest moves; production pins a version after evaluation.
Name every question
Answers come back under the same keys.
Pattern per docs.typesafe.ai/sdk/python (typesafe-sdk, Python 3.10+); confirm names for your SDK version
6
Reading the result
Answers arrive keyed by question name
{
"model": "jev-1.14.0",
"answers": {
"outage": { "type": "noul", "noul": 0.91 },
"topic": { "type": "choice", "choice": "bug",
"confidence": 0.88,
"probabilities": { "bug": 0.88,
"billing": 0.09, "sales": 0.03 } },
"frustration": { "type": "score",
"score": 2, "confidence": 0.74,
"probabilities": {…}, "legend": {…} }
},
"usage": { "input_tokens": 420, "output_tokens": 52 }
}
In the Python SDK
r.nouls["outage"].noul
Probability of yes, 0 to 1
r.choices["topic"].choice
Winning label; probabilities sum to 1
r.scores["frustration"].score
Level on your ordered scale
Wire shape as returned by live jev-1.14.0 calls (Nov 2026); SDK accessor names vary by version
7
Using the probability
Route on confidence, not just on the answer
High confidence
Automate
Act on the answer with no further check. This should be the bulk of traffic.
Middle
Verify
Escalate to a second check, such as a larger LLM.
Low
Human review
Queue it for a person.
The thresholds are ours to set. Start with 0.9 for automate and 0.5 for human review (the vendor’s starting bands, and JevClient’s defaults), then tune them against labelled examples from the real workflow.
Jev API training
8
Time and money
Most AI calls in a workflow are small judgments. Pay small-judgment prices for them.
Is this urgent? Which queue? Did the agent cite a real source? Each one is a decision, not an essay.
Money
Reported cost per decision
$0.042
per million input tokens
List price. Output is currently free, so you pay for the state and questions only.
≈40×
cheaper on routing
Independent test, 1,000 eight-way routing decisions: $0.0151 on Jev, $0.6089 on GPT-5.6 Terra.
$0.0004
per case
TypeSafe’s internal evals, against $0.0304 and $0.0836 for two GPT-5.6 tiers. Vendor-reported.
Savings are task-dependent. Long option lists inflate input: one tester found routing cost $98 per million decisions on Jev against $77 on a cheap LLM.
Sources: vendor list price and third-party tests, Sept–Nov 2026. Our routing example: ≈445 input tokens per call, ≈$0.019 per 1,000 decisions
10
Time
Reported latency per call
Measurement
Latency
Who measured
End to end, claimed range
70–500 ms
TypeSafe
Server-side decision time
≈140 ms
Independent tester
End to end, including network
≈0.83 s
Same independent tester
Median decision
524 ms
Cloudflare comparison
Machine time. No generated text means no waiting on output tokens, and one call can answer several questions at once.
Engineering time. No output parser, no format-repair retries, no prompt tuning to coax valid JSON.
Sources: vendor claim and third-party tests, Sept–Nov 2026. Network distance dominates in practice
11
Where it fits
Repeated, bounded judgments
Routing and triage
Send each ticket, request or document to the right queue, tool or model.
Moderation and policy checks
Narrow yes/no questions against a written rule, at high volume.
Verifying agent output
Is this tool call valid? Does the source support this citation?
Judging in evaluations
Score model responses against a rubric in place of an LLM judge.
Not a fit: writing, summarising, multi-step reasoning, or any decision that must come with an explanation.
Jev API training
12
In practice · PowerShell
JevClient: build questions, make one call
Import-Module JevClient # key comes from Get-Secret jev
$r = Invoke-Jev -State $ticket -Questions ([ordered]@{
outage = New-JevNoul 'Is an outage reported?'
team = New-JevChoice 'Which team owns this ticket?' ([ordered]@{
billing = 'Charges, refunds, invoices'
technical = 'Errors, login problems, bugs'
other = 'Anything else' })
frustration = New-JevScore 'How frustrated is the customer?' @(
'Calm or neutral'
'Annoyed but polite'
'Angry or threatening to leave')
})
$r.answers.team.choice # technical
$r.answers.team.confidence # 0 to 1
$r.answers.outage.noul # probability of yes
Key from the vault
Get-Secret jev returns a SecureString that goes straight into the request header. The key never sits in a variable or in history.
Order is input
[ordered] maps keep option order fixed. Reordering options can change answers.
Errors handled for you
Rate limits and server errors retry with backoff. Bad requests and bad keys (400/422, 401/403) fail fast.
github.com/chrishuffman5/jev · JevClient 0.1.0 · PowerShell 7+
13
Example · Choice
Ticket routing: confidence decides who acts
Ticket
Team
Confidence
Action
Charged twice for order #4471; refund the duplicate
billing
1.00
Auto-assign
Tracking stuck on “label created” for nine days
shipping
1.00
Auto-assign
Can’t log in; session expires even after a reset
technical
1.00
Auto-assign
Cracked blender, plus a charge for slow express shipping
returns
0.83
Agent confirms
The split is the signal. The mixed ticket came back 86% returns, 9% shipping, 4% billing, so the script offers the top two and a person confirms.
Bands live in code. Above 0.9 act, 0.5 to 0.9 review, below 0.5 a person decides. Get-JevConfidenceBand applies them.
Source: examples/01-Choice-TicketRouting.ps1, captured run on jev-1.14.0
14
Example · Score
Bug severity: one rubric, ranked by score
The rubric, lowest first
0
Cosmetic only; nothing functional affected
1
Minor annoyance; nothing at risk
2
Broken, but a workaround exists
3
Core feature broken, no workaround
4
Outage, data loss, or wrong charges at scale
Bug
Score
Spread
Action
BUG-103
Double charges after deploy
4.00
100% level 4
Page on-call
BUG-104
Safari photo upload dead
2.90
90% level 3
10% level 2
High priority
BUG-102
CSV export fails; copy works
2.00
100% level 2
Backlog
BUG-101
Footer link wrong colour
0.00
100% level 0
Backlog
Source: examples/02-Score-BugSeverity.ps1 · scores rank and threshold; they don't measure
15
Example · Noul
Seven yes/no checks, one call, policy in code
One message, seven questions
“Third time I’m writing about these headphones… I want my money back… I’ll be talking to my lawyer. Can someone who actually works there call me?”
wants_refund
0.99
wants_human
0.98
threatens_legal
0.98
is_angry
0.96
repeat_contact
0.92
product_defect
0.99
asks_for_discount
0.02
Computed in code, sent as state
days_since_order = 41
within_return_window = false
under_warranty = true
Decided in code
→ Offer a warranty replacement or refund
→ Escalate: legal language present
→ Schedule a call-back from a person
→ Priority bump: angry repeat contact
Source: examples/03-Noul-YesNoChecks.ps1 · a Noul is P(yes); there is no separate confidence
16
Example · All three, structured criteria
Change triage: jev classifies, code routes
Change
Type (Choice)
Risk (Score)
Regulated data (Noul)
Approval route, from code
CHG-2041
Monthly CU on file servers
standard
1.00
0.34
low
0.22
Auto-approve
CHG-2042
Expired TLS cert on API gateway
emergency
1.00
1.67
high
0.34
Emergency CAB now, review after
CHG-2043
HR database to Azure SQL MI
normal
1.00
1.99
high
0.98
Weekly CAB + data-protection sign-off
Structured criteria. Each change type is { what, not_for, examples }; each risk level is { summary, signals }.
Policy stays in code. Auto-approve needs a standard change above 0.9 confidence and low risk. Regulated data at 0.7 or higher adds a sign-off.
Source: examples/05-Structured-ChangeRequest.ps1, captured run on jev-1.14.0
17
Example · Guarding agent actions
Jev is one layer of the gate, never the whole gate
Layer 1 · Code
Deny-list first
Format-Volume, .ssh paths and Invoke-Expression are blocked before jev is ever called.
3 of 7 blocked
Layer 2 · Jev
Goal vs. command
State holds only the user’s goal and the proposed command. Tool output stays out, so fetched text can’t approve itself.
1 denied · 3 to a person
Layer 3 · Person
Approves the rest
Anything destructive or unclear waits for a human. Nothing in this example runs on jev’s say-so.
0 auto-run
Jev reads literally. The -WhatIf dry run frees no space, so “serves the goal” came back 0.51 and the command went to a person, which is the safe outcome.
Source: examples/06-Gating-ShellCommands.ps1 · nothing is executed
18
Another decision model · Google
Gemini Decisions API: the same pattern, a larger batch
input
One shared input
Text or multimodal content, in a context reported at 262,144 tokens.
+
questions
Up to 1,000 questions
Yes/no, single choice (2 to 255 options) or rubric score.
scores
Probabilities, no text
Each question is scored against the input; nothing is decoded token by token.
Model. gemini-decision-1, launched 11 November 2026.
Access. Gemini Developer API (v1beta) and Google AI Studio. Vertex AI is listed as coming soon.
Price. $0.10 per million input tokens; output tokens are not billed.
From launch-week press coverage, Nov 2026; confirm against Google’s Gemini API docs
19
Gemini Decisions · the call
One request: model, input, questions
from google import genai
client = genai.Client(
http_options={"api_version": "v1beta"})
r = client.decisions.create(
model="gemini-decision-1",
input=[ticket_text],
questions={
"outage": {"type": "noul", ...},
"topic": {"type": "choice", ...},
"frustration": {"type": "score", ...},
})
Against Jev, as reported
Jev
Gemini
Questions per call
Not published
1,000
Context, tokens
64,000
262,144
Input, per 1M
$0.042
$0.10
Output
Free
Free
Input types
Text
Multimodal
Illustrative sketch from third-party guides; question fields and response schema unconfirmed
20
Know the limits
A valid answer is not always a right answer
Accuracy trails the largest LLMs
Vendor benchmark: Jev 67.8%, against 74.1% and 73.1% for the top generative models.
No reasoning is returned
You cannot ask why. Log state, questions and answers so decisions can be audited.
Schema-valid can still be wrong
The answer is always one of your options; it may be the wrong one.
Prompt injection still applies
Text inside the state can try to steer the decision. Typed output does not prevent that.
Benchmark is TypeSafe’s own four-workflow suite; calibration claims lack independent verification
21
In production
Six habits for using the Jev APIs
01
Pin the version
Use an explicit model version; re-evaluate before moving.
02
Ask narrow questions
One judgment per question; short, distinct options.
03
Batch per state
Put every question about one state in a single call.
04
Set thresholds from data
Tune automate and review cut-offs on labelled examples.
05
Handle errors by code
Treat 401/403, 422, 429 and 529 separately; a missing key returns 403. The SDK retries rate limits and server errors.
06
Log every decision
Keep state, questions, answers and probabilities for audit.
Missing key returns 403, not the documented 401 (typesafe-ai/skills#8); retries per docs.typesafe.ai
22
Hands-on · 30 minutes
Exercise: build a typed ticket router
1
Set up. Install typesafe-sdk and export your key as TYPESAFE_API_KEY, or use the JevClient PowerShell module.
2
Ask. For each sample ticket, send one call with a Noul (outage?), a Choice (team) and a Score (frustration).
3
Route. Branch on the answers; send low-confidence tickets to a review list.
4
Measure. Compare against the provided labels; record accuracy, tokens used and latency.
Discuss afterwards
Which tickets landed in review, and why?
What threshold would you ship?
What did 1,000 decisions cost?
PowerShell starter: github.com/chrishuffman5/jev · Sample tickets and labels: [location of exercise files]
23
Recap
State in, typed answers out, branch on confidence
Use it for
High-volume classify, score, route and verify steps.
Savings come from
No generated tokens, several answers per call, no parsing code.
Stay safe by
Measuring on our data and escalating what it is unsure about.
Next steps
Docs: docs.typesafe.ai
Questions: [internal channel]