한국어

Brie Email Agent
Purpose-built for inbox triage — MailAgent

We built an autonomous agent that watches your inbox for you.
It reads and sorts incoming mail on its own, leaving only what you need to see in the inbox, and even prepares reply drafts.

Written 2026-07-20 · For partners & internal use · v1.0
MAILAGENT
1 · In one sentence

An autonomous agent that watches your inbox for you

The Brie email agent is an autonomous agent that keeps a constant watch on your inbox, reads and sorts incoming mail on its own — leaving only what matters, and even preparing reply drafts.

It is not a tool that summarizes received mail in one line. It marks as read the mail you needn't read, drafts replies for work mail, archives it to the client's project folder, and learns rules from your feedback — closer to a capable colleague who tidies your mail alongside you.

1 · Core value

Leave only "what you need to see" in the inbox

The core value of this agent is automatic mark-as-read — what we call triage.

Dozens of newsletters, automated alerts, and system emails pile up every day and bury the mail that actually matters.

The agent judges whether each message is one you must read or act on, and marks the rest as read on its own. Only the mail a person needs to see remains in the inbox. (Reversible anytime.)

Instead of "time spent tidying mail,"
you get a tidied inbox back every morning.
1 · What sets it apart

How it differs from existing mail automation

Most tools follow fixed rules — "sender/keyword → label/filter." MailAgent is different because it is an agent.

🧹

It judges by content

Not keyword matching — the LLM reads the full body and decides whether it needs to be read.

→ Auto mark-as-read (Ch. 3)
✍️

It prepares the reply too

For work mail, it learns your voice and drops a reply draft into the drafts folder. (You do the sending.)

→ Reply drafts (Ch. 7)
🧠

It learns from words

"Ignore mail like this" — one sentence becomes a persistent rule, applied from the next poll on.

→ Feedback learning (Ch. 9)
2 · Core architecture

Constant polling → classify → act: a human-supervised autonomous pipeline

Cron polls the inbox every few minutes, and the LLM classifies and acts on each thread in one pass.

1 · Poll

Collect new threads

Cron checks the inbox periodically (an idempotent cursor prevents duplicates)

2 · Classify

One LLM call

Judges category, need-to-read, need-to-reply, and draft as JSON in one pass

3 · Act

Read · draft · archive

Mark unneeded mail read · draft replies for work mail · save to project Drive

4 · Supervise

A person reviews

See results in a web dashboard/chat; a person sends from Gmail

Every state (threads, drafts, rules, read/restore) is persisted to a local DB and AuditLog — undoable and traceable.

2 · Classification

4 categories — deciding what to handle and how

A category is the starting point for "how to handle this mail" — need-to-read is judged by content, not bound to the category.

CategoryWhat kind of mailHandling
onboardingNew-customer entry mail — sign-ups, setup, etc.Reply draft + Drive archive
devCustomer↔dev back-and-forth (bugs, requests, QA)Reply draft + Drive archive
internalInternal alerts, to be summarizedIncluded in the daily summary (no draft)
ignoreSpam, newsletters, automated mailIgnore (mark-as-read candidate)
3 · Reply drafts

It only drafts — a person sends

  • For work mail (onboarding · dev), it drops a reply draft into the Gmail drafts folder
  • Provides a few recent sent messages as voice examples — it writes in your tone
  • It never auto-sends — a person reviews, edits, and sends from Gmail
  • Learned draft rules (draft_rule) & tone rules (tone_rule) are reflected in the prompt
Mis-send risk: 0.
It removes the "time to write" while leaving the decision to send with a person — as trust builds, per-category auto-send is planned.
4 · Drive archive

Auto-file work mail into project folders

So conversations don't scatter across clients, work mail is saved as a Google Doc in the project's Drive folder.

  • Under the shared drive FDE Build Projects, the LLM matches the client folder
  • Saves a Google Doc in the matched folder's Email subfolder (title, sender, date, body)
  • Sweeps the sent folder too, capturing the thread's full conversation in one document (archive_backlog)
  • If unsure, it doesn't save — pending, for a person to assign the project in the review chat
It doesn't force a classification.
It saves only when confident, and hands ambiguous cases to a person. (Dedup protection · no keyword matching.)
5 · Feedback learning

It learns "in the conversation," not in separate settings

The web review chat is the learning channel — natural-language feedback becomes a persistent rule injected into the next batch classification.

"Always ignore this sender"write_ruleStore a sender_rule
"No need to read newsletters like this"write_ruleStore a read_rule
"Change this mail to dev"set_thread_categoryOne-off fix (no generalization)
From the next poll, the rule is injected into the classification promptClosed loopLearn in chat, apply in batch

The review agent is a LangGraph tool-loop — rules are stored as structured DB memory and the LLM interprets & applies them (no keyword matching).

5 · Organizational memory

Rules it learns — 5 types

A criterion you give once accrues as a rule, so the same judgment is never asked again.

Rule typeWhat it learns
sender_ruleHandling for a specific sender/domain (fix a category, ignore, etc.)
category_ruleAdjusting the classification criteria
read_ruleConditions for mail that needn't be read (auto mark-as-read) — the heart of triage
draft_ruleWhether to draft and what to include
tone_ruleReply voice & tone

Rules are stored as shared memory (SoT), and every change is traced in AuditLog with its source.

5 · Review agent

The review chat's tools — view · learn · correct · archive

AbilityToolWhat it does
👁 Viewlist_recent_classifications · get_thread_detailCheck recent classification results & read status
🧠 Learnwrite_rule / update_rule / delete_ruleStore/update/deactivate rules (upsert · soft-delete)
✂ Correctset_thread_categoryOne-off fix for a single thread (no generalization)
📥 Readmark_thread_read / mark_thread_unreadMark an individual thread read / restore to unread
🗂 Archivelist_projects · list_pending_archive · archive_thread_to_projectSave pending mail with a person-assigned project
6 · Safeguards

Making an autonomous agent trustworthy — a 4-layer safety net

① It doesn't send

It only drafts; a person does the actual sending and final call. Mis-send risk 0. Uses only read + draft scopes (no send scope).

② It's reversible

Auto mark-as-read can be restored to unread, and every read/restore & rule change is recorded in AuditLog.

③ Dedup & runaway prevention

An idempotent cursor skips already-seen threads, and a draft cap (--max-drafts) blocks mass generation on the first run (the overflow runs next time).

④ When unsure, defer to a person

If a project match is uncertain, it doesn't force a save (pending); if need-to-read is uncertain, it conservatively treats it as "must read."

7 · Impact

Quantitative impact — giving back the time spent on mail

Based on an inbox of dozens to hundreds a day, savings vs. manual handling (varies with mail volume).

TaskBefore (manual)After (MailAgent)Savings
Skimming & clearing unneeded mail20–40 min/dayAuto mark-as-readMostly automated
Writing reply drafts5–15 min eachReview & edit 2–3 min~70%
Archiving customer mail3–5 min eachAuto-saved100% automated
Missing important mailBuried & delayedAlways visible in the inboxMiss risk ↓
8 · Tech stack

A single LLM backend on the lightest possible structure

Scheduled run

cron + Django management command (poll_inbox) — the lightest broker-free batch

LLM backend

OpenRouter (OpenAI-compatible) · anthropic/claude-sonnet-4 — swap models with one key

Review agent

LangGraph tool-loop (StateGraph · tool binding) · LangChain · LangSmith tracing

Web & backend

Django · Django admin supervision console · web review chat UI

Data

PostgreSQL — persists threads, drafts, rules, audit logs (local DB = SoT)

Google & shared

Gmail · Drive · Docs (standarda-core client) · OAuth gmail.modify

Design principle — "autonomy that doesn't send": leave the final call to a person while stripping away the repetitive labor before it

What's next

Per-category auto-send

Promote trusted categories from drafts to auto-send.

Rule-relevance filter

As rules grow, select only the relevant ones to inject into the prompt.

An agent that filters better as mail piles up

Thank you · chris@popupstudio.ai
navigate slides · F fullscreen · Home/End first/last