Moderate what users send to your chatbot before the agent sees it
Check every user turn with one typed Jev request and block or flag unsafe input, so the agent never acts on it.
Author's figure: Author's figure: about 0.4 s median per turn (CodeAlive). Reported by the builder, not measured by us.
The use case
Companies running a customer-facing chatbot or agent need to stop abuse, jailbreak attempts and unsafe requests before the model acts on them. Text-based moderators that parse a verdict from generated text can fail open when the input is hostile. This processor sends each user turn to Jev with typed moderation questions, so the answer is always one of the allowed labels. Blocked turns get a polite refusal, and borderline ones are logged for a person to review. The team reviews flagged conversations weekly and adjusts thresholds.
Example workflow
- Add a moderation step before the agent in Mastra or your framework
- Send each user turn to Jev with Choice and Noul safety questions
- Block clear violations with a fixed refusal message
- Log borderline turns for review
- Review flagged logs weekly and tune thresholds
Tools
- Jev (TypeSafe AI)
- Mastra
- Vercel AI SDK
Risks and guardrails
- Over-blocking frustrates real customers
- Attackers probe for wording that passes
- Logs of user turns need privacy handling
Sources
Written by Agents Lookup. Credits and official pages for the tools this use case names:
- mastra-jev-moderation by CodeAlive on Made with Jev: madewithjev.com/builds/mastra-jev-moderation
- mastra-jev-moderation: original post or repo by CodeAlive: github.com/codealive-ai/mastra-jev-moderation
- Mastra (official page): mastra.ai (checked 2026-11-19)
- Vercel AI SDK (official page): ai-sdk.dev (checked 2026-11-19)