Jev is a structured decision model for bounded steps inside an AI agent loop. It does not write a plan, a message, or code. It evaluates a supplied state against questions whose answer shapes are fixed in advance, then returns probabilities, choices, or scores. Use Jev where the menu of valid answers is known. Keep a large language model (LLM) for open-ended reasoning and generation. Use deterministic code when the rule is already known.
That division matters more than the launch numbers. A cheap decision call can still make the full workflow more expensive. A valid output can still be wrong.
What is Jev?
Jev is TypeSafe AI’s first “System One” model: a model built to make structured decisions for software instead of generating text token by token. The API receives a state, which can be text or structured data, and typed questions about that state.
The current interfaces expose three useful answer shapes:
| Question type | What it returns | Agent-loop example |
|---|---|---|
| Boolean probability | Probability that a statement is true | Did the tool result prove that the task succeeded? |
| Choice | One option from a list, plus probabilities | Which specialist or tool should handle this request? |
| Score | A position on an ordered rubric | How risky is this proposed action? |
Cloudflare’s model documentation lists a 32,000-token context window for typesafe/jev. OpenRouter lists typesafe/jev-1.13 at $0.042 per million input tokens and $0 for output tokens as of September 18, 2026. Vercel AI Gateway exposes the model as typesafe-ai/jev with the same listed input price. These identifiers are provider-specific, so pin the version you test rather than assuming every latest alias behaves the same.
TypeSafe reports 70-500 ms and large gains on its own workflow-shaped evaluations. Treat those as vendor results: the evaluation compares Jev with reference probabilities from larger models, not universal ground truth. Test it against your current baseline.
Where does Jev fit in an AI agent loop?
Jev fits between state collection and action. The agent or application gathers the current state. Jev evaluates a bounded question. Code validates the returned shape and applies an acceptance policy. A tool, LLM, or person handles the next step.
Five decision points are especially plausible.
| Decision point | Jev’s job | What must stay outside Jev |
|---|---|---|
| Model routing | Choose a small, large, or specialist model | The selected model performs the open-ended work |
| Tool-risk gate | Score or classify a proposed action before execution | Deterministic permission rules remain hard gates |
| Workflow branch | Pick the next valid stage from a defined state machine | Code owns allowed transitions and side effects |
| Outcome verification | Compare tool evidence with the agent’s success claim | The source system proves the final state |
| Human escalation | Route low-confidence or high-risk cases to review | Your policy defines thresholds and reviewers |
LangChain’s Jev integration uses TypeSafeClassifier and shows both model-routing and pre-tool guardrail patterns. The important word is classifier. Jev complements the model that drives the agent; it does not replace it.
What business benefits can Jev deliver?
The business benefits come from changing the shape of the workflow, not from adding another model call everywhere.
| Benefit | Mechanism | Metric that proves it | Main failure mode |
|---|---|---|---|
| Lower cost per verified outcome | Replace repeated generation calls and output retries with short decision calls | Total workflow cost / verified successful outcomes | State preparation or extra scoring costs more than the call it replaces |
| Faster user experience | Remove token-by-token generation from routing and gating steps | End-to-end p50 and p95 time to completed outcome | Tool and network time dominate, so model speed is invisible |
| Fewer malformed outputs | Possible values and structures are fixed before inference | Parse failures, schema retries, invalid tool arguments | The model returns a valid but wrong choice |
| Safer automation | Route uncertainty and risky actions to review | High-risk false-negative rate and unauthorized-action rate | A weak schema omits unknown or the escalation policy trusts confidence blindly |
| Easier operational audit | Log typed decisions, probabilities, versions, and policy thresholds | Time to reconstruct a decision and percentage of runs with complete evidence | Probability shows confidence, not a human-readable reason |
| Better capacity planning | Bound output shape and cost for high-volume classification | Cost and latency per decision at production volume | Provider limits, preprocessing, and exception handling are left out of the estimate |
Lower cost per verified outcome
The listed input price is low, but price per token is not the business metric. Measure the full cost of state preparation, Jev calls, fallback LLM calls, retries, tools, and human review. Divide that by outcomes that passed their state checks.
A September 16, 2026 Retriever AI browser-agent experiment shows why. Two Jev-assisted runs finished 31% and 43% sooner than their baselines, but total estimated inference cost rose 38% and 51%. Repeated scoring of large page states dominated Jev’s cost. It was one run per configuration with changing page state, so it is not a general benchmark. It is still a useful warning: a cheap model can create an expensive architecture.
Risk reduction without pretending the model is always right
A fixed output schema removes a real failure class: invented categories, malformed JSON, and prose where code expects a value. This can cut parser exceptions, schema retries, and invalid tool arguments.
TypeSafe says Jev “can’t hallucinate.” The operationally useful claim is narrower: it cannot emit an out-of-schema value. It can choose the wrong in-schema value. Your risk reduction comes from combining schema guarantees with complete options, deterministic permission gates, tested thresholds, and final-state verification.
When should you use Jev, an LLM, or deterministic code?
| Use | When it fits | Example |
|---|---|---|
| Deterministic code | The rule and required data are known | Block a payment above an approved limit |
| Jev | The valid answers are known, but messy state makes the choice fuzzy | Route a ticket among declared teams |
| LLM | The output or reasoning path is open-ended | Diagnose an unfamiliar failure and propose a repair |
| Human review | The action is high-impact, ambiguous, or needs accountable judgment | Approve an exception to a regulated policy |
Start with code. Use Jev when classification is the hard part. Use an LLM when the system must generate or reason beyond a fixed menu. Escalate when the cost of a wrong answer is higher than the value of automation.
A working decision gate for Jev evaluations
Before connecting Jev, make the acceptance policy executable. The complete jev-routing-gate.mjs file is stored beside this article. The full source is also reproduced below. Run it from the repository root with node src/content/blog/jev-routing-gate.mjs. It includes the exact eight-case fixture, calculates the reported metrics, and exits non-zero when any high-risk case is misrouted.
const cases = [
{ id: 'b1', expected: 'billing', highRisk: false, predicted: 'billing', ms: 118, cost: 0.00001 },
{ id: 'b2', expected: 'billing', highRisk: true, predicted: 'billing', ms: 126, cost: 0.00001 },
{ id: 't1', expected: 'technical', highRisk: false, predicted: 'technical', ms: 109, cost: 0.00001 },
{ id: 't2', expected: 'technical', highRisk: true, predicted: 'other', ms: 131, cost: 0.00001 },
{ id: 's1', expected: 'sales', highRisk: false, predicted: 'sales', ms: 114, cost: 0.00001 },
{ id: 's2', expected: 'sales', highRisk: false, predicted: 'billing', ms: 122, cost: 0.00001 },
{ id: 'o1', expected: 'other', highRisk: false, predicted: 'other', ms: 103, cost: 0.00001 },
{ id: 'o2', expected: 'other', highRisk: true, predicted: 'other', ms: 137, cost: 0.00001 },
];
const correct = cases.filter(x => x.predicted === x.expected);
const risky = cases.filter(x => x.highRisk);
const misses = risky.filter(x => x.predicted !== x.expected);
const times = cases.map(x => x.ms).sort((a, b) => a - b);
const p95 = times[Math.ceil(times.length * 0.95) - 1];
const cost = cases.reduce((sum, x) => sum + x.cost, 0);
console.log({
cases: cases.length,
correct: correct.length,
highRiskMisses: misses.length,
highRiskCases: risky.length,
p95Ms: p95,
totalCostUsd: cost,
costPerVerifiedOutcomeUsd: cost / correct.length,
});
if (misses.length) process.exitCode = 1;The published artifact returns eight cases, six correct, one high-risk miss among three high-risk cases, p95 of 137 ms, and total fixture cost of $0.00008. It exits 1. These are synthetic fixture results, not Jev results. Replace each row with a recorded response from typesafe/jev-1.13 and a verified downstream outcome. The gate proves a useful property before any API spend: a high-risk miss cannot hide inside a good aggregate.
For a real trial, use 100-500 redacted cases, include unknown or delegate, compare current code, the current LLM, and Jev, then shadow decisions before they change production state. Pin the provider and model ID. Re-run after any model, schema, threshold, or data-distribution change.
The site’s agent evaluation framework separates gates, state checks, transcripts, and latency. Its cost-per-outcome method applies the same rule to the full workflow rather than one model invoice.
What are Jev’s current limits?
As of September 18, 2026, the public evidence is early.
- Schema conformance is not correctness. A wrong choice can be perfectly typed.
- Vendor benchmarks use vendor-defined tasks. TypeSafe’s evaluation measures agreement with larger reference models on workflow-shaped decisions; that is not universal ground truth.
- Provider and vendor risk remains. Re-check prices, IDs, security, data location, service levels, and exit plans before procurement.
Further reading
- When to Use Multi-Agent Orchestration: choose a router or simpler pattern before adding coordination overhead.
- What Is an Agent Evaluation Framework?: separate outcome, state, security, transcript, and latency failures.
- How to Measure Cost Per Agent Outcome: compare complete workflows using verified outcomes instead of token prices.
