ARCANADA
← Autonomy / Email Agent
LIVE L2 · target L3

Email Agent

Personal IMAP triage with Gemini and Telegram digest.

A cron-driven Python agent that pulls inbox via IMAP, classifies with Gemini (urgent / FYI / spam / digest), and pushes a daily summary to Telegram. Personal use, ~50–200 emails/day. A handful of past silent-failure incidents shaped the L3 roadmap — every bug got an explicit fix and a new entry in the exception hierarchy.

Capabilities

  • IMAP scan via configured Gmail account
  • Gemini classification with explicit ImapErrorClass exception hierarchy
  • Daily Telegram digest with category breakdown
  • Spam quarantine without auto-delete (operator reviews)
  • Cron-driven, no long-running daemon
  • venv hardened against environment drift
  • Per-class retry logic with idempotency keys

Current autonomy level

L2
What levels mean →

Weakest link

A past incident: a broad `except:` swallowed PermissionError and 54 emails were silently lost. Fix landed; structured exception hierarchy is now mandatory. No external heartbeat yet — if the cron stops running, only the missing digest reveals it.

Roadmap to L3

  1. L2 lift — liveness file-touch + Ops Bot mtime watcher; classified errors via ImapErrorClass enum (done).
  2. L3 lift — pino-style structured logs to file, post-run digest count POSTed to Ops Bot, schema-validate every Gemini classification output via Pydantic.
  3. Verification gate — chaos test that revokes IMAP token mid-run and asserts a fatal Ops Bot event within 60 s.