---
title: "AI Email Categorization Agent"
description: "Local-first inbox automation agent — reads Gmail via OAuth2, semantically classifies every email into custom labels using an LLM, applies them automatically, and runs on a schedule with zero manual input. Skips already-labeled threads to avoid redundant processing."
canonical: "https://shivanshutiwari.in/projects/email-categorization-agent"
lastUpdated: "2026-09-02"
---

# AI Email Categorization Agent

Local-first inbox automation agent — reads Gmail via OAuth2, semantically classifies every email into custom labels using an LLM, applies them automatically, and runs on a schedule with zero manual input. Skips already-labeled threads to avoid redundant processing.

**Stack:** Python, Google Gemini, Gmail API, OAuth2  
**Date:** 2025  

## Highlights

- Intelligently skips already-labeled threads to avoid redundant LLM calls
- Runs unattended with zero cloud dependency
- OAuth2-secured Gmail integration

---
*Source: https://shivanshutiwari.in/projects/email-categorization-agent*
