How to use Jev in an AI agent
Updated September 21, 2026 · first published September 21, 2026
Use Jev when an agent needs to choose, score, classify, or gate—not when it needs to write. The smallest useful integration is one decision with a fixed answer space. Give Jev the state already available to the workflow, define the choices your code can handle, and branch on the returned answer and confidence.
Vercel exposes Jev as typesafe-ai/jev in AI Gateway and documents it through AI SDK's experimental evaluate API. Its model page uses a Boolean question to determine whether a refund was issued. The same request shape works for routing, scoring, and guardrails.
1. Start with one bounded question
Good first questions have a finite answer space and an obvious next action. “Which queue owns this ticket?” is good: Billing, Technical, Sales, or Review. “What should we do?” is too broad; it asks Jev to plan rather than decide.
2. Supply state and typed questions
Send the ticket, relevant account facts, and the policy excerpt the decision needs. Then declare the questions, for example: queue: Choice(Billing, Technical, Sales, Review) and urgent: Boolean. Every question shares the same state, so avoid unrelated history and include the facts that a capable human reviewer would need.
3. Make confidence change the path
Use an explicit route for each result. A high-confidence, low-risk routing result may continue immediately. A medium-confidence case can go to a stronger model with the same evidence. A high-impact or low-confidence case can go to review. Do not use one global threshold: a mistaken topic tag and a mistaken payment action have different consequences.
4. Ask more questions before making more calls
Jev can evaluate several typed questions against the same state. Ask for queue, urgency, and whether the evidence is sufficient in one decision call when all three change the next step. Add questions only when they change behaviour; free output is not a reason to create unused judgments.
5. Keep authority in code
Vercel's agent-control guide keeps permissions, argument validation, retry policy, and tool execution in application code. Jev evaluates the state; your application decides what it is allowed to do. Store the state version, question version, answer, probability, route, and final outcome so that you can tune the threshold and measure cost per resolved task.
Jev is easiest to adopt when it replaces one awkward LLM decision in an existing agent. Prove the pattern on that decision, then expand to other repeated forks in the workflow.
Related
- Where Jev belongs in an agent workflow
- What independent Jev tests say about cost
- Cost per successful task
Want this applied to your own LLM spend? FinOps LLM runs a free audit of your AI costs and shows where the savings are. Book free audit →