Tag a closed inbox with one Jev boolean per tag. A stamp lands only when its probability clears a floor.
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_evaluateProviders
External services
app/page.tsxapp/layout.tsxapp/api/tag/route.tscomponents/inbox-tags-demo.tsxcomponents/inbox-list.tsxcomponents/typesafe-ai.tsxhooks/use-inbox-tags.tslib/inbox.tslib/tag-questions.tslib/tag-policy.tslib/rate-limit.tslib/request-utils.tsREADME.mdnpm packages
6
Registry components
lib/tag-policy.tsPure decideTags policy: keep a message/tag pair only when P(tag) >= 0.70. A missing answer stays off the row. Do not call Jev from unit tests. Use Experimental_EvaluationMockModelV4.
lib/tag-questions.tsbuildTagQuestions writes one boolean per inbox message and closed tag. TAG_FLOOR is 0.70 and stays in application code.
lib/inbox.tsClosed inbox and tag set. Jev may only answer these ids. Do not let the model invent messages or tags.
tag/route.tsRate-limited experimental_evaluate call through AI Gateway model typesafe-ai/jev with zeroDataRetention. The inbox is not in the request. Returns decideTags hits, never a free-text label list.
Tag a closed inbox with one Jev boolean per tag. A stamp lands only when its probability clears a floor.
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_evaluateProviders
External services
app/page.tsxapp/layout.tsxapp/api/tag/route.tscomponents/inbox-tags-demo.tsxcomponents/inbox-list.tsxcomponents/typesafe-ai.tsxhooks/use-inbox-tags.tslib/inbox.tslib/tag-questions.tslib/tag-policy.tslib/rate-limit.tslib/request-utils.tsREADME.mdnpm packages
6
Registry components
lib/tag-policy.tsPure decideTags policy: keep a message/tag pair only when P(tag) >= 0.70. A missing answer stays off the row. Do not call Jev from unit tests. Use Experimental_EvaluationMockModelV4.
lib/tag-questions.tsbuildTagQuestions writes one boolean per inbox message and closed tag. TAG_FLOOR is 0.70 and stays in application code.
lib/inbox.tsClosed inbox and tag set. Jev may only answer these ids. Do not let the model invent messages or tags.
tag/route.tsRate-limited experimental_evaluate call through AI Gateway model typesafe-ai/jev with zeroDataRetention. The inbox is not in the request. Returns decideTags hits, never a free-text label list.
Loading preview…
Early-bird pricing — limited time


Open on desktop for the interactive preview.
Tag a closed inbox with one Jev boolean per tag. A stamp lands only when its probability clears a floor.
Loading preview…
Early-bird pricing — limited time


Open on desktop for the interactive preview.
Tag a closed inbox with one Jev boolean per tag. A stamp lands only when its probability clears a floor.