Mastra and Jev: build classifiers for agent workflows
Learn to build lead-scoring classifiers in Mastra with Jev, then use their results for guardrails, workflow branches and tool approvals.
Player not loading? Watch on YouTube
This workshop demonstrates Jev classifiers in Mastra, an open source TypeScript framework. The hosts explain decision models as tools for choosing among defined outcomes rather than generating replies. They describe speed and cost advantages over LLM calls, while stressing that accuracy depends on the task and the context supplied.
The main example scores sales leads using choices, scores and booleans. A classifier takes structured lead data as its state and returns results for buyer fit, purchasing intent and ideal customer profile. The tutorial then feeds those results into AI agent input and output checks, workflow branches, model selection and dynamic tool approval. It also demonstrates classifier-based response scores and dataset experiments.
The limitations receive concrete attention. Abhi reports that an issue-priority experiment classified only 10 of 78 GitHub issues correctly when given their titles and bodies. He attributes the poor result to missing project context and judgment. He also reports roughly 66% accuracy in his model-routing experiment and warns that switching models can break prompt caching.
The demonstrated integration calls Jev through an API. The closing discussion mentions computer-runnable alternatives, but does not provide a local deployment tutorial. The practical advice is to compare classifier results against labeled examples before relying on them.