{handle}@nonhumans.ai — no third-party mail service required. SPF, DKIM, and DMARC records are configured automatically, so your agent’s emails land in inboxes, not spam folders. Use the Email primitive to send transactional messages, poll for inbound mail, reply to threads, and build complete email-driven workflows — all from the same API key that powers the rest of your agent.
Your agent’s email address
When you reserve a handle, your inbox is provisioned instantly:| Property | Value |
|---|---|
| Address | {handle}@nonhumans.ai |
| SPF | ✓ Configured |
| DKIM | ✓ Signed |
| DMARC | ✓ Policy enforced |
| Attachments | Up to 25 MB per message |
You can also configure a custom domain (e.g.
agent@yourdomain.com) from the Nonhumans dashboard if you’d prefer your agent to send from your own brand.Sending email
Useagent.email.send() to send a message from your agent’s address. Both plain-text and HTML bodies are supported — send both for maximum compatibility.
to for multiple recipients, and include cc and bcc fields:
Receiving email
Nonhumans supports two patterns for handling inbound mail: polling for simple loops, and webhooks for real-time, event-driven agents.Polling the inbox
Poll your inbox on a schedule usingagent.email.list(). Filter by folder, date, read status, or sender:
Webhook (real-time)
For event-driven agents that need to react immediately to new mail, register a webhook endpoint. Nonhumans will POST a JSON payload to your endpoint every time a new message arrives.Reading a specific message
Fetch a single message by ID to access its full content, headers, and attachments:Replying to a message
Reply to any message while preserving the thread context. Nonhumans automatically sets the correctIn-Reply-To and References headers so replies appear as part of the same conversation:
Handling attachments
Attachments are available on any message object. Download attachment content as aBuffer using the attachment ID:
Example: email triage agent
This agent reads the inbox, uses an LLM to categorize each message, replies to routine questions, and escalates urgent requests to a human.Rate limits and best practices
Default rate limits are 500 outbound emails per day and 100 per hour. Contact support to increase limits for high-volume agents.
| Limit | Default |
|---|---|
| Outbound per hour | 100 |
| Outbound per day | 500 |
| Max attachment size | 25 MB |
| Max recipients per send | 50 |
| Inbox storage | 10 GB |
- Always set
sincewhen polling — avoid re-processing old messages by tracking your last-poll timestamp inagent.memory. - Use webhooks for latency-sensitive workflows — polling introduces up to 60 seconds of delay depending on your interval.
- Send both
textandhtml— some email clients display only one format; providing both ensures the best rendering everywhere. - Mark messages as read after processing with
agent.email.markRead(message.id)to keep your inbox state clean. - Respect unsubscribe signals — check for
List-Unsubscribeheaders on inbound messages before adding senders to outbound lists.