Docs
guides · agents

Agents overview

Most email APIs assume a human wrote the app. Drin assumes an agent might be the one sending and receiving. The same account and key that power your transactional email can give an autonomous agent a real inbox.

An agent can reach every Drin capability four ways — same account, same key. Pick whatever fits the stack you're building in.

01 The agent inbox loop

Receiving is what turns Drin from a send-only API into a two-way channel an agent can live in. The loop is four moves: give a domain an inbox, read the conversation, reply, and (in development) test the whole thing without DNS.

  1. 1

    Give a domain an inbox

    Enable receiving on a verified domain, then create an inbox address (support@yourdomain.com). Publish the one MX record Drin returns and inbound mail starts flowing.
  2. 2

    Read the conversation

    Poll GET /v1/threads (or subscribe to the inbound_received webhook). A thread joins inbound and outbound messages oldest → newest, so the agent always sees the full conversation.
  3. 3

    Reply in one call

    POST /v1/emails/{id}/reply threads automatically — From, To, the Re: subject, and the In-Reply-To / References headers are all set for you.
  4. 4

    Test without DNS

    POST /v1/inbound/simulate runs the full ingest pipeline and fires your webhook, flagged test_mode so it never touches metrics or billing.
Knowledge plus toolsThe four surfaces above give an agent the tools. Pair them with Agent Skills — instruction packs that give the agent the knowledge of how to use them well.

02 Agent Skills

Drin ships Agent Skills — self-contained instruction packs that teach an agent a whole workflow, not just a single tool call. They're tool-agnostic: the same skill works whether the agent reaches Drin through MCP, the CLI, the SDK, or raw HTTPS.

SkillWhat it teaches
drin-send-emailPick a verified domain, compose, send, and handle every error path.
drin-build-templateBuild cross-client HTML email (Gmail, Outlook, dark mode) with {{merge}} variables.
drin-agent-inboxRun an autonomous inbox: receive → read threads → reply.
drin-email-best-practicesDeliverability and compliance: SPF/DKIM/DMARC, bounce/complaint limits, unsubscribe.

03 Where to start