TypeSafe
Typed decisions from TypeSafe's System One: calibrated probabilities, routing and graded scores, via TypeSafe, OpenRouter, OpenAI, Microsoft Foundry or Google Gemini.
Status: Experimental. Available to every organisation; adding the capability and a TypeSafe connection is the opt-in.
Everruns integrates with TypeSafe so agents can ask for a judgment rather than an opinion. TypeSafe’s System One model answers typed questions about content and returns numbers your agent — and your code — can act on directly: the probability that something is true, which option out of a set applies, or where something falls on a scale you define.
It does not write prose. That is the point: there is no answer to interpret, and no JSON to parse out of a paragraph.
What You Get
Section titled “What You Get”- Yes/no with a probability: “Is a refund being requested?” →
0.97, not “Yes, it appears so.” - Single choice with a distribution: pick one option and see how close the runners-up were
- Graded scores: rate against ordered levels you write, with the probability of each level
- Confidence: how concentrated the answer is, so the agent can escalate instead of guessing
- One call, many questions: every question in a call is answered together over the same content
Use an existing OpenRouter account
Section titled “Use an existing OpenRouter account”In Models, add or enable a Decisions model under your OpenRouter provider. Choose the
Jev 1.14 profile and the provider’s model ID typesafe/jev-1.14. The same saved OpenRouter
credential serves both chat and decisions. Direct TypeSafe uses jev-1.14.0.
Sync the provider to discover the new profile, or add it manually. Jev 1.13 remains
available for existing integrations. The rolling jev-latest alias maps to
~typesafe/jev-latest on OpenRouter.
Everruns supports text Noul, Choice, and Score decisions. The shared profile retains TypeSafe’s default limits: 32,000 tokens for state plus any one question and 64,000 for the whole request. TypeSafe’s model reference lists input at $0.042 per million tokens and free output. OpenRouter advertises a larger context, but the shared profile does not promise that limit on direct TypeSafe. Experimental image inputs, Box questions, and direct long-context headers are not enabled by this integration.
Use an existing OpenAI account
Section titled “Use an existing OpenAI account”OpenAI’s Decisions API answers the
same calibrated questions on GPT-6 Luna. In Models, enable the GPT-6 Luna Decisions model
under your OpenAI provider (model ID gpt-6-luna-decisions, sent to OpenAI as gpt-6-luna).
It sits next to the gpt-6-luna chat model and uses the same saved OpenAI key. OpenAI bills
input tokens only, at $0.10 per million.
Use an existing Microsoft Foundry account
Section titled “Use an existing Microsoft Foundry account”Microsoft-Decision-1 answers the
same questions on Microsoft Foundry. Deploy it in the Foundry portal, then, in Models, add a
Decisions model under your Microsoft MAI provider whose model ID is the deployment name.
Foundry routes calls by deployment, so a deployment named Decision-1 is model ID Decision-1.
The names Microsoft-Decision-1 and Decision-1 pick the Microsoft Decision 1 profile on
their own; another name needs that profile chosen by hand. The provider’s saved Foundry API key
and resource endpoint serve both chat and decisions. Microsoft bills input tokens only, at
$0.042 per million, and a request (content plus questions) fits in 32,768 tokens.
Use an existing Google Gemini account
Section titled “Use an existing Google Gemini account”Google’s Decisions API answers the same
calibrated questions on Gemini Decision 1. In Models, add a Decisions model under your
Google Gemini provider with model ID gemini-decision-1; it picks the Gemini Decision 1
profile. The provider’s saved Gemini API key serves both chat and decisions. On OpenRouter the
same model is google/gemini-decision-1. Google bills input tokens only, at $0.10 per million,
and a request (content plus questions) fits in 262,144 tokens.
Gemini Decision 1 also reads images, audio, video and PDFs. Pass session file paths in the
tool’s files argument (up to 8 files, 15 MiB in total) and every question is answered over the
text and the files together:
{ "state": "Delivery photo for order 1042.", "files": [ "/workspace/delivery.jpg" ], "questions": [ { "id": "damaged", "type": "noul", "instructions": "Is the parcel visibly damaged?" } ]}Other decision models read text only and refuse a call that attaches files. A deployment can
make Gemini Decision 1 its own default for guardrail checks with UTILITY_DECISION_DRIVER=gemini
and UTILITY_GEMINI_API_KEY (see environment variables).
Set the organization decision default in Models, or select an exact model in the Jev Decisions capability settings. The tool uses that model’s account. A disabled model or missing credential requires repairing the selection; it does not switch to another account. Decision calls honor session network restrictions and budgets, and appear in session usage.
The model service filter keeps decisions out of chat selectors. Model profile details show calibrated primitives and serving limits. Existing TypeSafe connections and session secrets continue to work when no catalog selection or decision default is configured.
Quick Start
Section titled “Quick Start”1. Get Your API Key
Section titled “1. Get Your API Key”- Sign in at typesafe.ai
- Create an API key in the dashboard
- Copy it
2. Connect in Everruns
Section titled “2. Connect in Everruns”- Go to Settings > Connections
- Find TypeSafe in the available providers
- Click Connect and paste your API key
Once connected, the TypeSafe capability is available in agent sessions.
3. Use in Sessions
Section titled “3. Use in Sessions”Agents with the TypeSafe capability get one tool:
| Tool | Description |
|---|---|
jev_decision | Ask typed questions about content and get calibrated answers |
A call gives it the content plus the questions to ask about it:
{ "state": "Why did the chicken cross the road? To get to the other side.", "questions": [ { "id": "is_funny", "type": "noul", "instructions": "Would a general audience laugh at this?" }, { "id": "humor", "type": "score", "instructions": "How funny is this joke?", "levels": ["Not funny at all", "Mildly amusing", "Genuinely funny", "Hilarious"] } ]}And gets back numbers, not a review:
{ "model": "jev-1.14.0", "answers": { "is_funny": { "type": "noul", "probability_yes": 0.43 }, "humor": { "type": "score", "score": 0.58, "normalized": 0.19, "level": 1, "label": "Mildly amusing", "probabilities": { "0": 0.44, "1": 0.55, "2": 0.01, "3": 0.0 }, "confidence": 0.57 } }}Question Types
Section titled “Question Types”| Type | Ask it when | You get |
|---|---|---|
noul | A condition either holds or it doesn’t | The probability of yes, from 0 to 1 |
choice | Exactly one option out of a set applies | The selected option, every option’s probability, and a confidence |
score | Something falls somewhere on a scale | A weighted position across your levels, each level’s probability, and a confidence |
These are System One’s own primitives, kept under the same names here; TypeSafe documents them in full under Primitives.
Two things worth knowing when you write the questions:
- A
noulnear 0.5 means yes and no are roughly equally likely. It does not mean “somewhat” — for degree, use ascore. choiceoptions andscorelevels must each describe a concrete situation and stand on their own. The question id is never shown to the model, so the instructions have to carry the whole meaning.
The confidence on a choice or score is a second axis, not a restatement of
the probability: the answer tells you what, confidence tells you whether to
act. See Confidence, and
confidence-gated routing
for the pattern it enables.
Good Fits
Section titled “Good Fits”- Verification: does this answer actually follow from the source it cites?
- Rating: how severe is this report, how good is this draft, how funny is this joke
- Routing: which handler, team, or tool should take this — with a confidence to gate on
- Screening: does this content match a policy, and how clearly
Embedding the Framework
Section titled “Embedding the Framework”Running the Everruns Framework in your own application rather than on the platform? The same capability attaches to an agent you build yourself, and the decision tool is also callable directly with no agent at all. See Direct decision.
Guardrails
Section titled “Guardrails”The same model backs Everruns guardrails when a
llm_judge or moderation check sets "engine": "jev". Instead of asking
the utility model to write a verdict, the check gets a calibrated probability and
your configured threshold decides — and every check on a stage is answered in a
single call. That path uses a deployment-owned key (UTILITY_TYPESAFE_API_KEY), not your
personal connection.
Security
Section titled “Security”- The API key is stored as a user connection and never exposed to the agent or written into session transcripts.
- Content passed to
jev_decisionleaves the platform for TypeSafe, like any other integration that inspects content. Calls are capped at 20 questions and 32 KiB of content. - The content being judged is sent as data, and every question states so — a document that tries to instruct the model is being rated, not obeyed.
Learn more
Section titled “Learn more”The model and its concepts are TypeSafe’s, and their documentation is the reference for both:
- System One — the class of model, and how it differs from an LLM
- Primitives — Noul, Choice, Score, and structured criteria
- State — what to send as the thing being judged
- Confidence — certainty as a second axis, distinct from the probability
- Patterns — including speculative fan-out and confidence-gated routing