How to Use Jev with Coding Agents (Cursor, Claude Code)

Updated Applies to Jev 1.13

Coding agents are good at producing changes and mediocre at drawing hard lines about them — “is this acceptable?” is exactly the kind of question where a chat agent waffles. Since Jev’s three primitives return structured, confidence-scored answers, they slot neatly into agent workflows as an external referee: the agent writes the code, Jev makes the bounded calls. This guide shows how to wire the Jev model into Cursor and Claude Code, with integration patterns you can adapt in minutes.

TL;DR: Wrap a Jev call (via OpenRouter’s OpenAI-compatible endpoint) in a small script, expose that script to your coding agent as a runnable command or tool, and let the agent use it whenever a bounded judgment is needed — policy checks, triage, severity scoring. Keep generation with the agent; keep decisions with Jev. Confirm the exact model slug on the OpenRouter model page before shipping.

Why give an agent a judgment model

An agent asked “does this change violate our logging policy?” will answer in confident prose that may or may not be right. Two problems follow: the answer is not machine-checkable, and there is no confidence signal to escalate on. A Jev call fixes both — the answer comes back as structured JSON with a confidence score, so the agent’s workflow can branch deterministically. That is the core idea: the agent generates, Jev judges.

Integration pattern: one script, one tool

The lowest-friction integration is a script on disk that the agent can run. Here is a self-contained Python helper:

# jev_judge.py — confirm the exact model slug on the OpenRouter model page
import json, os, sys, requests

question = sys.argv[1]

resp = requests.post(
    "https://openrouter.ai/api/v1/chat/completions",
    headers={
        "Authorization": f"Bearer {os.environ['OPENROUTER_API_KEY']}",
        "Content-Type": "application/json",
    },
    json={
        "model": "typesafe/jev-1.13",
        "messages": [{"role": "user", "content": question}],
    },
    timeout=30,
)
resp.raise_for_status()
result = json.loads(resp.json()["choices"][0]["message"]["content"])
print(json.dumps(result, indent=2))

The script takes the question as an argument, calls the OpenAI-compatible endpoint, and prints the parsed answer. The parsed result is an example fixture — the response shape shown is illustrative and official field names should be confirmed in the official documentation at typesafe.ai.

Then tell the agent it exists. In Cursor, add a rule describing the script and when to run it (for example: “before flagging a diff as done, run python jev_judge.py 'Judgment question: ...' and treat confidence < 0.8 as needs-review”). In Claude Code, the same script can be exposed as a custom command or referenced in project instructions, so the agent invokes it as part of its review loop. The exact mechanism differs by tool; the pattern — script + instruction + confidence rule — is identical.

What agents should delegate to Jev

Agent taskPrimitiveExample question
Policy check before finishingJudgment“Judgment question: does this diff add logging of user PII? Diff: ”…""
Triage an incoming issueChoice“Choice question: does this issue match template bug, feature or question? Issue: ”…""
Severity estimationScoring“Scoring question (1-10): how severe is this regression for users? Description: ”…""
Commit message sanity gateJudgment“Judgment question: does this commit message describe the change accurately?”

Each row returns — example fixture — a structured answer such as {"answer":"no","confidence":0.91,"rationale":"..."}; confirm exact field names in the official documentation.

A sample call from the command line:

# Confirm the exact model slug on the OpenRouter model page
python jev_judge.py "Judgment question: does this commit message accurately describe a change that adds a retry with backoff to the payment client? Message: \"fix stuff\""

The script prints the structured judgment, and the agent reads answer and confidence from it — the printed JSON is an example fixture and official field names should be confirmed in the official documentation.

Where this does not help

Keep each agent question to a single primitive with the diff or issue embedded, and keep the confidence rule explicit in the agent’s instructions — the state-and-questions guide covers how to phrase these prompts for stability.

This guide applies to Jev 1.13.

Frequently asked questions

Can coding agents like Cursor or Claude Code call Jev?

Yes, through the OpenRouter OpenAI-compatible endpoint. Give the agent a small script or command that wraps the call, and it can use Jev for bounded judgments during a task.

What should a coding agent use Jev for?

Bounded review decisions: does this diff break the policy, which bug report template fits, how severe is this issue on a 1-10 scale. Not for writing the code itself.

Do I need special Jev tooling for agents?

No. A plain HTTP call in a script is enough — the agent runs the script and reads the structured JSON answer with its confidence score.

Keep reading