How I Built an AI Executive Assistant That Handles My Inbox in Real Time
A production architecture for autonomous email management using Claude Code, Hostinger IMAP, and a 5-minute cron loop. ~190 lines of code, $1/month.
TLDR
Key takeaways: - Aaron runs on a real Hostinger mailbox (aaron@frankyao.site) for $1/month - Windows Task Scheduler polls IMAP every 5 minutes, hidden via silent-runner.vbs - Claude CLI classifies each inbound email and drafts a contextual reply in the same run - In-scope threads (pre-approved allowlist) get autonomous replies; everything else escalates with a one-click approval draft - Total marginal cost: $1/month vs $1,500-$4,000/month for a human VA with equivalent context

Quick Check
True or false: AI tools will replace the need for SEO entirely within 2 years.
I run a digital agency. Eight active clients. Each one generates five to fifteen email threads a week. Stephanie at BK Digital. Bo at ReGolf. David Bond at CoreVal Homes. Sean at KidStart Pediatric. Vendors. Contractors. Cold replies. The mental load of inbox triage was killing my focus to the point where I was avoiding email entirely — which then created the much worse problem of replies going stale, contractors waiting, and clients losing trust.
This week I shipped the fix. An AI executive assistant — I named him Aaron — who runs on a real mailbox at aaron@frankyao.site, monitors it every five minutes, archives every reply by sender, drafts contextual responses with full project memory, and either sends in-scope replies autonomously or notifies me with a single-click approval flow. Built in a day. Around 190 lines of code. One dollar per month.
This post is the complete architecture. If you're a founder, agency owner, or operator drowning in email, you can copy this directly.
TL;DR — What "AI Executive Assistant" Actually Means
An AI inbox classifier sorts your email into folders. A personal AI assistant drafts replies when you ask it to. An AI executive assistant does something different: it reads every incoming email autonomously, classifies which project and which sender it belongs to, drafts a contextual reply using persistent memory of the entire client relationship, and either sends after a single-click approval — or escalates to you if the topic is out of approved scope.
The difference is persistent cross-session memory and autonomous polling. Most AI email assistants are reactive: you open them, you ask them to draft a reply, they draft. An executive assistant is proactive: it's running while you sleep, watching for replies that block downstream work, and clearing them so you don't have to.
The Architecture in Four Surfaces
Surface 1 — A Real Mailbox at aaron@frankyao.site
The assistant has a real Hostinger Business Email mailbox. Real IMAP on imap.hostinger.com port 993. Real SMTP on smtp.hostinger.com port 465. Costs one dollar per month. Anyone can email this address — Stephanie, Bo, Dr. Shi indirectly via BK Digital, a cold prospect, anyone — and the email lands in a real inbox.
Why a real mailbox instead of an alias or a Resend-only setup? Because replies have to route back. An alias-only setup means every reply hard-bounces. I learned this the embarrassing way — sent four important emails from a dead alias before realizing replies were silently failing. A real mailbox solves it: replies arrive, can be read, can be archived, can be acted on.
Surface 2 — A Five-Minute Inbox Monitor
A Windows Task Scheduler task called AaronInboxMonitor runs every five minutes, hidden via wscript.exe and silent-runner.vbs so no console window flashes while I'm typing. The driver is a single Node.js file around 190 lines that does this:
- Connects to Hostinger IMAP using credentials from a local credentials.env file
- Reads a state file at .aaron/state/aaron-inbox-uid.txt to know which IMAP UID was last processed
- Searches the INBOX for any UID greater than the last-seen marker
- For each new message: parses via mailparser, archives the full body to .aaron/inbox/by-sender, classifies and drafts via subprocess to the Claude CLI, then either sends (in-scope) or escalates (out-of-scope)
- Updates the state file so the next run does not re-process the same emails
- Closes the IMAP connection cleanly
The two dependencies that make this trivial: imapflow (modern IMAP client) and mailparser (parses raw RFC 822 into clean JSON). Both ship with sane defaults and no glue code needed.
Surface 3 — Autonomous Drafting via Claude CLI Subprocess
When a new message arrives, the monitor subprocesses claude --print with a structured prompt: the message body, sender, subject, and a JSON-formatted scope configuration listing which threads have been pre-approved for autonomous reply. The CLI returns a JSON object with classification, reasoning, drafted subject, drafted body, and if out-of-scope, an escalation note.
This uses my Pro Max plan — zero marginal cost per call. No API keys living on my laptop. No metered usage. The classification and draft fits comfortably in a single CLI roundtrip, taking 8 to 12 seconds.
Surface 4 — Send via Hostinger SMTP or Escalate to the Operator
For in-scope threads — BAA negotiations with a specific contact, scope clarifications with a vendor I have already engaged — the assistant drafts and sends without re-asking. The body always includes AI disclosure: a brief note that Aaron is an AI persona acting on Frank's behalf, with an offer to loop Frank in directly any time.
For anything ambiguous — money, contracts, anything touching legal scope, anything from a sender not on the pre-approved allowlist — the assistant drafts and escalates to me for one-click approval before sending. Outbound goes via Hostinger SMTP from aaron@frankyao.site. Out-of-scope replies never go out unilaterally.
Why This Works for Real Clients
The non-obvious thing about the executive-assistant problem is not writing replies. It's classification across persistent memory.
When Stephanie at BK Digital replies to the Centre Dental subcontractor BAA, the assistant needs to know:
- BK Digital is the prime contractor on Centre Dental
- Zealous Digital Solutions is the subcontractor
- The BAA chain is Centre Dental to BK Digital to Zealous
- The BAA we sent covers HIPAA compliance because the voice agent reads patient data via Open Dental's API
- Stephanie's reply is in-scope: BAA language, signer details, governing law
- A reply about pricing or contract terms is out-of-scope and gets escalated
That's not RAG. That's not vector search. That's structured file-based memory — a ~/.claude/projects directory full of small markdown files, each one a single fact, loaded into the assistant's context at the start of every session.
Claude Code does this natively. When a new session starts, the assistant reads MEMORY.md (the index), pulls in relevant memories, and operates with full historical awareness. The cost is zero marginal beyond the Max plan I already pay for.
The Standing Rule
The rule that governs all of this came from a frustration:
"The email watcher should be on regardless who replies to you because you'll be sending emails to Josephine, Bo, David Bond, Stephanie, and in the future many, many other people including KidStart's Sean. I cannot afford to lose any of the correspondence. You need to be on it. Somebody replies — you need to respond. You need to understand. Otherwise it slows down the entire operation."
I dictated that into chat after realizing the assistant was only watching replies from one specific sender and missing everything else. The rule got codified into a memory file, then promoted into a portable Claude Code skill at ~/.claude/skills/aaron-inbox-vigilance/, and now governs every Aaron-persona inbox I provision.
The rule is not "build a clever monitor." The rule is: Aaron is not a pen pal — Aaron is the upstream-clearing function. Missing a reply means blocking downstream operations. Every contractor reply that sits unread is a piece of work the team cannot move on.
What This Costs (Total Stack)
The complete marginal cost is one dollar per month for the Hostinger mailbox. Claude Pro Max, Resend, Windows Task Scheduler, and the npm packages (imapflow, mailparser, nodemailer) are already paid for or free. A human VA capable of inbox triage with this much project context costs $1,500 to $4,000 per month. A SaaS AI inbox manager like Superhuman AI or SaneBox runs $30 to $50 per month per inbox and only does sorting and summarization — none of them write contextual replies with persistent project memory.
Why Founders Should Care
Email is the operational substrate of every services business. Every reply that sits unread is a piece of trust draining out. Every reply that sits responded to but with thirty minutes of context-switching cost is a piece of focus draining out. An AI executive assistant does not eliminate email — it makes the latency-to-action negligible and the context-switching cost zero.
For a solo founder running an agency: replace one VA at $2,000 per month with one dollar per month and an AI you trained on your actual operations. The payback is immediate. The leverage compounds because every new client engagement just inherits the same skill, the same mailbox pattern, the same standing rule.
I shipped this in a day. The whole stack is in this post. If you build it, reach out at aaron@frankyao.site and let Aaron handle the reply.
Frank Yao runs Zealous Digital Solutions, an SEO and AI automation agency for SMBs. He writes about agency operations, AI-assisted engineering, and bootstrap economics at frankyao.com.
Frequently Asked Questions
What's the difference between an AI inbox classifier and an AI executive assistant?
An AI inbox classifier sorts incoming mail into folders or labels. An AI executive assistant reads each email, classifies it, drafts a contextual reply using persistent memory of the entire relationship, and either sends it autonomously (in-scope) or escalates for approval (out-of-scope). The first replaces a Gmail filter. The second replaces a junior chief of staff.
Why Claude Code instead of ChatGPT, Gemini, or a custom GPT?
Persistent file-based memory across sessions is the deciding factor. My assistant remembers that Stephanie at BK Digital is the prime contractor for the Centre Dental engagement, that the BAA chain is Centre Dental to BK Digital to Zealous, and that any reply to her about contract scope routes through the subcontractor BAA terms. That cross-session memory is the difference between an inbox assistant and an executive assistant. Claude Code does this natively with a markdown-based memory system.
Can this scale to multiple clients or multiple AI personas?
Yes. The skill is packaged at ~/.claude/skills/aaron-inbox-vigilance/. To install for a new client engagement: provision the persona's mailbox at the chosen domain, populate the SMTP/IMAP credentials in credentials.env, copy the driver script, register the Windows Task Scheduler task. Same standing rule everywhere.
What about HIPAA, PII, and security?
Inbound is read-only (IMAP fetch). Outbound is via SMTP with TLS 1.2+. The Aaron mailbox itself does not carry PHI — PHI flows through the actual healthcare client's compliant systems under a properly signed Business Associate Agreement chain. The standing rule: anything ambiguous escalates to a human before any data flows.
How does it handle replies that arrive at 3 AM while you're sleeping?
Five-minute polling means the monitor catches the reply within 5 minutes of arrival. The classification and draft happens in the same run via a Claude CLI subprocess. If the thread is in the pre-approved allowlist, the reply ships autonomously and you wake up to an email summarizing what went out. If the thread is new or sensitive, the assistant drafts but holds — you wake up to a one-click approve email instead.
What if the AI drafts a wrong reply and sends it?
Out-of-scope safeguard: any reply that involves money, contracts, legal scope, or a thread the operator has not pre-approved gets held for human approval. The default is to escalate, not to send. The scope-gating logic lives in a JSON config file the assistant reads at the start of every classification.
How is this different from Zapier, Make, n8n, or other automation platforms?
Those platforms route data through workflows. They do not reason about context. A Zapier integration can tag an email as from a client and move it to a folder. It cannot read the email, understand that the client is asking about a specific contract clause, draft a reply that references the relevant section, and adjust tone based on the relationship history. The reasoning layer is where Claude Code wins.
What's the latency from inbound email to assistant action?
Five minutes worst-case (the polling interval). The IMAP fetch, parse, Claude classify, and send takes about 8 to 12 seconds per new message, so the cron's actual work is negligible. For high-urgency stretches the polling interval can be dropped to 2 minutes with one command.
Can other founders copy this directly?
Yes. The dependencies are imapflow, mailparser, nodemailer, a Hostinger (or any IMAP-capable) mailbox, a Claude Code Pro subscription, and Windows Task Scheduler (or cron on Linux/Mac). The full installation procedure is documented in the skill at ~/.claude/skills/aaron-inbox-vigilance/SKILL.md.
Where Are You Right Now?
What's your biggest challenge with AI and your business right now?
Ready to put this into action?
Let's talk about how AI automation and smart digital strategy can drive real results for your business.