VantaSoftVantaSoft
Robot sitting at desk sorting mail into color-coded trays with dashboard on screen behind
Back to Journal
June 26, 20267 min read

How to Build an AI Email Triage System (Step by Step)

VantaSoft Team

VantaSoft Team

Engineering Insights

Most professionals check email dozens of times a day. Not because they're doing dozens of email tasks, but because they're scanning, mentally triaging, and context-switching back to whatever they were doing before. The real cost isn't the time spent reading. It's the cognitive overhead of remembering every ask, tracking every thread, and hoping nothing falls through the cracks.

An AI email triage system can handle all of that automatically. It scans your inboxes on a schedule, classifies every message, and surfaces only what needs your attention. The whole thing runs on a Claude subscription and an open-source agent framework.

Here's how to build one from scratch.

What the Finished System Does

The agent polls your inboxes every 30 minutes during waking hours. Each email gets classified into one of three buckets. Important emails (someone is waiting on you, there's an action you need to take) get surfaced for your attention. FYI emails (receipts, service notifications, automated reports) get summarized in a triage channel. Spam (cold outreach, unsolicited pitches) gets flagged and moved to the spam folder.

The result: no more context-switching to email, and a single channel where you can see everything that matters at a glance.

What You Need

The entire system runs on three things:

A Claude subscription. Pro ($20/month) is the minimum for Claude Code access. Max ($100+/month) is what you need for continuous all-day operation, which is what email triage requires.

A computer that stays on. The agent needs to run continuously. A Mac Mini, a Linux server, or a cloud VM all work. Your laptop works for testing, but it pauses when the lid closes.

Claude Code Teams. This is the open-source agent framework that handles scheduling, tool orchestration, and multi-agent coordination. It's what turns Claude from a chatbot into a persistent assistant.

Step 1: Install Claude Code

Open your terminal and run:

curl -fsSL https://claude.ai/install.sh | bash

Then launch it once to authenticate:

claude

Follow the login prompts to connect your Claude account. Once you see the interactive prompt, type /exit to close it. You just need the authentication set up for now.

Windows users: you'll need WSL (Windows Subsystem for Linux) first. Open PowerShell as Administrator, run wsl --install, reboot, then open Ubuntu from the Start menu. Run all commands from there.

Step 2: Install Claude Code Teams

Claude Code Teams is the framework that turns Claude Code into a persistent agent system. It gives you an orchestrator agent that can manage specialist agents, connect to your tools, and run on a schedule.

Install it:

cd ~ curl -fsSL https://cct.vantasoft.com/install.sh | bash cd claude-code-teams/agents/orchestrator

Then start the orchestrator:

claude --dangerously-skip-permissions

The --dangerously-skip-permissions flag lets the agent operate autonomously without asking for approval on every action. This is necessary for an agent that runs in the background and handles email while you're away from your computer.

Type any message to start the initial setup conversation. The orchestrator will walk you through the remaining configuration.

Step 3: Connect a Messaging Channel

The orchestrator communicates with you through a messaging channel. This is how you'll get notifications, review triage decisions, and send commands from your phone.

Telegram is the quickest option for a solo setup. During the setup conversation, select the Telegram option. The orchestrator will guide you through creating a Telegram bot via BotFather and connecting it. The whole process takes about two minutes.

Once connected, you can message your agent from anywhere. Ask it to check your inbox, review a specific email, or adjust classification rules, all from your phone.

The system can also integrate with whatever messaging platform you already use. Slack, Microsoft Teams, Discord, or anything with an API. The orchestrator treats the messaging layer as a plugin, so you can swap it later without rebuilding the triage pipeline.

Step 4: Connect Your Email

Tell the orchestrator: "Connect my email."

It will walk you through the OAuth flow for Gmail (and Outlook, if you use it). You'll authorize the agent to read your inbox and manage labels. This is the same authorization flow you'd use for any email client.

Start with one inbox. You can add more later, but getting one working end-to-end first lets you validate the system before scaling it.

Step 5: Define Your Classification Rules

This is where you teach the agent what matters to you. Tell it:

Which senders are always important. Your team members, key clients, your manager. Emails from these people should always be surfaced.

What counts as FYI. Automated reports, receipts, service notifications, marketing from services you're subscribed to. These get summarized but don't need action.

What counts as spam. Cold sales outreach, unsolicited pitches, SEO offers. These get moved to the spam folder.

The default behavior should err toward important. A false positive (flagging something that didn't need attention) costs you two seconds to dismiss. A false negative (missing an email that needed a reply) can cost you a relationship.

You can refine these rules over time. The first week is a calibration period. Check the triage channel, spot misclassifications, and adjust. By week two, the system should match your judgment the vast majority of the time.

Step 6: Set Up Scheduled Triage

Tell the orchestrator to run email triage on a schedule. A good starting point:

"Run email triage every 30 minutes from 6am to 10pm."

The orchestrator will create a routine that fires on this schedule. Each run scans for new messages, classifies them, and posts results to your triage channel. Important emails get surfaced. FYI emails get one-line summaries. Spam gets flagged and moved.

The 30-minute interval is a sweet spot. It's frequent enough that nothing sits unprocessed for long, but not so frequent that you're burning API calls on an empty inbox. Adjust based on your volume.

Step 7: Run It for a Week Before Trusting It

Don't stop checking email cold turkey on day one. Run the system alongside your normal routine for a week.

Each day, compare the system's classifications against your own judgment. When it misclassifies something, tell it. The rules will tighten quickly.

By the end of week one, you should be comfortable that the system catches everything important. That's when you stop checking email manually.

By the end of month one, you'll forget you ever had an email routine at all.

What Comes Next

Once the core system is working, there's a lot you can layer on:

Add more inboxes. The system handles multiple Gmail and Outlook accounts with the same classification pipeline.

Connect your calendar. Important emails can automatically create time blocks so you have dedicated space to respond.

Auto-create tasks. Route important emails into your task manager (Todoist, Linear, Notion) so nothing falls through the cracks.

Deploy specialist agents. The orchestrator can spin up agents for research, finance, marketing, or client work. The email triage agent is just one member of a larger team.

Why This Matters

Email is one of the most universal productivity drains in professional work. It's not that any single email takes long to process. It's the constant context-switching, the mental load of tracking threads, and the risk of missing something important buried in noise.

An AI triage system doesn't just save time. It removes a category of cognitive overhead entirely. Your inbox becomes a structured feed of summaries instead of an unfiltered stream demanding your attention.

If you're looking for where AI can make a real difference in your daily work, start with the things you do every day that you've stopped noticing are painful.

VantaSoft Team

VantaSoft Team

Engineering Insights

We help ambitious startups and growth-stage companies architect scalable software, reduce technical debt, and ship with confidence. Our insights draw from hundreds of engagements across industries.

Free Guide

The
Non-Technical
Founder's Guide

to Evaluating a
Development Partner

The questions to ask, the red flags
to watch for, and what good answers
actually sound like.

VantaSoft
Free Guide

Evaluating a Dev Partner?

Get the evaluation framework, vendor scorecard, and red flags checklist used to compare development partners — so you can make a structured decision instead of going with a gut feeling.

Partner with VantaSoft.

We work on a retainer-oriented, long-term partnership model. We own the technical decisions; you own the business priorities. Let’s build something exceptional.