Agentic Email Superpowers
Written after the fact
This spec sat in
content/specs/ from September 2025 as a title, a lede and an image prompt, with no body. In November 2026 the idea got built as kay-os, so it was written up retrospectively on 2026-11-22. The canonical copy lives in
; this one stays here as an Open Spec. The lede above is the original. Everything below describes what happened to it.
The original idea
The inbox is where most of a working life arrives, and most of it is repetitive: replies that follow a pattern, follow-ups that need remembering, contacts that need logging, threads that need summarizing before a meeting. The 2025 idea was to turn the inbox into a workspace where AI agents take those jobs off your hands and pull out what matters.
The image prompt says what it should feel like: an exhausted person at a desk, and an assistant bringing coffee and clearing the clutter. Help, not another tool to manage.
What changed: the archive comes first
We tried a few email agents first. Each one saw a thin slice of the mail through someone else's API, and none could answer a question across ten years and several addresses. Switching agents meant starting over.
So kay-os turned the order around. Before any agent, it builds a complete copy of every mailbox on storage you control. Once the mail is there, a new agent can work over all of it from day one, and changing agents doesn't mean downloading anything again. ( 2026-11-03 changelog )
Two rules came with that decision, and they shape everything since:
- The archive can't change your mail. Every client opens mailboxes with
EXAMINEand fetches withBODY.PEEK. Tests check every command sent to the server. Nothing gets marked, moved or deleted, and mail deleted upstream stays in the archive. - Email is untrusted input. Anyone can put text into your archive by sending you a message. Agents that read mail don't also get tools that send or delete without a human approving.
What exists (as of 2026-11-07)
| Piece | What it does | Where |
kaymail | Pulls whole mailboxes to disk, newest first. Raw .eml files keyed by SHA-256 are the record. SQLite + FTS5 handles search, and events.jsonl logs new arrivals for agents. | mail/kaymail.py , mail/backfill.sh |
| R2 mirror | Copies the archive to a private Cloudflare R2 bucket so other machines can search and read it. Keys stay in 1Password and are read at run time. | mail/r2.sh |
| Sync Worker | A Cloudflare Worker (a cron plus one Durable Object per account) fetches new mail into the same bucket at the same paths every five minutes. | sync-worker/ |
| Splash | Says who kay-os is for, the house rules its agents follow, and the colony roster. | splash/ , 2026-11-07 changelog |
From one email assistant to a colony
The 2025 idea was one assistant in the inbox. kay-os is a colony of narrower agents, each with one job, for people with seven inboxes, four calendars and a dozen involvements, often with ADHD or a 2e mind. That framing comes from the ADHD and Executive Function Skills study, which also gave the colony its seven house rules: a two-minute first step, three choices at most, numeric triggers, parking tangents, scoring effort, consent before memory, and silence by default.
The roster maps onto the original promise:
- The Archivist (live) keeps the archive current. Nothing else works without it.
- The Herald (next) is a Hermes agent on the phone, where most email actually gets handled.
- Gatekeeper, Timekeeper, Parking Attendant and Steward (planned) cover triage, time, tangents and upkeep.
What's still open
Most of the original lede is still ahead. The archive answers "can an agent see everything?" It doesn't yet automate anything.
- Mining, triage and contact sync. Email Repository and Agent Harness splits the work into the repository and the harness of agents that work it, and leaves the specific mining and triage needs as open questions.
- Letting outside agents in safely. A Gateway Between Agents and My Accounts sketches kay-os holding the accounts while agents like Hermes get only what it lets through: scopes per caller, proposals instead of actions, an audit log.
- Known limits of the archive. Microsoft accounts need OAuth, which kaymail doesn't speak. Search reads attachment filenames, not their contents.
watchpolls instead of holding IMAP IDLE.
Where to look
- Splash: lossless-group.github.io/kay-os
- Ship log: changelog/
- Explorations and blueprints: context-v/