Building a Harness with Jev: Fast, Structured Decisions for Your Agents
Jev is TypeSafe AI's new System One model: a frontier-intelligence function call that turns unstructured state into typed probabilistic decisions in milliseconds — without hallucinating. Learn how it works and how to wire it into a LangChain harness for model routing and tool risk gating.
Published on • September 20, 2026
AI Assistant

Agents run in a loop: an LLM decides what to do, a tool executes, a model evaluates the results, and the cycle repeats until the task is complete. Two primitives made it possible to integrate agents with software in the first place — tool calling and structured outputs — but the loop still suffers from two fundamental problems: it is slow and costly, because every single decision requires another full model call.
Enter Jev, a new model from TypeSafe AI designed to attack exactly that bottleneck. The company reports up to 200x faster inference and 400x lower cost than comparable LLMs on classification tasks.
In this post, we’ll look at what makes Jev different, how it fits into the agent loop, and how to use it with LangChain to build a smarter harness.
What is Jev?
Jev is not a traditional LLM. It doesn’t generate text at all. TypeSafe AI calls it a System One model — a new class of AI model built to make fast, structured decisions that software can use directly.
A System One model evaluates a state and returns typed answers and probabilities. Instead of generating tokens autoregressively, it outputs all answers in parallel in a single query.
The name is a nod to Daniel Kahneman’s Thinking, Fast and Slow: System 1 thinking is fast, intuitive, and automatic, while System 2 is slow and deliberate. Jev is named after William Stanley Jevons, the economist — TypeSafe’s bet is that every order-of-magnitude drop in the cost of intelligence unlocks order-of-magnitude more use cases, just like the drop in the cost of coal did for the steam engine.
Jev is trained using a novel method called Reinforcement Learning for Calibrated Decisions (RLCD), optimized not for human-preferred prose but for calibrated decisions with epistemically honest probabilities. The result is a model that:
- Never makes type errors — outputs are guaranteed to match a schema defined in advance.
- Cannot hallucinate — it gave up string generation entirely.
- Always communicates confidence, with calibrated probabilities where higher confidence means higher accuracy.
Think of Jev as a frontier-intelligence function call: unstructured state in, typed probabilistic decisions out.
How does Jev work?
To invoke Jev, you send it a state (your context) plus one or more questions about that state. Here is a single-question example from the TypeSafe quickstart, checking whether a support message is urgent:
{
"model": "jev-latest",
"state": "Hi, I've been trying to connect my Stripe account for 3 days and it keeps failing. I'm losing sales. Please help ASAP.",
"questions": {
"is_urgent": {
"type": "noul",
"instructions": "The message conveys urgency or time-sensitivity"
}
}
}
The response includes a probability that the statement is true:
{
"is_urgent": {
"type": "noul",
"noul": 0.999
}
}
That 99.9% probability is something your application can act on directly to prioritize the ticket.
Three types of questions
Jev supports three kinds of questions, and you can mix them in a single request:
- Choice — Pick from a set of options. Returns a probability for each option plus an overall confidence score.
- Score — Rate an input against ordered levels (e.g., low, medium, high). Returns a continuous score, the underlying distribution, and a confidence value.
- Noul — Answer a yes/no question. Returns the probability that the statement is true.
A key feature: because System One models evaluate every question in a request in parallel, adding questions barely changes response time — it only costs the tokens for the extra questions, which are cheap.
A more complete example, asking three questions about the same ticket at once:
{
"state": "Hi, I've been trying to connect my Stripe account for 3 days and it keeps failing. I'm losing sales. Please help ASAP.",
"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"
}
},
"frustration": {
"type": "score",
"instructions": "How frustrated the customer appears",
"criteria": [
"Calm, just stating facts",
"Frustrated but civil",
"Very angry, strong language"
]
},
"is_urgent": {
"type": "noul",
"instructions": "The message conveys urgency or time-sensitivity"
}
}
}
In sum, unlike traditional LLMs, Jev is neither constrained by text generation nor by sequential, token-by-token decision making.
Why this matters: speed, cost, and reliability
Traditional LLMs are optimized for chat — generating strings that humans like. When you embed them in code, that flexibility costs you:
| Traditional LLMs | Jev (System One) | |
|---|---|---|
| Outputs | Strings (chat, code, hallucinations, refusals…) | Type-safe structured values, always schema-valid |
| Sampling | Sequential, one token at a time | Parallel, everything in one query |
| Speed | 3–329 seconds end-to-end | 70–500ms end-to-end (up to ~200x faster) |
| Cost | Output tokens are ~5x input tokens | Output tokens free, ~$0.042/MTok input |
| Confidence | Often overconfident and inconsistent | Calibrated on every output |
Because Jev’s outputs are typed and verified, they slot directly into ordinary software as smart if-statements — classify, route, score, or branch where hand-written logic would be too brittle. And with 100ms-level latency, you can use AI in real-time applications where UX is critical, verify LLM outputs, guardrail prompts, and even detect jailbreaks.
Using Jev with LangChain
LangChain’s provider-agnostic model interface is a natural fit for supporting Jev alongside thousands of other integrations. The LangChain integration exposes Jev through TypeSafeClassifier: you pass your state and questions to .invoke() and get classification results back instead of a chat response.
Install the package and set your API key:
pip install langchain-typesafe
export TYPESAFE_API_KEY="your-api-key-here"
Then make your first classification call:
from langchain_typesafe import Noul, TypeSafeClassifier
classifier = TypeSafeClassifier()
response = classifier.invoke(
state=(
"The deploy failed twice and customers are seeing 500s. "
"Can someone look now?"
),
questions={
"urgent": Noul(
instructions="Does this need attention right now?"
),
},
)
urgency = response.nouls["urgent"].noul
The state can be text, structured data, or LangChain messages. That makes it straightforward to call Jev from a node or middleware hook using the context your agent already has.
Use cases inside a harness
Jev isn’t a drop-in replacement for an LLM — it doesn’t generate text. But it can handle many of the classification tasks we currently use LLMs for, without the same latency and cost. The sweet spot: use an LLM for open-ended reasoning and generation, and Jev for fast, structured decisions along the way.
Model routing
A simple lookup doesn’t need the same model as a difficult debugging task. With a model-routing middleware, Jev assesses the request and picks a model based on criteria you define — fast and cheap for straightforward tasks, more capable for complex ones:
from langchain.agents import create_agent
from langchain_typesafe.experimental.middleware import (
ModelChoice,
ModelRouterMiddleware,
)
router = ModelRouterMiddleware(
choices={
"fast": ModelChoice(
model="openai:luna",
criteria="Direct lookups, extraction, and localized changes.",
),
"powerful": ModelChoice(
model="openai:sol",
criteria="Architecture and high-stakes decisions.",
),
},
instructions="Choose the least costly model that can complete the task.",
)
agent = create_agent("openai:gpt-5.6-luna", middleware=[router])
The router selects a model based on the latest user message and uses it for the rest of the run, with the probabilities and confidence remaining available in agent state.
Auto mode: gating risky tool calls
Agents are still inherently untrustworthy. A bad instruction — natural or adversarial — can persuade an agent into taking actions you never wanted. Coding harnesses like Claude, Codex, and Cursor have shipped ways to classify dangerous actions before they’re taken, but until now that classifier step was locked away in closed-source harnesses.
Now that a cheap and performant classifier model exists, the same pattern can be applied to all agents. AutoModeMiddleware uses Jev to check tool calls for risky outcomes and blocks them before the tool executes:
from langchain.agents import create_agent
from langchain_typesafe.experimental.middleware import (
AutoModeMiddleware,
)
guardrail = AutoModeMiddleware(tools=["bash"])
agent = create_agent("openai:gpt-5.6-luna", middleware=[guardrail])
This is where Jev shines in a harness: it turns an expensive, unreliable judgement call into a cheap, calibrated, typed decision that runs inside the existing agent loop.
Get started!
Jev’s capabilities are already powering some impressive projects: browser-use agents for fractions of a cent, live trading agents, and email triage at scale. TypeSafe AI’s founding belief is that AI needs an interface software can depend on — and System One models are that interface.
Want to try it?
- Get early access at the TypeSafe console
- Read the docs at docs.typesafe.ai
- Explore the LangChain integration in the LangChain docs
New models drop every week, but this one had an outsized response — and for good reason. When decision-making gets 200x faster and 400x cheaper, whole new classes of applications become possible. We’re excited to see what you build.