Agent

Jev inside your agent

Jev is not a chat model and cannot replace the LLM that runs your agent. It is the part you call at a decision point, when the agent's code needs a typed answer with a probability it can act on. The official docs say the same in Jev with coding agents.

Three decision points where Jev fits

  • Tool guard. Before a command with side effects runs, ask a Choice with allow, review, and block. Run on allow with high confidence, ask the user otherwise.
  • Routing. Pick the handler, model, or team for an incoming request with a Choice. Add an other option so odd inputs have somewhere to land.
  • Done check. After a step, ask a Noul such as "Does the last tool result satisfy the user's request?" and loop or stop on the probability.

Ask several questions about the same state in one request. Jev reads the state once and answers every question, which is cheaper and faster than one call per question.

One request, two questions (official systemone shape)
{
  "model": "jev-latest",
  "state": {
    "user_goal": "Fix the failing auth test",
    "proposed_tool_call": "bash: git push --force origin main"
  },
  "questions": {
    "gate": {
      "type": "choice",
      "instructions": "Should the agent run proposed_tool_call without asking the user?",
      "criteria": {
        "allow": "Read-only or local and easy to undo",
        "review": "Changes shared state; a human should confirm",
        "block": "Destroys work, history, or data"
      }
    },
    "on_task": {
      "type": "noul",
      "instructions": "Does proposed_tool_call serve user_goal?"
    }
  }
}

Paste it into the Jev Playground, add your key, and run it to see the real probabilities.

Three ways to wire it in

WayUse it whenStart here
MCP serverThe agent itself should decide when to ask Jev (Claude Code, Cursor, Codex)Jev MCP server
SDK in your codeYou own the agent loop and want a fixed gate at a known stepThe example below
SkillYour coding agent is writing the Jev integration for youJev skill for coding agents
A tool-call gate with the official TypeScript SDK
import { TypeSafeClient, choice, noul } from "@typesafe-ai/sdk";

const jev = new TypeSafeClient(); // TYPESAFE_API_KEY
const GATE_CONFIDENCE = 0.7; // tune on your own traces

export async function gateToolCall(goal: string, call: string) {
  const { answers } = await jev.systemOne({
    state: { user_goal: goal, proposed_tool_call: call },
    questions: {
      gate: choice("Should the agent run proposed_tool_call without asking?", {
        allow: "Read-only or local and easy to undo",
        review: "Changes shared state; a human should confirm",
        block: "Destroys work, history, or data",
      }),
      onTask: noul("Does proposed_tool_call serve user_goal?"),
    },
  });
  if (answers.gate.choice === "block") return "block";
  if (answers.gate.confidence < GATE_CONFIDENCE || answers.onTask.noul < 0.5) return "ask";
  return answers.gate.choice === "allow" ? "run" : "ask";
}

Read confidence, decide in code

Choice and Score answers carry confidence from 0 to 1. Treat it as a second axis: the answer tells you what, confidence tells you whether to act on it alone. Noul answers have no separate confidence; the probability itself is the signal.

  • Keep thresholds in one file so a human can review them next to the questions.
  • Tune thresholds on your own traces, not on a single demo.
  • Pin jev-1.13.0 once thresholds are tuned. jev-latest moves when TypeSafe ships a release.
  • English is Jev's strongest language. Test other languages on your own data before trusting a threshold.

What Jev will not do

  • Write text, code, or explanations. It returns typed answers only.
  • Call tools or take actions. Your code acts on its answer.
  • Replace the model behind Claude Code, Cursor, or Codex. There is no model: "jev-latest" switch for a coding agent.

More patterns: Choice, Score, and Noul, when not to use Jev, and the official patterns.