What this agent does
Most inboxes aren't a prioritization problem, they're a classification problem — the important message from a client is buried under eleven newsletters and a calendar notification. This agent reads every new email, classifies it, and takes the boring, safe action so you only see what actually needs your judgment.
stage-1-classification— labels every incoming email into one of your configured buckets (e.g.client,internal,newsletter,action-needed,spam-adjacent), using sender history, subject patterns, and message content.stage-2-reply-draft— for messages classified as needing a reply, drafts a response in your voice (using a short style sample you provide) and saves it as a Gmail/Outlook draft — it never sends automatically.stage-3-inbox-sort— applies the classification as a label/folder move so your inbox view is pre-sorted the moment you open it.
Every run appends a row to a triage log (sender, subject, classification, whether a draft was created) so you can audit what the agent decided and why.
Requirements
- Gmail or Outlook/Microsoft 365 account with API access enabled (OAuth app registration — a one-time setup, documented in the install guide).
- Works on OpenClaw (Gmail/Outlook plugin + scheduled trigger) and on Claude AI (Claude Code or claude.ai with Gmail connector enabled).
- No paid classification API required — this runs entirely on your existing LLM access plus the mail provider's own API.
Setup
- Unzip the package into your workspace, keeping the folder structure intact.
- Authorize the Gmail/Outlook OAuth app using the included install steps.
- Fill in your classification buckets and a short writing-voice sample (3-5 sentences of your own past emails works well).
- Run a starter prompt against your last 20 unread emails to sanity-check the classifications before automating.
- Schedule it to run every 15-30 minutes during work hours.
What you get
- Every incoming email automatically classified into your own buckets, using sender history, subject patterns, and content
- Reply drafts written in your own voice for anything that needs a response, saved for your review — never auto-sent
- Your inbox pre-sorted by label/folder before you even open it
- A full triage log so you can audit exactly what the agent decided and why
- Setup that works on both OpenClaw and Claude AI with your existing mail provider, no paid classification API needed