Architecture

15 posts on architecture for AI agents that send and receive email.

A message inside a message, with the author no longer on the thread

6 August 2026 · 4 min read

The forwarded message problem

A forward carries a stranger's words, a broken reply-to, and instructions the agent should not follow. How to parse one, who to answer, and why forwards break authentication.

Sending solved, receiving as the new half of the problem

5 August 2026 · 4 min read

You already send with a transactional provider. Now it has to receive

Resend, Postmark, SendGrid, and Mailgun send well. The moment an agent has to read replies you need threading, contact memory, and an inbox, which is a different product.

SES underneath, with the layer an agent needs above it

5 August 2026 · 4 min read

Building the agent's mail layer yourself on SES

SES is cheap and capable, and an agent needs a dozen things it does not provide. An honest list of what you would build, how long it takes, and when doing it is the right call.

An agent placed relative to an existing ticketing system

5 August 2026 · 4 min read

Where an agent fits if you already run a helpdesk

You already have a ticketing system and it is not going anywhere. Four ways to add an agent around it, which one to pick, and how to avoid two systems answering the same customer.

A small set of tools around one agent

4 August 2026 · 4 min read

Designing the tools your email agent calls

Most agent failures trace to tool design rather than the model: too many tools, vague names, errors that invite retries, and results that hand the model raw text. What good looks like.

Nine separate messages beside one that carries the same information

3 August 2026 · 4 min read

When an agent should send one email instead of nine

Agents can send a message per event, and usually should not. How to decide between immediate, batched, and digest delivery, and how to implement the batching without losing urgency.

Six stores, each holding a different kind of state

2 August 2026 · 5 min read

Where each piece of an agent's state belongs

Thread, contact, note, vault, your database, and the agent's own storage each hold a different kind of state. Putting something in the wrong one is why agents drift, repeat themselves, and contradict your systems.

Tenants each holding their own identity inside one workspace boundary

2 August 2026 · 5 min read

Giving every customer their own agent inbox

If your product runs an agent for each customer, each one needs its own address. How to provision at signup, keep tenants isolated, handle domains, and keep one tenant's mistake from reaching the others.

Forty messages arriving at once into a queue in front of one agent

31 July 2026 · 5 min read

What happens when forty messages arrive at once

Agent email is bursty. How to handle a queue of inbound mail without double-replying, racing on one thread, or spending your daily allowance in ninety seconds.

An agent moving from a person's mailbox to an identity of its own

28 July 2026 · 5 min read

Moving an agent off the Gmail API onto its own inbox

A migration plan for agents built on Gmail or Graph: what breaks at scale, how to move one flow at a time without a cutover, and what to do about history, tokens, and the old address.

Three messages linked into one conversation by their headers

28 July 2026 · 5 min read

How email threading actually works, and why agents break it

Threading is a convention held together by three headers and a lot of client guesswork. What they do, how agents break conversations, and why a broken thread is worse than a wrong answer.

An agent provisioning its own inbox and returning a claim link for a person

27 July 2026 · 5 min read

An agent that signs itself up for its own inbox

Autonomous agents need addresses before a human is available to create one. How self-signup works, what a claim URL is for, and the guardrails that make agent-provisioned inboxes safe to allow.

A webhook delivery starting an agent run the moment mail arrives

26 July 2026 · 5 min read

Webhooks or polling: how your agent should learn that mail arrived

A practical comparison of webhook-driven and polling agents, with signature verification, retry and idempotency handling, and the hybrid most production deployments end up running.

A conversation held open across days while the agent run ends and resumes

26 July 2026 · 5 min read

Long-running email conversations: waiting, timeouts, and resuming

Email conversations take days; agent runs take seconds. The patterns for holding a thread open, choosing timeouts, resuming with context, and knowing when to stop following up.

Several agent identities inside one workspace, sharing contacts but not inboxes

26 July 2026 · 5 min read

Running several email agents in one workspace

How to structure a workspace once you have more than one agent: address naming, what to share and what to isolate, handoffs between agents, and the failure modes that only appear at three or four.