← All patterns Pattern . personal automation architecture

End-to-end email automation.

A personal architecture for turning an inbound message into a grounded, reviewed draft. Built on my own infrastructure as a capability demonstration, not a description of any employer process.

4 stages, inbox to reviewer 2 models in the loop Human owns every send Personal architecture, synthetic inputs
The loop

An inbound message starts the whole thing.

When a message arrives, an agent picks it up. It fetches the attachments, reads the content, and works out what is actually being asked. From there it searches across the knowledge systems it has access to and, where a question is deep enough to deserve it, delegates a focused research task rather than guessing.

What the agent does

  • Fetches the attachments and pulls their text into context.
  • Reads the message and classifies the intent behind it.
  • Searches across connected knowledge systems for grounding.
  • Delegates deeper questions to a dedicated research step.

Why it is built this way

  • Grounding first. Retrieval happens before any drafting.
  • Separation of concerns. Reading, research and drafting are distinct steps.
  • Auditable. Each step leaves a trace you can inspect.
Grounding before drafting

It does not write until it has something to stand on.

Only once the answer is well grounded does the agent draft a reply. The draft is written against the retrieved evidence, not against a vague memory of the topic. At the same time it proposes which attachments belong with the response, so the human is not left hunting for the right file.

Inbound message Fetch + read Search + research Grounded draft Proposed attachments
Self-review

A second model reviews the draft until it goes quiet.

The draft does not go straight to a person. It runs through a self-review loop where a second model reads it critically and returns comments. The first model revises, the reviewer reads again, and the cycle repeats until the reviewer has no further comments. The loop is bounded, so it always terminates with a clean output rather than circling forever.

Draft model
Writes and revises the reply against the retrieved evidence.
Review model
A second model reads the draft and returns concrete comments.
Exit condition
The loop stops when the reviewer has nothing left to flag.
Tooling
Microsoft 365 and Glean for knowledge access; Codex as the review model; n8n for orchestration.
The human owns the decision

The machine prepares; the person decides.

What lands in front of a human is a clean, grounded draft with its attachments already proposed. The human reviews it, edits if needed, and decides whether and when to send. The automation removes the fetching, reading, searching and first-pass drafting. It does not remove the judgement, and it is not allowed to send on its own.

This page describes a personal architecture and capability pattern built on my own infrastructure with synthetic inputs. It is not a description of any employer's live process, and it carries no client or confidential material.