evaluate( )

Pattern
Jev Sub-agent Delegation
Pick one specialist with a Jev choice, then run only that agent when confidence and selected probability both clear their floors.
BeginnerSep 2026View the full pattern on desktop


Problems solved
- Choose one specialist before any of them run
- Hold the request when the choice is to ask first
- Keep confidence and probability floors in application code
Use cases
- Route a request to research, data, code, or design
- Refuse to delegate when the ask is ambiguous
- Show the Jev distribution before the specialist result
AI SDK APIs
experimental_evaluategenerateTextgateway
Tags
jevevaluationtyped-decisionschoicesub-agentai-sdk
Requirements
- Node.js
- 24+
- Memory
- 256MB
- Other
- Vercel AI Gateway API key
Environment variables
AI_GATEWAY_API_KEYGet key
External services
vercel-ai-gatewayupstash
Ready to use?
View the full interactive pattern with live preview and copy the source code.
View the pattern on desktop






