Skip to content

Morning skill: Auto-label emails on archive using semantic classification #37

@omriariav

Description

@omriariav

Problem

During morning triage, label operations are expensive. Every time the user wants to label + archive, a sub-agent is spawned that:

  1. Fetches the full label list (925+ labels)
  2. Does fuzzy matching
  3. Applies the label + archives

This happened 4 times in a single session (Privacy 2x, LiveRamp, Tracking Products), adding significant latency and token usage.

Proposed Solution

Make "Archive" smarter by auto-classifying the best label:

  1. Cache the label list at session start (see Morning skill: Reduce triage agent output verbosity #38)
  2. When user picks "Archive", spawn a lightweight label-classifier sub-agent that:
    • Reads email subject + sender + snippet + any OKR/task context
    • Uses the cached label list
    • Semantic-matches to the best label
    • Applies label + archives in one shot
  3. User sees: Archived with label: 14 - PRIVACY — no manual input needed
  4. User can override: "No, use label X instead"

Alternative: Pre-classify Labels in Triage Agent

The triage agent already has email context. It could suggest the best label as part of its output, so the main agent can auto-apply without spawning another sub-agent.

Impact

  • Saves ~20-30s per label operation (no sub-agent spawn + label fetch)
  • Saves ~15k tokens per label operation
  • Better UX: user doesn't need to remember label names

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions