Try it
Copy the code ↓- Data source
- Decision schema
- Model inference
- Structured result
2 Decision schema 3 typed questions
threatnoulprobability 0–1relevancescorenot_relevantmarginally_relevanthighly_relevantseveritychoicelowmediumcritical
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": "Profile: Gulf Coast semiconductor fab supply chain\nPolicy triggers: gas-turbine / power shortages, permitting moratoria, port congestion, fab tool lead times\n\nHighlights (you-search):\n- EIA: regional industrial power curtailment risk elevated this week\n- Trade press: gas-turbine OEM backlog cited as delaying two Gulf fab expansions\n- County notice: temporary moratorium process opened for large high-power facilities\n- Port authority: container dwell times +18% WoW at primary import terminal\n- Unrelated: national retail holiday spending forecast revised up\n\nTask: threat (yes/no), relevance, severity (low / medium / critical).",
"questions": {
"threat": {
"type": "noul",
"instructions": "Does this evidence indicate a material supply-chain or operational threat for the profile given its policy triggers?"
},
"relevance": {
"type": "score",
"instructions": "How relevant is this evidence to the profile and its policy triggers?",
"criteria": [
"not_relevant",
"marginally_relevant",
"highly_relevant"
]
},
"severity": {
"type": "choice",
"instructions": "Given the profile and surviving evidence, how severe is the current situation? Use only the fixed definitions.",
"criteria": {
"low": "Routine monitoring suffices; no immediate mitigation planning required",
"medium": "Mitigation planning recommended; watch closely but not an active disruption",
"critical": "Active disruption or clear near-term risk; immediate action needed"
}
}
}
}'// Node.js 18+ (built-in fetch). Run: FLATKEY_API_KEY=... node jev.mjs
const body = {
"model": "typesafe/jev-1.13",
"state": "Profile: Gulf Coast semiconductor fab supply chain\nPolicy triggers: gas-turbine / power shortages, permitting moratoria, port congestion, fab tool lead times\n\nHighlights (you-search):\n- EIA: regional industrial power curtailment risk elevated this week\n- Trade press: gas-turbine OEM backlog cited as delaying two Gulf fab expansions\n- County notice: temporary moratorium process opened for large high-power facilities\n- Port authority: container dwell times +18% WoW at primary import terminal\n- Unrelated: national retail holiday spending forecast revised up\n\nTask: threat (yes/no), relevance, severity (low / medium / critical).",
"questions": {
"threat": {
"type": "noul",
"instructions": "Does this evidence indicate a material supply-chain or operational threat for the profile given its policy triggers?"
},
"relevance": {
"type": "score",
"instructions": "How relevant is this evidence to the profile and its policy triggers?",
"criteria": [
"not_relevant",
"marginally_relevant",
"highly_relevant"
]
},
"severity": {
"type": "choice",
"instructions": "Given the profile and surviving evidence, how severe is the current situation? Use only the fixed definitions.",
"criteria": {
"low": "Routine monitoring suffices; no immediate mitigation planning required",
"medium": "Mitigation planning recommended; watch closely but not an active disruption",
"critical": "Active disruption or clear near-term risk; immediate action needed"
}
}
}
};
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": "Profile: Gulf Coast semiconductor fab supply chain\nPolicy triggers: gas-turbine / power shortages, permitting moratoria, port congestion, fab tool lead times\n\nHighlights (you-search):\n- EIA: regional industrial power curtailment risk elevated this week\n- Trade press: gas-turbine OEM backlog cited as delaying two Gulf fab expansions\n- County notice: temporary moratorium process opened for large high-power facilities\n- Port authority: container dwell times +18% WoW at primary import terminal\n- Unrelated: national retail holiday spending forecast revised up\n\nTask: threat (yes/no), relevance, severity (low / medium / critical).",
"questions": {
"threat": {
"type": "noul",
"instructions": "Does this evidence indicate a material supply-chain or operational threat for the profile given its policy triggers?"
},
"relevance": {
"type": "score",
"instructions": "How relevant is this evidence to the profile and its policy triggers?",
"criteria": [
"not_relevant",
"marginally_relevant",
"highly_relevant"
]
},
"severity": {
"type": "choice",
"instructions": "Given the profile and surviving evidence, how severe is the current situation? Use only the fixed definitions.",
"criteria": {
"low": "Routine monitoring suffices; no immediate mitigation planning required",
"medium": "Mitigation planning recommended; watch closely but not an active disruption",
"critical": "Active disruption or clear near-term risk; immediate action needed"
}
}
}
}""")
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
- teams building background risk or supply-chain monitoring agents
- harness builders who want typed judgments separate from report writing
- ops engineers who need auditable escalate-or-skip gates under a cent
Triggers
- a risk profile needs periodic web sweeps without a frontier model on every cycle
- generative judges thrash across the escalate threshold run-to-run on the same day
- you need threatProbability, relevance bands, and severity on every outcome for audit
- deep dives should only run when triage clears a code-owned threshold
The workflow
- 01Profile + highlightsSearch hits scoped to the risk profileInput
- 02Threat?Material threat yes/no (noul)Jev
- 03Severitylow / medium / criticalJev
- 04Code gateEscalate deep dive or clean sweepYour code
Question shape
{
"threat": {
"type": "noul",
"instructions": "Does this evidence indicate a material supply-chain or operational threat for the profile given its policy triggers?"
},
"relevance": {
"type": "score",
"instructions": "How relevant is this evidence to the profile and its policy triggers?",
"criteria": [
"not_relevant",
"marginally_relevant",
"highly_relevant"
]
},
"severity": {
"type": "choice",
"instructions": "Given the profile and surviving evidence, how severe is the current situation? Use only the fixed definitions.",
"criteria": {
"low": "Routine monitoring suffices; no immediate mitigation planning required",
"medium": "Mitigation planning recommended; watch closely but not an active disruption",
"critical": "Active disruption or clear near-term risk; immediate action needed"
}
}
}Gate policy
≥ 0.90
Trust the typed answers: if threat clears your escalate threshold, run the deep dive and act on severity (low = record clean briefing; medium/critical = notify owners).
0.65–0.90
Escalate for a deep dive when threat is above threshold, but hold automated paging. Prefer a human glance at critical before any external action.
< 0.65
Treat as unclear: keep the sweep as a clean/no-action outcome, gather more highlights, and ask again before spending the deep-dive budget.
Failure modes
Pre-launch checks before you trust auto-routing:
- Letting one frontier prompt search, judge, and write the report—so escalate-or-skip becomes a coin flip;
- Asking Jev to write the briefing—it only returns typed threat / relevance / severity; synthesis stays with a generative model or templates;
- Hard-coding an untested triage threshold near 0.5 without logging threatProbability on every sweep;
- Auto-paging customers on mid-confidence critical without a human or slower review;
- Feeding the judge empty literals instead of real profile + highlight records;
FAQ
Why not let the generative model also decide escalate-or-skip?
In a measured ablation on the same profiles and news day, swapping Jev for a generative judge left report quality similar but made triage thrash across the 0.5 line—so coverage became a coin flip and judgment alone cost more than a full Jev-judged sweep. Keep generation for proposals and briefings; keep typed questions for the gates that spend money.
Where does this sit in a risk agent?
After cheap search highlights and before any deep dive. Jev answers threat (noul), relevance (score), and severity (choice); your code owns RISK_TRIAGE_THRESHOLD, query budgets, and what happens after each answer. A generative model can still propose queries and write the Markdown briefing.
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, model (typesafe/jev-1.13), and questions (choice / score / noul). This is not an OpenAI-compatible /v1 chat endpoint.
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
How to build a reliable risk agent without a frontier model ($0.02/sweep): • @youdotcom search • @typesafeai Jev for typed judgments • @QwenDevs for proposals & synthesis • MCP for integration Full architecture & cost breakdown below 👇
— @edwardirby View the post on X →
Wire this gate with your own key
Bring your own key through Flatkey / OpenRouter. Keep exact checks in code.