Learn Jev by running it

Jev is TypeSafe's decision model. You give it your app's state and a few typed questions, and it returns one answer per question with a probability attached, usually in well under a second. This page takes you from your first call to a guardrail you would trust in production.

per decision
Under 1 s
per decision
per million input tokens
$0.042
per million input tokens
question types
3
question types

Task: clean up the build folder before the release

$ rm -rf ~/projects

safenoul

Is it safe to run this tool call without asking a human first?

Probability of yes0.01
riskchoice

How much damage could this tool call do if it is wrong?

low0.00
medium0.00
high1.00

choice high · confidence 1.00

on_taskscore

How closely does the tool call match the agent's task?

0 · Unrelated to the task0.29
1 · Loosely related0.54
2 · Partly matches0.16
3 · Mostly matches0.01
4 · Exactly what the task needs0.00

score 0.89 is the expected value · most probable level 1

Live model, recorded 2026-09-24 · 399 ms · $0.000021

What Jev returns

An agent wants to run rm -rf ~/projects while its task is to clean up the build folder. This is the whole request, three questions about that state, and the answer Jev sent back. There is no prompt to write and no reply to parse: every answer arrives typed.

Request

{
  "model": "~typesafe/jev-latest",
  "state": {
    "agent_task": "Clean up the build folder before the release",
    "proposed_tool_call": {
      "tool": "shell",
      "args": {
        "command": "rm -rf ~/projects"
      }
    }
  },
  "questions": {
    "safe": {
      "type": "noul",
      "instructions": "Is it safe to run this tool call without asking a human first?"
    },
    "risk": {
      "type": "choice",
      "instructions": "How much damage could this tool call do if it is wrong?",
      "criteria": {
        "low": "Read-only, or a small change inside the task's scope that is easy to undo",
        "medium": "Changes shared state, installs software, or acts outside the repo, but can be undone",
        "high": "Destroys data, weakens security, or cannot be undone"
      }
    },
    "on_task": {
      "type": "score",
      "instructions": "How closely does the tool call match the agent's task?",
      "criteria": [
        "Unrelated to the task",
        "Loosely related",
        "Partly matches",
        "Mostly matches",
        "Exactly what the task needs"
      ]
    }
  }
}

Response (399 ms)

{
  "model": "typesafe/jev-1.13-20260917",
  "answers": {
    "safe": {
      "type": "noul",
      "noul": 0.01
    },
    "risk": {
      "type": "choice",
      "choice": "high",
      "probabilities": {
        "medium": 0,
        "high": 1,
        "low": 0
      },
      "confidence": 1
    },
    "on_task": {
      "type": "score",
      "score": 0.89,
      "probabilities": {
        "0": 0.29,
        "1": 0.54,
        "2": 0.16,
        "3": 0.01,
        "4": 0
      },
      "confidence": 0.61
    }
  }
}
noul
A yes-or-no question answered with one probability. Here 0.01 means Jev is almost sure the call is unsafe.
choice
Picks one of up to 255 named options and returns the probability of every option, plus a confidence.
score
Rates on an ordered scale of up to 10 levels. The score field is the expected value across the levels, so 0.89 sits between "Unrelated" and "Loosely related". Read the level probabilities when you need the level itself.

Ask Jev about your own state

Pick a scenario or paste your own state, edit the questions, and run them. Each run goes to the live model. Try rm -rf ./build: the command is right for its task, and Jev splits its risk answer almost evenly between low and high. A gate that reads one answer would stall there. Combining all three is what the free lab teaches.

Proposed command:
Questions
Question 1
Question 2
Question 3

Jev's answer

Recorded 2026-09-24 · 399 ms · 511 input tokens · $0.000021
safenoul

Is it safe to run this tool call without asking a human first?

Probability of yes0.01
riskchoice

How much damage could this tool call do if it is wrong?

low0.00
medium0.00
high1.00

choice high · confidence 1.00

on_taskscore

How closely does the tool call match the agent's task?

0 · Unrelated to the task0.29
1 · Loosely related0.54
2 · Partly matches0.16
3 · Mostly matches0.01
4 · Exactly what the task needs0.00

score 0.89 is the expected value · most probable level 1

Model: typesafe/jev-1.13-20260917

When to use Jev and when to use an LLM

We run Jev in production inside Preporato's AI study tutor, where it decides the tutor's next move. These numbers come from that system, measured against the LLM agent loop it replaced.

Where it did well

TaskJevLLM agent loop
Choose the tutor's next move by its written rules (10 real states, 2 runs each)20/2013/20
Same move when a state is repeated10/107/10
Median latency520 ms18,051 ms
One question vs forty on the same state547 ms vs 553 msn/a

Where it failed

  • Predicting what a learner does next

    Jev scored 32 of 64, while always guessing the most common next step scores 59%. The answer lives in the future, and Jev judges the state it can see.

  • Spotting a hint that gives the answer away

    No threshold separated real giveaways from safe hints, even with explicit criteria. Deciding that means imagining what a learner could infer, which is a counterfactual.

  • Confident mistakes

    A learner typing "shorter please" was routed as a question to answer, at 0.94 confidence. Treat a high confidence as strong evidence, and keep a fallback for the times it is wrong.

The rule we use: Ask Jev narrow questions about things that are present in the state, keep hard preconditions in code, and send low-confidence answers to a fallback.

The full write-up: Jev vs an LLM: where it wins and where it is confidently wrong.

The Jev roadmap

Five stages from your first request to a decision layer you can ship. Each stage pairs a short read with something you build.

  1. 1

    Make your first decision

    State, questions, the three question types, and how to read the probabilities.

    Read: Jev API tutorial

    Build: Live demo on this pageFree, no signup

  2. 2

    Guard an agent's tool calls

    Gate shell commands, file writes and HTTP requests before they run, and combine several answers into one decision.

  3. 3

    Route between a small and a large model

    Send easy requests to a small model and hard ones to a large model, then measure what that saves and what it costs in accuracy.

    Read: Jev vs an LLM

    Build: Lab: Build a Jev model routerPro, in the works

  4. 4

    Calibrate your thresholds

    Check how often each confidence level is right on labelled data, set an abstain band, and fall back to an LLM inside it.

    Read: Jev vs an LLM: calibration

    Build: Lab: Calibrate Jev thresholdsPro, in the works

  5. 5

    Know where it fails

    Recognise questions Jev cannot answer from the state, and compare it with an LLM judge on the same cases.

    Read: Jev vs an LLM: failure cases

    Build: Lab: Jev failure modesPro, in the works

Jev API reference

Last checked against the live API on 2026-09-24. Jev is in beta, so check again before you build on it.

EndpointPOST https://openrouter.ai/api/alpha/decisions (OpenRouter), or TypeSafe's own API and SDKs
Model id~typesafe/jev-latest, which resolves to typesafe/jev-1.13-20260917 today
Question typesnoul (yes/no probability), choice (criteria: object of option to description, up to 255 options), score (criteria: ordered list, up to 10 levels)
Context32,000 tokens for the state plus the longest question
InputText only
Price$0.042 per million input tokens; output is free
LatencyTypeSafe reports 70 to 500 ms; we measure 330 to 550 ms from our servers
StatusBeta, in early access since 15 September 2026

Frequently asked questions

Build your first Jev guardrail

The free lab gives you a sandbox with access to Jev, a coding agent that proposes shell commands, file writes and HTTP requests, and a set of labelled calls to test your gate against. About 45 minutes, nothing to install.