Skip to content
Jev Hub

[ Use case · Inbox ]

Can Jev triage an inbox?

Sort mail into categories, rate urgency and flag what needs a reply.

Updated By Jev Hub

[ TLDR ]Strong fit
  • Yes. Email triage is the most widely reproduced Jev workload: one request per email can assign a category, rate urgency and flag whether a human needs to see it.
  • An open-source project reports 1,000 emails triaged in about a minute for around 3 cents.

Is Jev a fit for emails?

Use Jev when:

  • You or your team spend real time deciding what to open first.
  • Your categories are stable (for example: needs reply, updates, promotions, sales, spam).
  • A human stays in the loop for anything consequential.

Skip it when:

  • You want replies drafted. Jev can't generate text; pair it with a language model for the emails that need one.
  • Your privacy obligations don't allow sending email content to a third-party API.

Which questions does Jev answer?

One request per email, 3 questions. Jev answers them in parallel.

  • What kind of email is this? (choice. Options: Needs reply, Updates, Promotions, Sales, Spam)
  • How time-sensitive is this email for us? (score. Scale: Whenever → This week → Today → Within the hour)
  • Does this email involve money, legal risk or an upset customer? (yes or no. Options: Yes, No)
ONE EMAILJEV ANSWERSWhat kind of email?How urgent?Needs a human?YOUR CODEApply the labelNotify if urgentSend to a person
One email, 3 questions, then your code. Jev answers the questions about each email in one request. Your own code reads the answers and their probabilities and decides what happens next.

What does it cost?

About 49¢ a month for 20,000 emails of about 300 words each: 2.4¢ per 1,000 at list price, billed by TypeSafe AI. Adjust the numbers in the calculator.

How do you get started?

  1. Test it in the playground. No code needed. Paste a real email into TypeSafe's playground and ask: “What kind of email is this?” with the options Needs reply, Updates, Promotions, Sales, Spam. You'll see the answer and its probability. Open the playground (opens in a new tab).
  2. Use an existing tool. jevmail (opens in a new tab): Open-source Gmail triage built on Jev. It runs locally, so expect a few minutes of setup. See what people have built: Jevmail: open-source Gmail triage, or browse all community builds.
  3. Integrate it. To run it on every email automatically, call Jev from the system where your emails live. The developer details below include the full request.

What have people reported?

  • Email classification: 500 emails for 3.5¢ (7¢ per 1,000), a few seconds. Riley Brown, self-reported.
  • Gmail triage (open source: jevmail): 1,000 emails for 3¢, about 1 minute. Syed Fazle Rahman, co-founder of Hashnode, self-reported (GitHub: fazlerocks/jevmail (opens in a new tab)).

Self-reported figures are the author's own; we haven't reproduced them. More on the costs page.

Common questions

How do developers set it up?

The request

One request per email with all 3 questions batched over the same state, so Jev reads the state once. Keys below are the names you'll see in the response.

POST api.typesafe.ai/v1/systemone
{
  "model": "jev-latest",
  "state": "From: Dana Lee <dana@acme.io>\nSubject: Invoice #4471 charged twice\nBody: Hi, our card was charged twice for March. Can you refund the duplicate today? Our finance close is tomorrow.",
  "questions": {
    "category": {
      "type": "choice",
      "instructions": "What kind of email is this?",
      "criteria": {
        "needs_reply": "A person expecting a response from us",
        "updates": "Notifications, receipts, product updates",
        "promotions": "Marketing and newsletters",
        "sales": "Someone selling to us",
        "spam": "Unwanted or suspicious mail"
      }
    },
    "urgency": {
      "type": "score",
      "instructions": "How time-sensitive is this email for us?",
      "criteria": [
        "Whenever",
        "This week",
        "Today",
        "Within the hour"
      ]
    },
    "needs_human": {
      "type": "noul",
      "instructions": "Does this email involve money, legal risk or an upset customer?"
    }
  }
}

How to wire it up

  1. Send sender, subject and the first ~1,500 characters of the body as state. Long threads cost more and rarely change the answer.
  2. Ask all questions in one request per email.
  3. Apply labels automatically; only surface needs_reply mail with urgency ≥ 2 as a notification.
  4. Anything with needs_human ≥ 0.5 goes to a person, whatever the category.

Watch out for

  • Newsletters that look personal are the most common misclassification. Add an example of one to the promotions criterion.
  • Test on a de-identified sample first and check the provider's data retention settings before running a live inbox.

New to writing Jev questions? Read the question design guide.