Applications

jevmail

@fazlerocks7TypeScriptMITupdated 2026-09-19runnable

Open-source AI email triage for Gmail. Sorts your inbox into Needs reply, Updates, Promos, Sales and Spam with Jev, TypeSafe AI's decision model, via Vercel AI Gateway. Read-only, runs locally, 1,000 emails in about a minute for 3 cents.

fazlerocks/jevmail

Where it calls Jev

import { experimental_evaluate as evaluate } from "ai";

src/lib/classify.ts:1

The link points at the commit we read, so the line number still holds.

What it asks Jev

These question sets are lifted from this project's source exactly as written.

from src/lib/classify.ts:41

  1. categorychoice

    Which lane does this email belong in? Judge from the sender, subject, headers, and body together.

    • needs_replyA real person expects a reply from the recipient: a colleague, customer, friend, or existing contact asking something or continuing a conversation.
    • updatesTransactional or informational mail about the recipient's own accounts and activity: bank and card transaction alerts, OTPs and security notices, order, delivery, and booking status, receipts and invoices, bill reminders, service alarms, calendar or system notifications. Automated, addressed to the recipient, not trying to sell anything.
    • promotionalMarketing: newsletters, campaigns, discounts, product announcements, event invitations, and content digests sent to a list. Usually has an unsubscribe link and is not about a specific transaction of the recipient.
    • salesUnsolicited cold outreach from a vendor, agency, or recruiter trying to start a conversation or book a call with the recipient.
    • spamScams, phishing, fake invoices, or junk with no legitimate purpose.
  2. urgencyscore

    How urgently does this email need a reply from the recipient? Pick the level that best matches.

    • 0No reply needed, or no time pressure at all
    • 1A reply within a week is fine
    • 2A reply within a few days is expected
    • 3A reply today is expected
    • 4A person is blocked, or a deadline falls within 24 hours
  3. isPersonaltrue/false

    Was this email written by a human specifically to this recipient, rather than sent to a list or generated by a system?

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    category: { type: 'choice', instructions: 'Which lane does this email belong in? Judge from the sender, subject, headers, and body together.',
      criteria: { needs_reply: 'A real person expects a reply from the recipient: a colleague, customer, friend, or existing contact asking something or continuing a conversation.', updates: 'Transactional or informational mail about the recipient\'s own accounts and activity: bank and card transaction alerts, OTPs and security notices, order, delivery, and booking status, receipts and invoices, bill reminders, service alarms, calendar or system notifications. Automated, addressed to the recipient, not trying to sell anything.', promotional: 'Marketing: newsletters, campaigns, discounts, product announcements, event invitations, and content digests sent to a list. Usually has an unsubscribe link and is not about a specific transaction of the recipient.', sales: 'Unsolicited cold outreach from a vendor, agency, or recruiter trying to start a conversation or book a call with the recipient.', spam: 'Scams, phishing, fake invoices, or junk with no legitimate purpose.' } },
    urgency: { type: 'score', instructions: 'How urgently does this email need a reply from the recipient? Pick the level that best matches.',
      criteria: ['No reply needed, or no time pressure at all', 'A reply within a week is fine', 'A reply within a few days is expected', 'A reply today is expected', 'A person is blocked, or a deadline falls within 24 hours'] },
    isPersonal: { type: 'boolean', instructions: 'Was this email written by a human specifically to this recipient, rather than sent to a list or generated by a system?' },
  },
});

Other projects in this category