← Back to Projects

Email Triage

A swipe UI that turns inbox cleanup into a five-minute task.

An AI agent continuously scans your Gmail, identifies every unique sender, and presents them one at a time. Swipe to keep, archive, or unsubscribe. The agent executes your decisions in the background — archiving hundreds of emails per sender automatically.

The Problem

A neglected inbox accumulates fast. Thousands of unread emails from hundreds of senders — newsletters you forgot about, notifications you never opted out of, promotional lists you didn't sign up for. Cleaning it up manually means opening each email, deciding, searching for more from that sender, archiving, maybe unsubscribing. Multiply that by a few hundred senders and nobody's doing it.

Email Triage flips the model. Instead of dealing with individual emails, you deal with senders. One decision per sender, applied to every email they've ever sent you.

How It Works

1

AI Agent Scans Gmail

A background agent runs every 30 minutes, querying Gmail across different time ranges — last week, last month, last quarter, last year, and older. It discovers new senders and logs them to a local database.

2

Senders Appear in the Swipe UI

Each sender is shown as a card with their name, email address, and how many emails they've sent you. You see one sender at a time.

3

Swipe to Decide

Three options per sender: Keep (leave their emails alone), Archive (bulk-archive everything from them), or Unsubscribe (archive and flag for unsubscribe). You can also ban entire domains.

4

Agent Executes Decisions

The same background agent picks up your decisions and acts on them — searching Gmail for all emails from that sender, archiving them in bulk, and marking the sender as done.

Scale

1,500+
senders discovered
875+
already processed
10k+
emails cleaned

The agent continuously discovers new senders as it scans deeper time ranges. Decisions compound — once you've triaged a sender, their future emails can be handled by a filter.

Features

Sender-Level Decisions

Instead of triaging individual emails, you decide once per sender. That decision applies to every email they've sent — past and future.

Progressive Scanning

The agent rotates through time ranges — recent emails first, then progressively older. Surfaces the most active senders quickly.

Domain Banning

Block an entire domain with one tap. Every sender from that domain gets archived automatically.

Bulk Archive

When you archive a sender, the agent finds and archives every email from them. Hundreds of emails cleared in seconds.

Stats Dashboard

Track progress — how many senders reviewed, archived, unsubscribed, and how many are left. See the cleanup in real time.

Mobile-First Swipe UI

Designed for quick sessions on your phone. Buttons positioned for thumb reach. Sort through dozens of senders in a few minutes.

Tech Stack

FrontendNext.js, TypeScript, Tailwind CSS
DatabaseSQLite (better-sqlite3)
Gmail AccessGoogle Workspace CLI (OAuth)
Background AgentOpenClaw isolated cron (every 30 min)
HostingMac mini (local network)

Architecture

  ┌──────────────┐
  │  Gmail API   │  Search by sender, time range
  └──────┬───────┘
         │
  ┌──────▼───────┐    ┌───────────────┐
  │  Scanner     │───▶│   SQLite DB   │  senders, decisions
  │  Agent       │◀───│               │  actions_log
  └──────┬───────┘    └───────┬───────┘
         │                    │
         │ executes     ┌─────▼──────┐
         │ decisions    │  Swipe UI  │  keep / archive /
         │              │  (Next.js) │  unsubscribe / ban
         │              └────────────┘
  ┌──────▼───────┐
  │  Gmail API   │  Bulk archive, modify labels
  └──────────────┘