> ## Documentation Index
> Fetch the complete documentation index at: https://docs.drin.run/llms.txt
> Use this file to discover all available pages before exploring further.

# Agents overview

> Give an AI agent its own email address — to send, receive, read threads, and reply. Reach Drin over MCP, the CLI, the SDK, or framework adapters.

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.

<CardGroup cols={2}>
  <Card title="MCP server" icon="plug" href="/agents/mcp">
    `npx @drin00/mcp` exposes **54 tools** over the Model Context Protocol — drop it into Claude, Cursor, or any MCP client.
  </Card>

  <Card title="CLI" icon="terminal" href="/agents/cli">
    `npx @drin00/cli` — full mutation surface with `--json` output, ideal for tool-using agents and CI. It can also launch the MCP server (`drin mcp`).
  </Card>

  <Card title="TypeScript SDK" icon="code" href="/sdk/typescript">
    `npm install @drin00/sdk` — a typed client for agents written in TS/JS, with retries and webhook verification.
  </Card>

  <Card title="Framework adapters" icon="bolt">
    Ready-made tools for LangChain, CrewAI, AutoGen, the Vercel AI SDK, and n8n — wired to the same key.
  </Card>
</CardGroup>

## 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.

<Steps>
  <Step title="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.
  </Step>

  <Step title="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.
  </Step>

  <Step title="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.
  </Step>

  <Step title="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.
  </Step>
</Steps>

<Tip>
  **Knowledge plus tools.** The four surfaces above give an agent the **tools**. Pair them with [Agent Skills](/agents/skills) — instruction packs that give the agent the **knowledge** of how to use them well.
</Tip>

## Agent Skills

Drin ships [Agent Skills](/agents/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.

| Skill                       | What it teaches                                                                       |
| --------------------------- | ------------------------------------------------------------------------------------- |
| `drin-send-email`           | Pick a verified domain, compose, send, and handle every error path.                   |
| `drin-build-template`       | Build cross-client HTML email (Gmail, Outlook, dark mode) with `{{merge}}` variables. |
| `drin-agent-inbox`          | Run an autonomous inbox: receive → read threads → reply.                              |
| `drin-email-best-practices` | Deliverability and compliance: SPF/DKIM/DMARC, bounce/complaint limits, unsubscribe.  |

## Where to start

<CardGroup cols={2}>
  <Card title="Set up the MCP server" icon="plug" href="/agents/mcp">
    The fastest way to give an agent email — one command, one key, 54 tools.
  </Card>

  <Card title="Drive it from the CLI" icon="terminal" href="/agents/cli">
    Every tool is also a command — scriptable, with `--json` for machine-readable output.
  </Card>

  <Card title="Install Agent Skills" icon="robot" href="/agents/skills">
    Teach the agent the workflows, not just the tools.
  </Card>

  <Card title="Build with the SDK" icon="code" href="/sdk/typescript">
    A typed client for agents written in TypeScript or JavaScript.
  </Card>
</CardGroup>
