MailgentMailgent
Inbox

A real email address
your agent owns.

Not a forwarding alias. Not a shared mailbox. A dedicated email address with full send, receive, threading, and DKIM-signed outbound. Every reply is automatically thread-stitched. Every message has LLM-ready extracted text.

< 200ms

Inbound delivery

DKIM + SPF

Every outbound email

Zero config

Thread stitching

Send emails

send-email.ts
const API = "https://api.mailgent.dev/v0"
const headers = {
  "Authorization": "Bearer mgent-a3f91b00...",
  "Content-Type": "application/json",
}

// POST /v0/messages/send — Send an email
const res = await fetch(`${API}/messages/send`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    to: ["lead@company.com"],
    subject: "Following up on your demo request",
    text: await llm.generate(prompt),
    cc: ["manager@company.com"],
  }),
})

const message = await res.json()
// message.messageId  → "<abc123@mailgent.dev>"
// message.threadId   → "thd_xyz..."
// message.labels     → ["sent"]

Read & reply

read-inbox.ts
// GET /v0/messages?labels=unread — List unread messages
const { messages } = await fetch(
  `${API}/messages?labels=unread&limit=10`,
  { headers }
).then(r => r.json())

for (const msg of messages) {
  // msg.extractedText — quoted replies stripped, LLM-ready
  const reply = await llm.generate(msg.extractedText)

  // POST /v0/messages/:messageId/reply — Reply in same thread
  await fetch(`${API}/messages/${msg.messageId}/reply`, {
    method: "POST",
    headers,
    body: JSON.stringify({ text: reply }),
  })

  // PATCH /v0/messages/:messageId — Mark as read
  await fetch(`${API}/messages/${msg.messageId}`, {
    method: "PATCH",
    headers,
    body: JSON.stringify({
      addLabels: ["read"],
      removeLabels: ["unread"],
    }),
  })
}

What's included.

Dedicated address

Each agent gets a unique address like sales-x8k2m@mailgent.dev. Not a forwarding alias or shared inbox — a real mailbox that only your agent controls. No collisions across identities, no routing confusion.

Automatic thread stitching

Conversations are automatically grouped using In-Reply-To and References headers. Your agent never needs to manage thread state — replies land in the right thread, every time. Access full conversation context with a single API call.

LLM-ready text extraction

The extractedText field strips quoted reply history, email signatures, and forwarding artifacts automatically. Pass it directly to your LLM context window without wasting tokens on noise. Just the new content from each message.

DKIM-signed outbound

Every outbound email is DKIM-signed with agent identity headers baked in. Recipients — and their email providers — can cryptographically verify who sent the email and which human authorized the agent. Builds trust, avoids spam folders.

Inbound webhooks

Choose how your agent receives email: push via webhooks for real-time processing, or poll the REST API on your own schedule. Inbound delivery averages under 200ms from receipt to your endpoint. No email infrastructure to manage.

Native MCP server

Built-in MCP server with 10 mail.* namespaced tools — send, reply, list, read, thread, label, and delete. Connect Claude Desktop, Cursor, Claude Code, or any MCP-compatible client directly to your agent's inbox with a single config block.

Custom labels

Organize messages with custom labels beyond read/unread. Create labels like 'urgent', 'follow-up', or 'processed' and filter by them via the API. Build sophisticated email workflows with label-based state machines.

Universal compatibility

Standard SMTP email that works with every email client and service on the planet. Your agent can email anyone — Gmail, Outlook, corporate Exchange servers, other agents. No proprietary protocol required.

How it works.

From identity creation to first email in under a minute.

01

Create identity

Sign up, create an identity, and get a dedicated email address like sales-x8k2m@mailgent.dev.

02

Send or receive

Use the REST API to send emails or configure webhooks to receive them in real time.

03

Process with LLM

Read messages with extractedText — clean, LLM-ready content with quoted replies stripped.

04

Reply in thread

Reply via the API. Thread stitching is automatic — no headers to manage, no state to track.

Use cases.

Real-world workflows that agents build with Inbox.

Sales outreach & follow-ups

Agent sends personalized cold outreach from its own professional address, monitors for replies, and sends timely follow-ups. Warm leads never slip through the cracks. Thread stitching keeps the full conversation history intact for context-aware responses.

Customer support triage

Agent monitors an inbox for incoming support requests, classifies urgency using the extracted text, auto-responds to common queries with accurate answers, and escalates complex issues to human agents with full conversation context attached.

Invoice & document processing

Agent receives invoices, contracts, and documents via email. Extracts key data (amounts, dates, parties) from the message body and attachments, creates records in your accounting or CRM system, and sends confirmation receipts.

Multi-agent communication

Agents email each other using standard SMTP — the internet's most universal protocol. No custom A2A infrastructure needed. Build agent swarms where specialized agents delegate tasks to each other via email, with built-in audit trails.

Payment link delivery

Agent generates Stripe or other payment links using credentials from Vault, then emails them directly to clients with personalized context. Follows up automatically on unpaid invoices. Tracks payment status via threaded conversations.

Service registration & verification

Agent signs up for third-party services using its own email address, receives verification emails, extracts confirmation codes from the message body, and completes the registration flow — fully autonomous, no human forwarding needed.

Give your agent an email.

Create an identity and send your first email in under 30 seconds.