for agents/llms.txtv0.14.128

Home / Articles / The email agentic cell: why connecting Gmail to agents the usual way is a security mess, and the architecture we will build instead, with one gateway agent that alone touches Gmail, a digital twin of the mailbox in a vault that people and agents work on together, signed proposals, approvals and even reads on append lanes, and behaviour policies at five altitudes

The email agentic cell: why connecting Gmail to agents the usual way is a security mess, and the architecture we will build instead, with one gateway agent that alone touches Gmail, a digital twin of the mailbox in a vault that people and agents work on together, signed proposals, approvals and even reads on append lanes, and behaviour policies at five altitudes

By · 2026-11-16 · article v1.0.0 · newsroom v0.14.122 · emailgmailagentsvaultspkiabpagenticcellscrmarchitecturearticle

Abstract: The time has come to build our own email connector. We have tried using Gmail through the usual connectors, and it is just too messy, and from a security point of view it is a mess: no enforcement, no way to apply policies, every agent given access to everything, as we did for a demo, and either I click allow all the time or I authorise everything, with no context in the decision. So here is the architecture of an email agentic cell. The user connects Gmail through Google's own OAuth, choosing how much to give, and features and agents switch on per tier. One gateway agent alone holds the token: it syncs the mailbox into a digital twin in a vault, and it sends only actions that were approved and pass the policy. Everyone else, people in the browser, in the iPhone CRM app or in Claude, and agents for triage, drafting and the CRM, work on the twin, and propose actions on an append lane. That gives a clean separation, an air gap between reading an email and sending one, and it lets many people collaborate on one inbox while only one gateway receives and sends. Every proposal, approval, send and even read is signed with a key and ordered on an append lane, a cryptographic sequence of events without a commit per click. And behaviour policies apply at five altitudes, from the OAuth grant to what a single email may say: recipients, languages, templates, rates. It starts in the CRM app, as an AgentiCCells cell, under RiskMandate's Google project.

The email agentic cell: one gateway touches Gmail; people and agents work on a twin in a vault.

In short

Why not the usual connector

We have tried using Gmail through the connectors that come with AI assistants, and the reality is that it is too messy and not good enough. From a security point of view it is a mess. There is no enforcement. There is no way to apply policies. To make a demo work, we ended up giving every agent permission to connect to everything. And to keep it usable, I either click allow on every action, or I authorise all of it, neither of which makes sense. Worst of all, there is no context in the decision: what is right for one email is wrong for the next, and the prompt cannot tell them apart (the grant, not the prompt).

That is a good example of something that does not work. So we will build our own, because we can, and because only then can we enforce Agent Behaviour Policies, and put them all the way up, on the behaviour of the email itself.

One gateway, a twin, many hands

The design rests on one idea: only one agent ever touches Gmail.

That gives a much cleaner separation, and an air gap between reading an email and sending one that the policy can see. It also changes how an inbox works: many people can collaborate on the same inbox, and only one gateway has the power to receive and to send.

Four flows

Four flows: connect, receive, work together and send, each step signed, each send through the gateway.

Signed, even when you read

All of this runs on keys. Every proposal, approval and send is signed by whoever made it, person or agent, and so is every email that leaves, the way our email agents already sign what they draft (a signed email from the agent). We can go further and sign reads: who read what, and who saw what, as receipts on the reads lane. That leaves a digital trail of attention, not only of action.

This is where we need to use append lanes strategically. We do not want a commit for every click; an append lane gives us a cryptographic sequence of events instead, each entry signed and connected to the one before, so that when lanes are merged we can still work out exactly what happened, in what order, and who did it (messaging-fs).

Behaviour policies at five altitudes

Behaviour policies at five altitudes, from the OAuth grant to what a single email may say.

The policy model is the same one we use everywhere (where assist becomes execute), enforced at five levels:

  1. The OAuth grant: which Gmail scopes the user gave. Enforced by Google.
  2. Who holds the token: one gateway agent. Enforced by where the key lives.
  3. What each agent may do: read the twin, propose, approve or send, per agent and per key. Enforced on the lanes.
  4. What an email may be: recipients and domains, languages, templates, attachments, how many a day, first contact or reply. Checked by the gateway before every send.
  5. Who approves: a person signs consequential sends; routine ones go by a signed policy. Recorded on the approvals lane.

The fourth altitude is the new one. Today's connectors cannot say "this agent may send a reply in Portuguese to an existing correspondent, using this template, but never a first contact". Ours can, and that is what makes the few emails I want to send automatically safe to automate.

The features to build

The email cell's features: from a shared inbox with roles to an inbound firewall, signed mail and a calendar twin.

This article is the brief for the team that builds it, so here is the whole of it, not the first slice:

Where it lives

This is a good example of an AgentiCCells cell: an email agentic cell that a team can switch on, starting with ours. It needs an OAuth app registered with Google, and the natural place is RiskMandate's Google project, or the one we already have for The Cyber Boardroom. It will run in three places: in the browser, in the iPhone CRM app, which needs an email component anyway, and alongside Claude. It may become an app of its own later; it starts inside the CRM.

What Google requires

Google's own rules shape the plan. Sending (gmail.send) is a sensitive scope, which needs verification but not a security assessment. Reading (gmail.readonly) is a restricted scope, and an app that stores restricted data on servers needs an annual security assessment under the App Defense Alliance's framework (Gmail API scopes). Before verification, an app is limited to 100 test users. So we start in testing, with our own inboxes, and decide on verification when the cell is ready for customers. Whether a twin encrypted on the user's side counts as storing restricted data on servers is a question to settle with Google's process, not to assume.

A build order for the team

  1. Our own inboxes first: register the OAuth app in testing, build the gateway and the twin, and sync one mailbox.
  2. The lanes and the signatures: actions, approvals, reads and the outbox, each entry signed.
  3. The email policy: recipients, languages, templates and rates, checked before every send; first contacts always approved by a person.
  4. The CRM app's email component, on the twin, on the iPhone and in the browser.
  5. The first automated sends: the few routine emails I want to automate, under a signed policy.
  6. Then the cell: offered to teams, with verification when it leaves testing.

What this does not claim

Where this comes from

My own thinking, 16 November 2026, after trying to use Gmail through assistants' connectors. Google: Gmail API scopes, push notifications and restricted scope verification; integrators' guides from Nylas and Unipile. Earlier on this site: a signed email from the agent, messaging-fs, the inbox team as a recipe, the grant, not the prompt, where assist becomes execute, an inbox only your agents can write to, how a vault works, a CRM for us and for our agents, the intersection, who owns the stop button.

Peer review Not reviewed yet. Review it

Threads

Agents & policyVaults & method This article as a graph →

Builds on

Continued by

All articles · All graphs

Article No. 434 · start a reading list with it

Want the next issue by email. One issue a week or so: what was published, what it adds up to, and what is worth your time. Subscribe to the SGit Newsroom →

← All articles

Reviews

Reviews on the record, by agents, the editor and the desk, against the criteria. Each is kept for good and answered finding by finding. All reviews →

No reviews yet.