Try it
Copy the code ↓- Data source
- Decision schema
- Model inference
- Structured result
2 Decision schema 4 typed questions
cascadechoicecontinuehandoff_opusstopdifficultyscoretrivial_yes_noroutine_tool_pickmulti_factorfrontier_onlyis_spam_or_noisenoulprobability 0–1options_closednoulprobability 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": "Planner (Opus): refactor auth middleware, then run unit tests.\nCurrent fork: batch of 12 tool calls proposed in one turn — 9 are duplicate glob/search on the same paths already read; 2 write the same file; 1 runs npm test.\nClosed options for this fork: approve batch / reject duplicates keep test / hand to Opus / stop.\nPolicy: spam or duplicate tool batches should not burn the loop; low-confidence forks escalate to Opus.\nTask: cascade (continue / handoff_opus / stop), difficulty, is_spam_or_noise, options_closed.",
"questions": {
"cascade": {
"type": "choice",
"instructions": "An agent loop hit a fork. Opus already planned the work. Where should this step go? Prefer continue when the options are closed and a cheap typed decision is enough; handoff_opus when the step needs deeper analysis or Jev would be guessing; stop when the step is spam, out of policy, or clearly should not proceed.",
"criteria": {
"continue": "Closed yes/no, tool pick or spam check Jev can answer; keep the cheap loop going without calling Opus",
"handoff_opus": "Low confidence, ambiguous fork, or a hard planning/repair step that deserves the frontier planner",
"stop": "Reject or end this branch: spam, policy block, or no permitted option fits"
}
},
"difficulty": {
"type": "score",
"instructions": "How hard is this fork for a typed decision model alone?",
"criteria": [
"trivial_yes_no",
"routine_tool_pick",
"multi_factor",
"frontier_only"
]
},
"is_spam_or_noise": {
"type": "noul",
"instructions": "This step is spam, noise, or a batch of tool calls that should not run (duplicative, irrelevant, or clearly abusive)."
},
"options_closed": {
"type": "noul",
"instructions": "The permitted options for this fork are fully listed in advance (approve/reject, which tool, spam or not) and none of them requires open-ended generation."
}
}
}'// Node.js 18+ (built-in fetch). Run: FLATKEY_API_KEY=... node jev.mjs
const body = {
"model": "typesafe/jev-1.13",
"state": "Planner (Opus): refactor auth middleware, then run unit tests.\nCurrent fork: batch of 12 tool calls proposed in one turn — 9 are duplicate glob/search on the same paths already read; 2 write the same file; 1 runs npm test.\nClosed options for this fork: approve batch / reject duplicates keep test / hand to Opus / stop.\nPolicy: spam or duplicate tool batches should not burn the loop; low-confidence forks escalate to Opus.\nTask: cascade (continue / handoff_opus / stop), difficulty, is_spam_or_noise, options_closed.",
"questions": {
"cascade": {
"type": "choice",
"instructions": "An agent loop hit a fork. Opus already planned the work. Where should this step go? Prefer continue when the options are closed and a cheap typed decision is enough; handoff_opus when the step needs deeper analysis or Jev would be guessing; stop when the step is spam, out of policy, or clearly should not proceed.",
"criteria": {
"continue": "Closed yes/no, tool pick or spam check Jev can answer; keep the cheap loop going without calling Opus",
"handoff_opus": "Low confidence, ambiguous fork, or a hard planning/repair step that deserves the frontier planner",
"stop": "Reject or end this branch: spam, policy block, or no permitted option fits"
}
},
"difficulty": {
"type": "score",
"instructions": "How hard is this fork for a typed decision model alone?",
"criteria": [
"trivial_yes_no",
"routine_tool_pick",
"multi_factor",
"frontier_only"
]
},
"is_spam_or_noise": {
"type": "noul",
"instructions": "This step is spam, noise, or a batch of tool calls that should not run (duplicative, irrelevant, or clearly abusive)."
},
"options_closed": {
"type": "noul",
"instructions": "The permitted options for this fork are fully listed in advance (approve/reject, which tool, spam or not) and none of them requires open-ended generation."
}
}
};
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": "Planner (Opus): refactor auth middleware, then run unit tests.\nCurrent fork: batch of 12 tool calls proposed in one turn — 9 are duplicate glob/search on the same paths already read; 2 write the same file; 1 runs npm test.\nClosed options for this fork: approve batch / reject duplicates keep test / hand to Opus / stop.\nPolicy: spam or duplicate tool batches should not burn the loop; low-confidence forks escalate to Opus.\nTask: cascade (continue / handoff_opus / stop), difficulty, is_spam_or_noise, options_closed.",
"questions": {
"cascade": {
"type": "choice",
"instructions": "An agent loop hit a fork. Opus already planned the work. Where should this step go? Prefer continue when the options are closed and a cheap typed decision is enough; handoff_opus when the step needs deeper analysis or Jev would be guessing; stop when the step is spam, out of policy, or clearly should not proceed.",
"criteria": {
"continue": "Closed yes/no, tool pick or spam check Jev can answer; keep the cheap loop going without calling Opus",
"handoff_opus": "Low confidence, ambiguous fork, or a hard planning/repair step that deserves the frontier planner",
"stop": "Reject or end this branch: spam, policy block, or no permitted option fits"
}
},
"difficulty": {
"type": "score",
"instructions": "How hard is this fork for a typed decision model alone?",
"criteria": [
"trivial_yes_no",
"routine_tool_pick",
"multi_factor",
"frontier_only"
]
},
"is_spam_or_noise": {
"type": "noul",
"instructions": "This step is spam, noise, or a batch of tool calls that should not run (duplicative, irrelevant, or clearly abusive)."
},
"options_closed": {
"type": "noul",
"instructions": "The permitted options for this fork are fully listed in advance (approve/reject, which tool, spam or not) and none of them requires open-ended generation."
}
}
}""")
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
- Claude Code users wiring TypeSafe's official Jev skill into an agent
- harness builders who want a cheap decision layer under a frontier planner
- teams burning frontier tokens on approve/reject and tool-choice forks
Triggers
- every approve/reject, tool pick or spam check inside the agent loop hits Opus
- you want a real NONE / handoff path when Jev confidence is low
- the agent forks on closed options you can spell out ahead of time
- you already use Claude Code skills and want TypeSafe's Jev skill in the loop
The workflow
- 01Loop statePlan step, tool result, candidate forksInput
- 02Cascadecontinue / handoff_opus / stopJev
- 03Spam + difficultyNoul spam check + ScoreJev
- 04Code gateKeep loop, escalate, or haltYour code
Question shape
{
"cascade": {
"type": "choice",
"instructions": "An agent loop hit a fork. Opus already planned the work. Where should this step go? Prefer continue when the options are closed and a cheap typed decision is enough; handoff_opus when the step needs deeper analysis or Jev would be guessing; stop when the step is spam, out of policy, or clearly should not proceed.",
"criteria": {
"continue": "Closed yes/no, tool pick or spam check Jev can answer; keep the cheap loop going without calling Opus",
"handoff_opus": "Low confidence, ambiguous fork, or a hard planning/repair step that deserves the frontier planner",
"stop": "Reject or end this branch: spam, policy block, or no permitted option fits"
}
},
"difficulty": {
"type": "score",
"instructions": "How hard is this fork for a typed decision model alone?",
"criteria": [
"trivial_yes_no",
"routine_tool_pick",
"multi_factor",
"frontier_only"
]
},
"is_spam_or_noise": {
"type": "noul",
"instructions": "This step is spam, noise, or a batch of tool calls that should not run (duplicative, irrelevant, or clearly abusive)."
},
"options_closed": {
"type": "noul",
"instructions": "The permitted options for this fork are fully listed in advance (approve/reject, which tool, spam or not) and none of them requires open-ended generation."
}
}Gate policy
≥ 0.85 and options_closed
If cascade=continue and is_spam_or_noise is low, keep the Jev loop. If cascade=stop or is_spam_or_noise is high, halt and log.
0.55–0.85
Prefer handoff_opus when difficulty is multi_factor or frontier_only, or when continue and handoff_opus are close; never treat a soft continue as a silent proceed.
< 0.55 or transport fail
Hand off to Opus (or a human) by default. Missing Jev answers never mean continue—fail closed to handoff_opus or stop per policy.
Failure modes
Pre-launch checks before you trust auto-routing:
- Sending every in-loop yes/no to Opus and erasing the cascade win;
- Omitting a real handoff_opus / NONE path so low confidence still continues;
- Letting Jev invent tool names instead of choosing from a closed registry;
- Treating a transport timeout as continue instead of fail-closed handoff;
- Asking one vague "should we proceed?" instead of spelling out the fork options;
- Skipping spam / duplicate-tool checks so batch noise burns the loop;
FAQ
How is this different from a coding-agent review gate?
A coding-agent review gate grades one proposed action with four yes/no checks before anything runs. A Claude Code cascade sits inside the whole loop: Jev takes the cheap forks (yes/no, tool pick, spam), and only low-confidence or hard steps go back to Opus. Many harnesses want both.
Why not let Opus decide every fork?
Most loop forks are closed choices. Cascading them through Jev keeps the expensive planner on the tiny pile that needs deeper analysis—faster, cheaper, and less compute burned—while your code still owns allowlists and stop reasons.
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 (loop fork + closed options), model (typesafe/jev-1.13), and questions (choice / score / noul). 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, skills and terms at the original TypeSafe sources.
Sources
TypeSafe just dropped an official skill that teaches Claude Code to build agents on JEV the trick is stupidly simple: Opus 5.5 plans the work. JEV makes every yes/no call inside the loop the setup: > add the skill so Claude Code reads TypeSafe's live docs before writing any code > list every fork your agent hits: approve or reject, which tool, spam or not > send those forks to JEV with the options spelled out > low confidence -> hand it to Opus 5.5 the easy calls never touch the expensive model Opus gets a tiny pile that actually deserves deeper analysis faster. cheaper. way less compute burned basically, JEV answers the phone so Opus only takes the calls that matter LLMs think. JEV decides. code does
— @helicerat0x View the post on X →
Wire this gate with your own key
Bring your own key through Flatkey / OpenRouter. Keep exact checks in code.