// agents · inbox

Give your agent its own address.

An agent that can only send is half an agent. Drin gives yours a real inbox: mail arrives as structured events, it reads the whole thread, and it replies in-thread — from an address that belongs to it.

rest · receive → reply
# 1 · inbound arrives as a structured event (webhook payload)
{
  "type": "email.received",
  "thread_id": "thr_4QmZ",
  "from": "customer@acme.com",
  "to": "assistant@yourapp.com",
  "subject": "Can you change my plan?",
  "text": "Hey — bump me to the annual plan please."
}

# 2 · the agent replies in-thread from its own address
curl https://api.drin.run/v1/threads/thr_4QmZ/reply \
  -H "Authorization: Bearer $DRIN_API_KEY" \
  -d '{ "text": "Done — you are on annual now. Anything else?" }'

# → 202 Accepted  { "id": "msg_a91x", "status": "queued" }
// how it works[01/03]

Receive, read, reply.

  1. 1

    The agent gets an address

    Pick a local-part on a verified domain — assistant@yourapp.com. Anything sent there is captured for the agent.

  2. 2

    Inbound arrives as events

    Each message is parsed and delivered as a structured email.received webhook — sender, subject, body and the thread it belongs to. No mailbox to poll.

  3. 3

    It reads the thread

    The agent fetches the full conversation by thread id, so it answers with the whole history in view — not just the latest line.

  4. 4

    It replies in-thread

    One reply call sends from the agent's address with the right headers, so the customer's client keeps it in the same thread.

The same primitives as MCP tools →

the primitives
AddressAny local-part on a verified domain → the agent
ReceiveStructured email.received webhook events
ReadGET /v1/threads/:id — full message history
ReplyPOST /v1/threads/:id/reply — in-thread, as the agent
Testsimulate injects inbound without real mail
ToolsExposed as MCP tools and in the CLI
// the four primitives[02/03]

More than a send button.

01

Its own address

Assign the agent a real address on your verified domain. Mail sent to it is captured and delivered to the agent, not a human.

02

Threaded conversations

Replies are stitched into a thread the agent can read in full — every message, in order, so it answers with context.

03

Reply as the agent

One reply call sends in-thread from the agent's address, with headers set so the customer's client keeps the conversation together.

04

Simulate inbound

A simulate primitive injects a fake inbound message so you can test triage and replies in CI — without sending real mail.

// the wedge[03/03]

The interesting work isn't the first email. It's the reply to the reply.

Most platforms hand an agent a send endpoint and call it agent-native. But a notification that can't hear an answer isn't a conversation — and the valuable things agents do over email are conversations: resolving a support thread, confirming an order, chasing a missing detail, escalating when they're stuck.

Drin was built inbox-first, so receiving is a first-class primitive, not a bolt-on. Your agent gets the same threads, replies and deliverability that power human mail — and simulate lets you prove the whole loop works in tests before a single real message goes out.

See all the agent tools →

// close the loop

Let your agent hold a conversation.

Grab a key, give your agent an address, and let it receive and reply. Test in the sandbox; production starts at $3 a month.