Pick one specialist with a Jev choice, then run only that agent when confidence and selected probability both clear their floors.
Use this when you delegate a request to one specialist agent and want to show the Jev choice distribution before its result.
Similar patterns, and when each one is the better fit.

Jev Tool PermissionsUse this when an agent has dozens of MCP tools and you want deny rules plus one Jev relevance check per tool to trim the list before each step.
Jev Confidence RouterFreeUse this when incoming messages must land in one of a fixed set of team queues, with low-confidence cases held back for human review.
Jev Search FilterFreeUse this when you want semantic search over a known catalog, such as emoji or icons, without building embeddings, scoring each item with a boolean.
Jev Best-of-N JudgeUse this when you already have several candidate replies to one prompt and need one chosen, or none at all if the pick is too close to call.Requirements, wiring steps, and what this pattern adds to your project.
Pick how you want to pull this pattern in. Then wire env vars and routes the same way.
Download → Next.js app
Use Download → Next.js app in the preview toolbar. You get a zip scaffold (Pro downloads rewrite preview `/view/.../api/*` paths to `/api/*` automatically).
Extract the zip and install dependencies
Unzip the archive, then run `pnpm install` (or npm / yarn) in the project folder.
Fill .env.local
The download includes .env.local placeholders when needed. Add real values for: AI_GATEWAY_API_KEY.
Customize the agent and tool files
Adapt prompts, tools, and stop conditions in the generated project for your product.
Run the app and open the pattern route
Run `pnpm dev`, open the setup/checklist page if present, then navigate to the generated pattern route and verify responses.
AI_GATEWAY_API_KEYGet keyAI SDK APIs
experimental_evaluategenerateTextgatewayProviders
External services
app/page.tsxapp/layout.tsxapp/api/delegation/route.tscomponents/delegation-demo.tsxcomponents/typesafe-ai.tsxcomponents/probability-bar.tsxhooks/use-delegation.tslib/delegation-policy.tslib/delegation-questions.tslib/specialists.tslib/rate-limit.tslib/request-utils.tsREADME.mdnpm packages
5
Registry components
lib/delegation-policy.tsdecideDelegation holds on clarify, missing confidence, or either floor. runSpecialist is called only when action is run. Do not boot generateText in unit tests.
lib/delegation-questions.tsChoice question specialist over research, data, code, design, and clarify. CONFIDENCE_FLOOR is 0.60 and SELECTED_PROBABILITY_FLOOR is 0.70.
lib/specialists.tsOne instruction and token cap per specialist. presentSpecialist maps code, data, and design text into the card shape, and falls back to prose.
delegation/route.tsPOST streams newline-delimited JSON: a decision event from experimental_evaluate, then a specialist event from generateText only when decideDelegation returns run. zeroDataRetention is on.
Pick one specialist with a Jev choice, then run only that agent when confidence and selected probability both clear their floors.
Use this when you delegate a request to one specialist agent and want to show the Jev choice distribution before its result.
Similar patterns, and when each one is the better fit.

Jev Tool PermissionsUse this when an agent has dozens of MCP tools and you want deny rules plus one Jev relevance check per tool to trim the list before each step.
Jev Confidence RouterFreeUse this when incoming messages must land in one of a fixed set of team queues, with low-confidence cases held back for human review.
Jev Search FilterFreeUse this when you want semantic search over a known catalog, such as emoji or icons, without building embeddings, scoring each item with a boolean.
Jev Best-of-N JudgeUse this when you already have several candidate replies to one prompt and need one chosen, or none at all if the pick is too close to call.Requirements, wiring steps, and what this pattern adds to your project.
Pick how you want to pull this pattern in. Then wire env vars and routes the same way.
Download → Next.js app
Use Download → Next.js app in the preview toolbar. You get a zip scaffold (Pro downloads rewrite preview `/view/.../api/*` paths to `/api/*` automatically).
Extract the zip and install dependencies
Unzip the archive, then run `pnpm install` (or npm / yarn) in the project folder.
Fill .env.local
The download includes .env.local placeholders when needed. Add real values for: AI_GATEWAY_API_KEY.
Customize the agent and tool files
Adapt prompts, tools, and stop conditions in the generated project for your product.
Run the app and open the pattern route
Run `pnpm dev`, open the setup/checklist page if present, then navigate to the generated pattern route and verify responses.
AI_GATEWAY_API_KEYGet keyAI SDK APIs
experimental_evaluategenerateTextgatewayProviders
External services
app/page.tsxapp/layout.tsxapp/api/delegation/route.tscomponents/delegation-demo.tsxcomponents/typesafe-ai.tsxcomponents/probability-bar.tsxhooks/use-delegation.tslib/delegation-policy.tslib/delegation-questions.tslib/specialists.tslib/rate-limit.tslib/request-utils.tsREADME.mdnpm packages
5
Registry components
lib/delegation-policy.tsdecideDelegation holds on clarify, missing confidence, or either floor. runSpecialist is called only when action is run. Do not boot generateText in unit tests.
lib/delegation-questions.tsChoice question specialist over research, data, code, design, and clarify. CONFIDENCE_FLOOR is 0.60 and SELECTED_PROBABILITY_FLOOR is 0.70.
lib/specialists.tsOne instruction and token cap per specialist. presentSpecialist maps code, data, and design text into the card shape, and falls back to prose.
delegation/route.tsPOST streams newline-delimited JSON: a decision event from experimental_evaluate, then a specialist event from generateText only when decideDelegation returns run. zeroDataRetention is on.
Loading preview…
Early-bird pricing — limited time


Open on desktop for the interactive preview.
Pick one specialist with a Jev choice, then run only that agent when confidence and selected probability both clear their floors.
Loading preview…
Early-bird pricing — limited time


Open on desktop for the interactive preview.
Pick one specialist with a Jev choice, then run only that agent when confidence and selected probability both clear their floors.