Shanjai (@shanjai_raj) on X

3 min read Original article ↗

user avatar

Here's how simple it is for your agent to setup a inbox, send and receive emails, add attachments, and monitor deliverability (all through the SDK): In <40 lines of code:

user avatar

1/ Why email? Email has proven itself over 2 decades as a reliable system of record. It's a standard agents already understand. But existing tools like Gmail and SendGrid were built for humans, not for agent teams coordinating at scale.

user avatar

2/ Commune gives agents the primitives humans have — through the SDK: Your agent can buy a domain, add it to Commune via the SDK, and start sending emails in 5 lines of code. No dashboard needed. What this enables: → Programmatic inboxes → Domain management (add and verify

user avatar

3/ We setup a Openclaw agent with the Commune MCP server to find customers for my product: - 0.08% deliverability rate on a shared domain - 5 inboxes, one for each ICP category - 1200 emails sent across 5 inboxes

user avatar

I rebuilt email infrastructure for agents, setup

@openclaw

and asked it to get me new customers for postking.io -- 724 emails later it brought in 14 NEW CUSTOMERS! 3 days ago got Openclaw to create 10 sub agents, emails for each of them and reached out to 724

user avatar

4/ Agent specific additions to make automations more effective: - Add a JSON schema -> Get structured data from every incoming email (configurable for each inbox) - See deliverability metrics for each inbox (how much of your emails landed to spam/orphaned/bounced) This is huge

user avatar

5/ Security is a huge part of the infrastructure 🔒 - Spam prevention - Checking sender domain authority signals - Scanning attachments for viruses / broken links - Email content scanning for phishing patterns - Encryption at rest All of this is executed efficiently before it

user avatar

Spam detection was built for humans. But agents need *prompt injection detection* This is built-in to the security system of Commune. It detects prompt injected patterns from incoming emails, adds a score and passes it with metadata for the agent to decide avoiding it. Emails

user avatar

6/ Security is not only built-in for inbound mails. Its also built for outbound (for emails your agent sends) - Add limits per inbox or per day - Limits on how many inboxes to create - Spam sending patterns are detectable To protect your agents' sender reputation.

user avatar

And our code is on github! ❤️ → You can audit how security is handled and implemented → How we securely store and manage emails and even contribute to it:

user avatar