Sign in
← Back to the blog

Multi-tenant email for AI agent platforms

How does an AI agent platform give every client its own inboxes, domain, keys and sending reputation without one client hurting another?

The short answer

An AI agent platform gives each client its own email by putting every client in a separate container that holds their inboxes and agents, and sends under its own reputation at the mail provider. In Zurchin that container is a pod: one call at a client's signup makes the pod, a second makes its first inbox in it, and one client's bounces are measured on that pod's own sending tenant. Inboxes and pods are free; what bounds abuse is the pace at which addresses are created and mail is sent.

What a platform owes each client

A platform's agents write to its clients' customers, in its clients' names. So the email layer has four things to keep apart, and a label in your database keeps none of them apart:

  • Addresses. Client A's agent must never read client B's mail, even by a bug in your code.
  • Domains. Each client wants mail to come from their own domain, often a subdomain such as agents.client.com.
  • Keys. The credential client A's agent runs with should be unable to reach client B, so a leak is one client's incident.
  • Reputation. When one client's agent mails a list of dead addresses, the damage should stop at that client.

A pod per client

A pod is a tenant inside your account. Agents, domains, inboxes and Auth sites each live in one, and every account has a default pod for anything made without naming one. Zurchin sends on Amazon SES and gives every pod its own SES tenant, so bounces and complaints from a pod's mail are counted against that pod at the provider.

Billing, the team, verification and Zurchin's reputation stay with the account: a platform answers for its clients as one operator.

Provisioning a pod

The calls belong in your own signup handler, made with your admin key: POST /v1/pods with a name, unique in your account, then POST /v1/email/inboxes with that pod_id for the client's first inbox. A second pod for the same client name is refused, so a retried signup cannot make two.

A key can be limited to one pod: it then reads, sends and makes inboxes only in that pod, and cannot make pods. Making such a key is coming; keys made in the dashboard today reach the whole account, so until then the client's agent should run on your server, not hold a key of its own.

A test key can be made beside the live one, so your CI runs each client's flow without any mail leaving Zurchin.

The client's own domain

Inboxes can live on a client's own domain once your account has proved it, with the same _pidgeon TXT record Passport uses. Turning mail on for it returns the records to publish: MX for receiving, three DKIM records for signing, SPF, and an advised DMARC record. Inboxes there send once DKIM is verified. The MX moves all of the domain's mail to Zurchin, so for a client whose company mail lives elsewhere, use a subdomain such as agents.client.com.

Domains' mail settings belong to the whole account, so they take a key of the whole account: your server sets them up, not the client's agent. There is no limit on how many domains you add.

Free inboxes, and what bounds abuse

Inboxes are unlimited. That is safe only because the costs are bounded somewhere else, and a platform should know where:

  • Creating addresses is paced: at most 50 new inboxes an account a day on zurchin.email. On your own domains there is no daily limit.
  • Sending is capped per five minutes and per day by the account's reputation: from 50 recipients a day for unverified to 2,000 for good. A flagged account's mail waits for a person; a suspended one sends nothing.
  • Hard bounces and complaints suppress the address, and a later send to it is refused rather than sent.
  • Mail past the free 1,000 a month answers 402 until usage billing is on.

These are the account's, not the pod's, and that is the limit worth knowing. Reputation at the provider is per pod, but the sending caps, Zurchin's reputation for the account, the rules and the do-not-send list belong to the whole account. One client's volume spends your account's daily allowance, and an address one client bounced is suppressed for every client.

Offboarding a client

Delete the client's inboxes; each address is retired for good and never given out again. Deleting conversations removes their mail and files for good. Keep inbox deletion out of your agents' tools: an agent deleting inboxes deletes mail in bulk, so your server makes these calls and your agents do not.

Start

Zurchin Email covers inboxes, domains, keys and pods.

Questions

What is a pod in Zurchin?

A tenant inside your account, one per customer of yours, that holds their agents, domains and inboxes. Mail sent from a pod goes out under that pod's own tenant at the mail provider, so one customer's bounces are counted apart from another's.

Can a client's agent reach another client's mail?

A key of one pod reaches only that pod. Making such keys is coming; until then, keep the keys on your server, where your code decides which pod's inboxes each client's agent may use.

Are sending limits per pod?

No. Reputation at the provider is per pod, but the sending caps, Zurchin's reputation for the account and the do-not-send list belong to the whole account.

Can a client use their own domain?

Yes, once your account has proved it. Its mail is set up with a key of the whole account, and there is no limit on how many domains you add.