jev-ai-sdk-form-router
Vercel Labs example routing form submissions to the right team with Jev via AI SDK, falling back to an LLM when uncertain.
Overview
Jev x AI SDK Form Router is a Vercel Labs example app with three forms (lead, contact and issue report) that use Jev to route each submission by its content. Leads go to startup, growth, enterprise or sales teams; contact messages to billing, support or general; and issue reports to frontend, platform, infrastructure, identity or engineering teams. When Jev's evaluation is uncertain or fails, openai/gpt-6-luna-fast handles the routing instead.
It is built with Next.js 16, React 19, AI SDK 7 and the Vercel AI Gateway, with shadcn/ui and Tailwind for UI and React Email plus Resend for optional email delivery. It includes editable samples and shows routing details. Live routing needs AI Gateway access to both typesafe-ai/jev and the fallback model, via an API key or Vercel OIDC; without it you can still explore the forms and samples. It is MIT licensed and deployable with one click to Vercel.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Which team should receive this lead? | startup · growth · enterprise · sales |
| Choice | Where should this contact message go? | billing · support · general |
| Choice | Which engineering team owns this issue? | frontend · platform · infrastructure · identity · engineering |
How it works
- User submits a form
- Jev routes it via AI Gateway
- Uncertain or failed evaluations fall back to an LLM
- Show routing details and optionally email the team
Strengths
- Clear reference for Jev with an LLM fallback
- One-click deploy to Vercel
- OIDC auth avoids storing keys on Vercel
Caveats
- Requires AI Gateway access to two models for live routing
- Example app, not a product
Getting started
`pnpm install`, set AI_GATEWAY_API_KEY in .env.local (or use Vercel OIDC), then `pnpm dev` and open localhost:3000.At a glance
- Type
- Library
- Status
- prototype
- Language
- TypeScript
- Runtime
- Next.js on Vercel
- Has code
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
Route form submissions to the right people with Jev and AI SDK.
logicrw/awesome-jev-projects
Frequently asked questions
What does Jev decide?
Which team should receive each form submission.
What if Jev is unsure?
The submission is routed by openai/gpt-6-luna-fast instead.
How do I authenticate?
With a Vercel AI Gateway key or Vercel OIDC.
Related projects
Helper n8n node for Jev by Brains of Bots: classify, route and score with a probability per answer to send unsure items to review.
ProjectbetaTypeScriptDependency-free n8n node for TypeSafe Jev with choice, yes/no and score questions and npm provenance-signed releases.
ProjectbetaTypeScriptAlibaba's AgentScope 2.0 agent framework, which added a JevClassifierModel for binary, choice and score decisions via the TypeSafe SDK.
ProjectproductionPythonChinese-language Zotero AI reading assistant that uses Jev judgments to classify papers in your library.
LibraryproductionJavaScriptPrivacy-first personal knowledge management system, listed as integrating Jev for document classification and tag routing.
PluginproductionTypeScriptClassifies tax PDF pages into 261 IRS forms and 7 page kinds with one Jev request per page and a confidence gate.
ProjectproductionTypeScript