AIAgentsJevTypeSafe AILangGraphClassification

Jev by TypeSafe AI: a model that makes decisions instead of writing text

Jev does not chat. You give it evidence and a few typed questions, and it returns choices, scores, and yes/no probabilities in under half a second. What it is, how it is used, and where it fits in an agent.

By Reactify Solutions6 min read
Jev by TypeSafe AI: a model that makes decisions instead of writing text

Look at the LLM calls in a typical agent and count how many of them actually write something for a person to read. Usually it is one or two. The rest are small decisions: which tool, which team, is this urgent, is this safe, are we done. Each one waits seconds for a chat model to produce text that code then has to parse. Jev, from TypeSafe AI, is built for exactly those calls.

What Jev is

Jev is a decision model. TypeSafe calls it a “System One” model, after Daniel Kahneman's name for fast, intuitive thinking. It does not generate prose. You send it two things:

  • State: the evidence. A message, a JSON object, a chat history.
  • Questions: what you want decided, each with a type and a fixed set of possible answers.

It sends back typed answers with probabilities attached. The answer is always one of the options you defined, so there is nothing to parse and no made-up label to handle. A call takes 70 to 500 ms, and output tokens are free.

Three question types

  • Choice: pick one option, up to 255 of them. “Which team owns this ticket?”
  • Score: place it on an ordered scale of 2 to 10 levels. “How severe is this?”
  • Noul: a yes/no probability from 0 to 1. “Is the customer asking for a refund?”

You can mix them in one request. They are answered in parallel, so ten questions take about as long as one. Choice and Score also return a confidence value, which is the part that makes Jev useful in production. More on that below.

What a call looks like

triage.py
from typesafe_sdk import Choice, Noul, TypeSafeClient

client = TypeSafeClient()  # reads TYPESAFE_API_KEY

result = client.system_one(
    "Stripe sync has failed for 3 days and I am losing sales. Help!",
    {
        "team": Choice(
            instructions="Which team should handle this?",
            criteria={
                "billing": "Charges, invoices, and refunds",
                "technical": "Bugs, outages, and integration failures",
            },
        ),
        "urgent": Noul(instructions="Does this need attention right now?"),
    },
)

team = result.choices["team"]
print(team.choice, team.confidence)   # technical 0.92
print(result.nouls["urgent"].noul)    # 0.99

The TypeScript SDK (@typesafe-ai/sdk) works the same way and infers the answer types for you. On the Vercel AI SDK, the same request goes through experimental_evaluate with the model id typesafe-ai/jev.

How it is used: confidence decides who acts

A chat model gives you an answer but not a reliable sense of when it is guessing. Jev is trained to give calibrated probabilities, so a confidence of 0.9 should be right about nine times in ten. That turns into a very simple policy in code:

route.py
if team.confidence > 0.9:
    assign(team.choice)                      # automatic
elif team.confidence > 0.5:
    assign(team.choice, needs_review=True)   # act, but flag it
else:
    send_to_human()                          # too close to call

The clear cases get handled on their own. The unclear ones go to a person. And the rule lives in code you can read and test, not in a prompt. Before you trust the thresholds, run Jev on a few hundred past cases where you already know the answer, and set the lines from what you see.

Where it fits in an agent

Jev is not a replacement for your LLM. It takes over the small decisions around it:

  • Routing: which agent, queue, or model gets this request.
  • Guardrails: is this tool call safe to run, does this reply contain personal data.
  • Loop control: is the task done, or should the agent keep going.
  • Filtering: which retrieved passages are relevant enough to pass to the LLM.

In LangGraph, this maps neatly onto a router node. Jev answers the question, a plain Python function turns the answer into a conditional edge, and the LLM only runs in the node that has to write the reply. The langchain-typesafe package wraps Jev as a normal Runnable, and adds experimental middleware for picking a model and checking tool calls in create_agent.

When not to use it

  • Anything that has to write text: replies, summaries, code.
  • Math, counting, and comparing dates. Do those in code.
  • Images or audio. Jev reads text only.
  • Big “judge everything” questions. Split them into small ones and combine the answers in code.

Also keep in mind that typed does not mean correct. Jev always returns a valid option, but it can still pick the wrong one. The confidence number is how you catch that.

The full details

This post is the short version. We wrote a full handbook with every detail, runnable code, and diagrams:

Sources

ready when you are

Want to build something amazing? Let's bring it to life.

At Reactify Solutions, we turn your ideas into exceptional applications. From concept to deployment, we are here to make your vision a reality.