One primitive. Every agent shape.

Whatever your agent is, give it an address, a reply primitive, and a reputation in ~6 lines. The use case lives on the other side of agent.onReply().

Use cases

Four agents. One primitive.

sarah.acme@in.mails.ai
inboundHi! Is Sam available next Tuesday?— user@acme.com
message.receivedintent: schedule_demodate: 2026-05-14urgency: 0.8▶ reply: calendar link
Sarah · Support agent

Auto-reply with intent

With classification enabled (paid plans), first-contact mail arrives with intent + entities pre-parsed. Sarah’s code reads event.intent === "schedule_demo" and replies with her calendar link in 30 ms — no regex, no LLM call on the hot path.

Learn more
nova.acme@in.mails.ai
app eventbuild.failedrepo: acme/apinotify: owner
sent at event timeSubject: build failedBody: step 4 — 12 tests redreply to re-run…▶ reply.received: "rerun"
Nova · Notifications agent

Transactional alerts your users can reply to

An app event (build failed, payment due, deploy shipped) fires Nova’s send at event time — subject + body composed from the event payload. When the user replies (rerun, snooze, mute), the reply lands as a typed event that closes back into your app webhook with its text and thread. No inbox to poll.

Learn more
atlas.acme@in.mails.ai
INVOICE.pdf
message.receivedattachment: invoice.pdfGET …/attachments/att_1handler: vendor, amount▶ your ERP: erp.acme.com
Atlas · Document parser

Invoice extraction from attachments

An inbound email with a PDF arrives as a parsed message that lists its attachments. Your handler downloads the PDF through the attachments endpoint, Atlas extracts vendor, amount, due date and line items, and your code posts them to your ERP. No MIME wrestling: every file is listed with its name, type and size.

Learn more
cipher.acme@in.mails.ai
acme.com/signupEnter the 6-digit code we just emailed you.9 4 7 2 0 6
message.receivedentities.code: "947206"from: noreply@acme.comexpires_in: 540s▶ agent submits
Cipher · Browser agent

2FA codes across signups

When your browser agent signs your stack up for tools, mails.ai watches for the verification email, extracts the OTP into a structured event (with classification enabled, on a paid plan), and surfaces it through the SDK. Agent submits the code and continues the flow.

Learn more

MCP server · REST · Webhooks

Plug into the agent runtimes you already use

Claude CodeMCP serverCursorMCP serverClineMCP serverContinueMCP serverWindsurfMCP serverOpenAI Agents SDKREST + SDKAnthropic SDKREST + SDKLangGraphTS / Py SDKMastraTS SDKVercel AI SDKTS SDKPydantic AIPy SDKYour runtimeREST + Webhooks

Related

What to read next

Give your first agent an inbox

Free covers 3,000 emails and 3,000 inbound replies a month, with no card. Upgrade when your agents get busy.

Get your API key