Experiment brief: email-triage-agent — daily multi-account Gmail digest via Gmail API + LLM scoring + ntfy #1

Open
opened 2026-06-05 18:42:53 +00:00 by mathias · 0 comments
Owner

Hypothesis

A lightweight homelab service that runs a daily email digest across multiple Gmail accounts — scoring threads by urgency, filtering noise senders, and surfacing only actionable items — would reduce email triage time from ~daily manual review to a 2-minute morning scan.

Problem context

Observed 2026-06-05: 30,000+ unread emails across 5-6 Gmail accounts, ~100 emails/day incoming. The vast majority is newsletter/retail/notification noise. Real human conversations and action-required items are buried. The Gmail MCP connector (single-account) is insufficient for multi-account automation.

Proposed design

  • Go service, one OAuth token per Gmail account (stored in homelab secrets / SOPS)
  • Daily cron (e.g. 07:00 Stockholm time) pulls last 24h threads per account via Gmail API
  • LLM scoring pass (local model on iguana/koala, or LiteLLM-routed): classify each thread as HUMAN / ACTION_REQUIRED / NEWSLETTER / NOISE
  • Output: ntfy notification with a ranked digest — only HUMAN and ACTION_REQUIRED threads surface
  • Optional: auto-label or auto-archive NOISE threads in Gmail

Stack fit

  • Go + Gmail API (same pattern as brain-ingest-ntfy, tapir)
  • LiteLLM routing via piguard for classification
  • ntfy as delivery channel (already in homelab)
  • SOPS for multi-account OAuth token storage

Scope gate (do not build until)

  1. Manual triage pain is still present after unsubscribe cleanup (revisit 2026-07-01)
  2. At least 2-3 accounts are consistently generating missed action items
  3. brain-weekly-ingest is live and proven (Phase 1 prerequisite)

Effort estimate

Small-medium. Gmail API OAuth setup is the main friction. Classification logic is straightforward given existing LiteLLM + ntfy patterns.

Related

  • mathias/tapir — YouTube digest, same pattern
  • mathias/brain-ingest-ntfy — ntfy-triggered ingestion, same delivery channel
  • mathias/agentsquad — if classification agent needs to be more sophisticated
  • brain-weekly-ingest issue #2 — Gmail MCP single-account constraint
## Hypothesis A lightweight homelab service that runs a daily email digest across multiple Gmail accounts — scoring threads by urgency, filtering noise senders, and surfacing only actionable items — would reduce email triage time from ~daily manual review to a 2-minute morning scan. ## Problem context Observed 2026-06-05: 30,000+ unread emails across 5-6 Gmail accounts, ~100 emails/day incoming. The vast majority is newsletter/retail/notification noise. Real human conversations and action-required items are buried. The Gmail MCP connector (single-account) is insufficient for multi-account automation. ## Proposed design - Go service, one OAuth token per Gmail account (stored in homelab secrets / SOPS) - Daily cron (e.g. 07:00 Stockholm time) pulls last 24h threads per account via Gmail API - LLM scoring pass (local model on iguana/koala, or LiteLLM-routed): classify each thread as HUMAN / ACTION_REQUIRED / NEWSLETTER / NOISE - Output: ntfy notification with a ranked digest — only HUMAN and ACTION_REQUIRED threads surface - Optional: auto-label or auto-archive NOISE threads in Gmail ## Stack fit - Go + Gmail API (same pattern as `brain-ingest-ntfy`, `tapir`) - LiteLLM routing via piguard for classification - ntfy as delivery channel (already in homelab) - SOPS for multi-account OAuth token storage ## Scope gate (do not build until) 1. Manual triage pain is still present after unsubscribe cleanup (revisit 2026-07-01) 2. At least 2-3 accounts are consistently generating missed action items 3. `brain-weekly-ingest` is live and proven (Phase 1 prerequisite) ## Effort estimate Small-medium. Gmail API OAuth setup is the main friction. Classification logic is straightforward given existing LiteLLM + ntfy patterns. ## Related - `mathias/tapir` — YouTube digest, same pattern - `mathias/brain-ingest-ntfy` — ntfy-triggered ingestion, same delivery channel - `mathias/agentsquad` — if classification agent needs to be more sophisticated - brain-weekly-ingest issue #2 — Gmail MCP single-account constraint
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mathias/homelab#1