All projects
AI System

AI Agent for Inbox & Task Handling

An AI agent we built for our own inbox: it triages every email, drafts replies from past answers, sends action items to a task app, and waits for approval before sending.

Client
Internal: CodeITronics
Timeline
2025 (v1) · 2026 (v2)
AI Agent for Inbox & Task Handling
Problem

The costly part of our inbox was the first pass: reading every email to work out what it was, what it needed and when, then writing replies we had written many times before.

Solution

An agent that classifies and summarises each email, drafts replies from the most similar past answers, exports action items to Google Tasks through n8n, and holds every reply for approval. Version 2 adds a web interface, four model providers and a public demo.

Impact
  • Every email arrives sorted, summarised and with its action items listed
  • Replies drafted in our own voice, with the past replies they drew on shown
  • Nothing is sent without a person approving it
  • Open-sourced under MIT, with a demo that needs no account or API key

Why we built it

We built the first version for our own inbox at CodeITronics. Client threads, carrier and vendor email, invoices and a steady stream of newsletters all landed in one place, and the expensive part wasn't replying: it was the first pass of reading, sorting and remembering what each email needed.

The first version was a Python script that read Gmail, classified and summarised each email with an LLM, drafted replies using past answers, and asked for approval in the terminal. It worked, but only for whoever was sitting at that terminal.

What we changed in version 2

  • A web interface for the approval step. A triage board sorted by priority, an email view with the summary, action items and the draft side by side, and Approve, Edit, Rewrite and Skip.
  • Drafts that show their sources. The drafter retrieves the most similar past replies and the UI lists them, so you can see why a draft reads the way it does. Every approved reply becomes a new example.
  • Tasks out of the inbox. Action items are posted to an n8n webhook that creates Google Tasks. High-priority email is exported automatically.
  • Any of four model providers. Anthropic, OpenAI, Gemini or DeepSeek, chosen in configuration.
  • A demo anyone can run. A fictional mailbox with recorded AI answers, so it works without Gmail or an API key.

Decisions we made

A person approves every reply by default. An agent that emails customers on its own is a liability until you trust it. Auto-send exists as a setting, and we leave it off.

Keyword retrieval instead of a vector database. A personal inbox has hundreds to a few thousand approved replies. BM25 ranking is instant, needs no model download, and its matches are easy to explain. The first version's Chroma and sentence-transformers stack added more weight than it was worth at this size.

SQLite and one process. It's a single-user tool, so there is one file to back up and nothing else to run.

Try it

The demo runs the real pipeline over a fictional logistics company's inbox. The code is open source under the MIT license.

Have a workflow like this?

If it keeps repeating, it can become a system. Tell us what it looks like today.

Start a project