Freek Van der Herten describes a new mail-classification workflow in There There, a helpdesk launched the day before the article appeared on September 18, 2026. Taylor had announced Jev support in the 1.x branch of the Laravel AI SDK, and the team began using it for spam detection immediately.

classification.php
<?php

use Laravel\Ai\Classification;
use Laravel\Ai\Classification\Boolean;

$result = Classification::of('I have asked three times now. Can I please talk to a real person?')
    ->question('urgent', new Boolean('Does this request need an immediate response?'))
    ->classify();

$result['urgent']->probability; // 0.94
$result['urgent']->isTrue(threshold: 0.8); // true

Jev comes from TypeSafe and returns numeric classifications from natural-language state and questions. These System One models use calibrated probabilities, so a result of 0.9 should be correct about nine times in ten across a batch. The application receives a number and keeps the decision logic in PHP. Jev supports Boolean Noul questions, named Choice options and Score scales. A Boolean question returns a probability, a Choice also reports the probability for each option and a confidence value, and a Score can produce values between the levels defined by the developer. The input can be a string or a named array containing fields such as a message, order data and policy text.

The helpdesk receives automated messages that should not enter the customer inbox. Examples include out-of-office replies, bounces, subscription confirmations and DMARC reports. Header checks run first, covering fields such as `Auto-Submitted`, an empty return path and the `mailer-daemon` sender. Messages without useful headers were previously handled with subject prefixes for automatic replies in 15 languages, nine more prefixes for bounces and extra rules for customers asking about those subjects. Missed patterns required ongoing list updates.

The new workflow sends unresolved cases to Jev. An `InboundJudgement` enum defines `IsAutoResponse`, `IsBounce` and `IsSpam`, with each case carrying its own question and threshold. Automatic responses receive a threshold of 0.75. Bounces and spam use 0.9. The question descriptions define examples for both true and false outcomes, including templated messages written by a real customer and unsolicited sales or phishing mail. TypeSafe descriptions for the two Boolean outcomes are optional, but the article recommends adding them. A fourth classification becomes another enum case.

All unanswered questions are sent in one request and evaluated in parallel against the same state. The Laravel action passes the subject, sender name, sender address, contact address and the message body, limited with `Str::limit` to 10,000 characters. It sets a 10-second timeout. The call is wrapped in error handling that logs the message ID and exception, then leaves the mail pipeline running when classification fails. Raw answers are stored with the Boolean verdicts, so thresholds can be changed and reviewed later. A workflow condition such as `Is spam` reads the stored column and does not call Jev again. The provider is configured through `config/ai.php` with a `TYPESAFE_API_KEY` environment value.

The reported latency for three questions is 639 milliseconds, with about 48 classifications per second when requests run in parallel. The team did not tune the setup. Jev costs $0.042 per million input tokens, while output tokens are free. There There spends about four hundredths of a cent per message, or roughly 36 cents per month. The author expects to apply the same approach to more features in There There and other products. Further documentation is available from TypeSafe and the Laravel AI SDK, and the workflow can be tried in There There.