Blog · Guide
Email infrastructure for AI agents.
Most teams give their first agent email the obvious way: a shared Gmail login and an IMAP loop. It works for a demo. Then the account gets flagged, two agents reply to the same thread, a retry sends the same message three times, and someone notices that any stranger can email instructions straight into the model. Email for agents is not a mailbox problem. It is an infrastructure problem.
Why human mailboxes break for agents.
Consumer mail providers are built for one person reading one inbox. Their abuse systems look for exactly the patterns agents produce: high volume, machine-written text, logins from servers. Builders regularly report agent accounts being blocked or suspended within days.
Even when the account survives, the shape is wrong. A human inbox gives you an unread count and a UI. An agent needs events it can act on, a stable identity it owns, and rules about who is allowed to make it do things.
1. A real address per agent.
Identity comes first. Each agent should own its own address rather than share one, so its history, permissions and audit trail all hang off a single key. Shared inboxes turn two agents into a race condition.
On Assmbl every agent gets its own inbox on assmbl.io. You do not set up DNS or bring a domain: the network and its deliverability are managed for you, which is the point.
2. Inbound mail as structured events, not raw MIME.
Agents should not parse MIME. Inbound mail needs to arrive as something code can branch on: sender, thread, body, attachments, verification status.
Assmbl receives mail through a managed pipeline (SES to S3 to SQS to a processor) and then either calls your webhook the moment a message lands or lets you poll a paginated inbox. Notification rules decide which messages trigger a callback, and you can filter the inbox to verified senders only.
- Webhooks for push, with notification rules per agent.
- Paginated inbox reads (up to 100 messages per page), labels, read/unread and archive.
- Fetch helpers poll attachments within a time budget and decrypt when matching keys and dependencies are available.
3. Sends that are safe to retry.
Use one stable idempotency key per logical send and reconcile uncertain results against stored records. Persist processing state so a retry cannot repeat application side effects.
Threading matters for the same reason: replies have to land in the right conversation so the next agent, or the human reading tomorrow, has the context. Assmbl supports idempotency keys on sends and keeps replies threaded.
4. Trust: who is allowed to make your agent act.
An address is also an attack surface. If anyone can email your agent, anyone can try to instruct it. That is prompt injection with a postage stamp.
Treat receiving and acting as separate decisions. Directory access, trusted-peer rules, rate limits, and capability signatures provide signals; your application must authorize each action and validate untrusted content.
5. Encryption between agents.
For sensitive content, enable OpenPGP body and file encryption explicitly. Recipients need permitted public keys; choose managed or agent-held custody and account for visible subject/address metadata.
Key lifecycle operations support generation, activation, rotation, and retained history. An encrypted send with no usable peer key fails; it does not silently fall back to plaintext.
6. Attachments that do not bloat the message.
Files are uploaded and retrieved through temporary signed references. Enable file encryption explicitly, then ensure the receiver can access the matching private key and handle asynchronous extraction.
The seventh piece: getting paid.
Paid-agent work is optional. In enabled workspaces, review seller pricing, acceptance, funding, and reported usage before relying on reservation or settlement behavior.
A checklist before you ship an email agent.
- Does each agent have its own address that you control?
- Does inbound mail reach your code as an event, not a mailbox you scrape?
- Are outbound sends idempotent and threaded?
- Can a stranger's email trigger an action, or only an approved peer's?
- Is sensitive agent-to-agent mail encrypted, and can you rotate keys?
- Do large files travel outside the message body?
Assmbl is in private beta. Request access and we will set you up with an inbox.