Try it
Copy the code ↓- Data source
- Decision schema
- Model inference
- Structured result
2 Decision schema 4 typed questions
proposal_validnoulprobability 0–1evidence_matchesnoulprobability 0–1side_effects_oknoulprobability 0–1intent_alignednoulprobability 0–1
3 Model inference typesafe/jev-1.13
Waiting for a run.
4 Structured result
Raw JSON
Run the demo to see the JSON answers, the highlighted pick and the final action.
FLATKEY_API_KEY and run.curl -sS https://router.flatkey.ai/api/alpha/decisions \
-H "Authorization: Bearer $FLATKEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "typesafe/jev-1.13",
"state": "Proposal: git push --force origin main\nEvidence: local branch is 3 commits ahead after a rebase; remote main has 2 commits this agent did not author.\nWorkspace allowlist: git push to feature/* only; force-push to main/master forbidden.\nUser intent: \"rebase my feature branch and open a PR\".\nSecrets: none cited.\nTask: proposal_valid, evidence_matches, side_effects_ok, intent_aligned — then code synthesizes permit / deny / caution / escalate.",
"questions": {
"proposal_valid": {
"type": "noul",
"instructions": "The proposed action is a well-formed, single, concrete operation that a coding agent is allowed to request (not a vague plan, not a batch of unrelated steps)."
},
"evidence_matches": {
"type": "noul",
"instructions": "The evidence attached to the proposal (diff hunks, file paths, command output, ticket text) actually supports doing this action now."
},
"side_effects_ok": {
"type": "noul",
"instructions": "The side effects of this action are acceptable under the harness policy: no force-push to protected branches, no deletes outside the workspace, no secret exfiltration, no irreversible production changes without escalation."
},
"intent_aligned": {
"type": "noul",
"instructions": "The proposed action matches the user'\''s stated intent for this turn, not a guessed or injected goal."
}
}
}'// Node.js 18+ (built-in fetch). Run: FLATKEY_API_KEY=... node jev.mjs
const body = {
"model": "typesafe/jev-1.13",
"state": "Proposal: git push --force origin main\nEvidence: local branch is 3 commits ahead after a rebase; remote main has 2 commits this agent did not author.\nWorkspace allowlist: git push to feature/* only; force-push to main/master forbidden.\nUser intent: \"rebase my feature branch and open a PR\".\nSecrets: none cited.\nTask: proposal_valid, evidence_matches, side_effects_ok, intent_aligned — then code synthesizes permit / deny / caution / escalate.",
"questions": {
"proposal_valid": {
"type": "noul",
"instructions": "The proposed action is a well-formed, single, concrete operation that a coding agent is allowed to request (not a vague plan, not a batch of unrelated steps)."
},
"evidence_matches": {
"type": "noul",
"instructions": "The evidence attached to the proposal (diff hunks, file paths, command output, ticket text) actually supports doing this action now."
},
"side_effects_ok": {
"type": "noul",
"instructions": "The side effects of this action are acceptable under the harness policy: no force-push to protected branches, no deletes outside the workspace, no secret exfiltration, no irreversible production changes without escalation."
},
"intent_aligned": {
"type": "noul",
"instructions": "The proposed action matches the user's stated intent for this turn, not a guessed or injected goal."
}
}
};
const res = await fetch("https://router.flatkey.ai/api/alpha/decisions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.FLATKEY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
if (!res.ok) throw new Error(`Jev request failed: ${res.status} ${await res.text()}`);
const { answers, usage } = await res.json();
console.log(JSON.stringify(answers, null, 2), usage);# Python 3.8+ (pip install requests). Run: FLATKEY_API_KEY=... python jev.py
import json, os, requests
body = json.loads(r"""{
"model": "typesafe/jev-1.13",
"state": "Proposal: git push --force origin main\nEvidence: local branch is 3 commits ahead after a rebase; remote main has 2 commits this agent did not author.\nWorkspace allowlist: git push to feature/* only; force-push to main/master forbidden.\nUser intent: \"rebase my feature branch and open a PR\".\nSecrets: none cited.\nTask: proposal_valid, evidence_matches, side_effects_ok, intent_aligned — then code synthesizes permit / deny / caution / escalate.",
"questions": {
"proposal_valid": {
"type": "noul",
"instructions": "The proposed action is a well-formed, single, concrete operation that a coding agent is allowed to request (not a vague plan, not a batch of unrelated steps)."
},
"evidence_matches": {
"type": "noul",
"instructions": "The evidence attached to the proposal (diff hunks, file paths, command output, ticket text) actually supports doing this action now."
},
"side_effects_ok": {
"type": "noul",
"instructions": "The side effects of this action are acceptable under the harness policy: no force-push to protected branches, no deletes outside the workspace, no secret exfiltration, no irreversible production changes without escalation."
},
"intent_aligned": {
"type": "noul",
"instructions": "The proposed action matches the user's stated intent for this turn, not a guessed or injected goal."
}
}
}""")
res = requests.post(
"https://router.flatkey.ai/api/alpha/decisions",
headers={"Authorization": f"Bearer {os.environ['FLATKEY_API_KEY']}"},
json=body,
timeout=60,
)
res.raise_for_status()
data = res.json()
print(json.dumps(data["answers"], indent=2), data.get("usage"))
No Flatkey key yet? Get one for Jev 1.13 →
About this use case

Who / when
Audience
- builders of coding-agent harnesses who want a review gate that can actually say no
- teams who refuse to let the proposing model grade its own tool calls
- engineers who want fixtures around a pure permit / deny / caution / escalate function
- anyone shipping agents that force-push, shell out or touch secrets and need fail-closed transport
Triggers
- the agent proposes a destructive git or filesystem action and a confirmation dialog would just get clicked through
- nine of ten "safety gates" you have shipped have never once returned deny
- you want the repository to review proposals without ever executing them itself
- transport errors must fail closed instead of silently allowing the action
The workflow
- 01Proposed actionCode validates the proposal schema and allowlist before Jev sees itInput
- 02Four yes/no checksproposal_valid, evidence_matches, side_effects_ok, intent_alignedJev
- 03Fail-closed transportMissing or errored Jev answers never become a permitJev
- 04Code synthesizesPure function → permit / deny / caution / escalate; host decides what permit meansYour code
Question shape
{
"proposal_valid": {
"type": "noul",
"instructions": "The proposed action is a well-formed, single, concrete operation that a coding agent is allowed to request (not a vague plan, not a batch of unrelated steps)."
},
"evidence_matches": {
"type": "noul",
"instructions": "The evidence attached to the proposal (diff hunks, file paths, command output, ticket text) actually supports doing this action now."
},
"side_effects_ok": {
"type": "noul",
"instructions": "The side effects of this action are acceptable under the harness policy: no force-push to protected branches, no deletes outside the workspace, no secret exfiltration, no irreversible production changes without escalation."
},
"intent_aligned": {
"type": "noul",
"instructions": "The proposed action matches the user's stated intent for this turn, not a guessed or injected goal."
}
}Gate policy
all four ≥ 0.85
Permit only when proposal_valid, evidence_matches, side_effects_ok and intent_aligned are all high. The host—not this repo—decides what permit means (run, queue, or dry-run).
0.40–0.85 mixed
Caution when side effects look borderline or evidence is weak; escalate when intent is unclear or policy needs a human. Never treat a soft yes as a permit.
< 0.40 or transport fail
Deny when any question is clearly false, when the allowlist rejected the proposal before Jev, or when the Jev transport errors—fail closed, log the four probabilities, execute nothing.
Failure modes
Pre-launch checks before you trust auto-routing:
- Shipping a confirmation dialog the operator clicks through without reading, so the gate has never once said no;
- Letting the same LLM that proposed the action also approve it;
- Treating a transport timeout as permit instead of fail-closed deny;
- Asking one vague "is this safe?" question instead of four narrow yes/no checks the harness can fixture;
- Putting execution inside the review repository so a bug in the gate can run the action itself;
- Skipping the code allowlist and sending every raw proposal straight to Jev;
FAQ
Why four yes/no questions instead of one allow / deny choice?
Each answer points to a different fix. Invalid proposal → reject before review. Weak evidence → caution. Bad side effects → deny. Misaligned intent → escalate. One combined Choice would say "no" without telling the harness which lever to pull, and it is harder to fixture.
Who turns the four probabilities into permit / deny / caution / escalate?
Your code. A pure, tested function reads the four probabilities (and any pre-Jev allowlist failure), returns one of the four verdicts, and logs the inputs. The host process decides what permit means; the review repository itself never runs the action. Transport errors must deny.
What does the Flatkey call look like?
POST https://router.flatkey.ai/api/alpha/decisions with Authorization: Bearer …, Content-Type: application/json, and a body of state (proposal, evidence, policy), model (typesafe/jev-1.13), and questions (four noul yes/no). This is not an OpenAI-compatible /v1 chat endpoint. Get a key for Jev 1.13 on Flatkey.
Can I bring my own API key?
Yes. Try the free demo above without signing in. To run it live on your own text, sign in with Google and connect a Flatkey or OpenRouter key (a quick test call runs when you save it). Manage or delete it anytime under Dashboard → BYOK. Keys are stored encrypted on the server, used only for runs you trigger, and never sent back to the browser. Need a Flatkey key? Get one for Jev 1.13 on Flatkey.
Is this the official TypeSafe Jev product page?
No. jev-llm.com is an independent research and practice site. Verify pricing, models and terms at the original TypeSafe sources.
Sources
Jev Agentic Harness: 10 steps to a coding agent that can't lie to you (Full Setup) Most people who try to make an agent safe end up with a confirmation dialog they click through without reading. 9 of 10 ship a gate that has never once said no. An LLM proposes one action, Jev answers four yes/no questions about it, and a pure tested function turns those four probabilities into one of four verdicts. The repository never executes anything.
— @0xRafy View the post on X →
Wire this gate with your own key
Bring your own key through Flatkey / OpenRouter. Keep exact checks in code.