JEV USE CASE
Agent Tool Selection.
Choose the next tool or specialist agent from a bounded set, then let ordinary code validate and execute it.
THE DECISION CONTRACT
STATE
The user asks to compare today’s forecast with an event already on their calendar.
QUESTION
Which capability should handle this turn?
CHOICES
weather calendar general_reasoning ask_user
TYPESCRIPT EXAMPLE
Ask for one bounded answer
This Vercel AI SDK-shaped example is illustrative. Check the current provider documentation before shipping.
import { experimental_evaluate as evaluate } from 'ai';
const result = await evaluate({
model: 'typesafe-ai/jev',
state: "The user asks to compare today’s forecast with an event already on their calendar.",
questions: {
decision: {
type: 'choice',
instructions: "Which capability should handle this turn?",
options: ["weather","calendar","general_reasoning","ask_user"]
}
}
});
// Validate permissions and thresholds before acting.
console.log(result.answers.decision);SAFE IMPLEMENTATION
Keep the boundary clear
Guardrail
Jev should suggest a route—not receive credentials or execute the tool. Keep authorization and side effects in code.
- Log the input, answer distribution, chosen threshold and resulting route.
- Test on labelled examples from your own production distribution.
- Send low-confidence, high-impact or out-of-distribution cases to a safer fallback.
- Re-evaluate thresholds when the model or workflow changes.
PRIMARY SOURCES