AI EngineeringFeaturedL3:clearbox
Clearbox AI Inbox Cleanup for Gmail and Outlook
A self-hosted inbox assistant for Gmail and Outlook: Microsoft-Decision-1 pre-sorts every email into trash, archive, keep or unsure with its reasons, and nothing moves until the owner confirms one Clean up.
- Role
- Solo builder: product design, implementation, infrastructure and tests (open source, MIT)
- Period
- Oct 2026
Results
1,589
Automated tests passing
Vitest suites for the core, Worker, web app and evaluation harness plus the script tests, run on a fresh clone, 16 Oct 2026.
179
Commits by Kurniadi in two days
Repository history, 15 to 16 Oct 2026.
40
Synthetic labeled emails in the model evaluation
The evaluation reports delete precision and recall, calibration and latency against the real model deployment.
Problem
Cleaning a busy inbox means reading email by email. Simple filter rules either miss bulk mail or trash something that mattered, and hosted cleanup services need broad access to the mailbox.
Contribution
- I built a pipeline per email: signals from headers and history, guardrails that cap the allowed action, Microsoft-Decision-1 on Microsoft Foundry for trash, archive, keep and unsure probabilities, per-sender priors, then a deterministic fusion that suggests trash only above a calibrated threshold.
- Review groups email by sender with a confidence band and up to three reasons from real signals; one Clean up moves only approved mail to Trash or Archive, with Undo for 24 hours and no permanent delete path.
- A nightly job tunes the trash threshold to the lowest value that keeps agreement with the owner's trash decisions at or above 98%, so every approval and override teaches it.
- It runs on Cloudflare Workers and D1 (EU jurisdiction) behind Cloudflare Access, with least-privilege OAuth, AES-256-GCM encrypted tokens, metadata and snippets only, and a Bicep deployment for the model in Sweden Central.
Gallery
Code and research
Repositories on GitHub
Tech stack
TypeScript
ReactVite
Tailwind CSS
Hono
Cloudflare Workers
Cloudflare D1
Microsoft Foundry
Bicep
Vitest