1. Data source
  2. Decision schema
  3. Model inference
  4. Structured result
2 Decision schema 3 typed questions
  • next_actionchoiceretryescalatecall_toolmark_safecontinue
  • riskscorelowmediumhighcritical
  • needs_humannoulprobability 0–1

3 Model inference typesafe/jev-1.13

Waiting for a run.

4 Structured result

Run the demo to see the JSON answers, the highlighted pick and the final action.

Call Jev yourselfSame data and schema, straight to Flatkey. Set 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": "Tool shell_exec failed twice with exit 127 (command not found). User is waiting in chat. Agent proposes: run `rm -rf /tmp/build && npm install` next. Retries so far: 2. Policy: no destructive filesystem commands without approval.",
  "questions": {
    "next_action": {
      "type": "choice",
      "criteria": {
        "retry": "Same tool or step failed transiently and another attempt is warranted",
        "escalate": "Human or higher-tier model should take over",
        "call_tool": "A specific tool should run next under current policy",
        "mark_safe": "The proposed action is safe to proceed without extra review",
        "continue": "Keep the agent loop going with the current plan"
      },
      "instructions": "Pick the next action that best fits the state."
    },
    "risk": {
      "type": "score",
      "criteria": [
        "low",
        "medium",
        "high",
        "critical"
      ],
      "instructions": "Rate the risk of the state."
    },
    "needs_human": {
      "type": "noul",
      "instructions": "Is this true for the state: needs human?"
    }
  }
}'

No Flatkey key yet? Get one for Jev 1.13 →

Run with real Jev

Sign in and connect a key

  1. Sign in with Google.
  2. Connect your Flatkey or OpenRouter key on the next screen. Get a Flatkey key for Jev 1.13.
  3. Come straight back here and press Run again.

This site is for researching, sharing and cataloguing Jev use cases. Your key is only there to make trying Jev convenient: it is stored encrypted, used only for runs you trigger, never used for anything else, and you can delete it anytime.

About this use case

Use Jev for agent decision gates: incoming state, Jev decision, routed outcome

Who / when

Audience

  • agent platform engineers who need reusable control gates
  • teams replacing full LLM calls for every micro-decision
  • builders wiring retry, escalate and tool-routing policies in code

Triggers

  • a tool call fails and you need a retry-or-escalate call
  • the agent must pick the next tool under policy constraints
  • a proposed action needs a cheap safety check
  • you want auto-continue only when confidence is high

The workflow

  1. 01
    Agent stateLoop context and proposalInput
  2. 02
    Choiceretry / escalate / call_tool / mark_safe / continueJev
  3. 03
    ScoreRisk bandJev
  4. 04
    Code gateApply, confirm or stopYour code

Question shape

{
  "next_action": {
    "type": "choice",
    "criteria": {
      "retry": "Same tool or step failed transiently and another attempt is warranted",
      "escalate": "Human or higher-tier model should take over",
      "call_tool": "A specific tool should run next under current policy",
      "mark_safe": "The proposed action is safe to proceed without extra review",
      "continue": "Keep the agent loop going with the current plan"
    }
  },
  "risk": {
    "type": "score",
    "criteria": [
      "low",
      "medium",
      "high",
      "critical"
    ]
  },
  "needs_human": {
    "type": "noul"
  }
}

Gate policy

≥ 0.90

Auto-apply the chosen next action when risk is low.

0.65–0.90

Confirm with a human or higher-tier model before acting.

< 0.65

Escalate or stop the agent loop.

Failure modes

Pre-launch checks before you trust auto-routing:

  • Destructive shell, filesystem or credential-touching proposals;
  • Ambiguous tool errors and missing exit-code context;
  • Prompt injection in tool stdout, logs or retrieved documents;
  • Stability when candidate order or retry counts change;
Keep exact work in code: retry budgets, allowlists, permissions and irreversibility checks should be deterministic. Use the decision model for semantics and control routing.

FAQ

Why not ask a full chat model at every agent step?

Most control steps are narrow: retry, escalate, pick a tool, check safety or continue. A typed System One layer returns bounded answers and probabilities so your code can auto-apply, confirm or stop without a full LLM call every time.

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.

When should the agent escalate or stop?

When confidence falls below your low band (here < 0.65), when risk scores high or critical, or when deterministic checks fail—destructive commands, secrets, allowlist misses and exhausted retry budgets.

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

Seen on X
Seen on X
Independent-site note: jev-llm.com is an independent research and practice site. It is not the TypeSafe AI official site. Verify models, pricing and terms at the original source.