Solution

A prompt runs your inbox — no code.

Point support@yourapp.ai at a route with action "agent" and a prompt, and MailKite reads every inbound message, replies in-thread, and escalates anything it can't resolve to a human address you choose. No webhook, no server to run.

Why it fits

What you get

The prompt is the whole program

Set a route's action to "agent" with a prompt describing what to answer and when to escalate — there's no handler to deploy or maintain.

Replies thread correctly

The agent's reply goes out through the same Send API with proper In-Reply-To/References, so the sender sees one clean conversation, not a new email.

Escalation is built in

Set agentForwardTo and anything outside the prompt's scope forwards to a human address instead of getting a bad automated answer.

Same address, same account

It's a route on a domain you already control — swap it for a webhook or forward at any time without changing the address your customers use.

How it works

Three steps to live

  1. 1

    Write the prompt

    Describe what the agent should answer, how it should reply, and what to escalate — in the dashboard or via the API.

  2. 2

    Create the route

    Set action to "agent" on the address you want to automate, with the prompt and an agentForwardTo escalation address.

  3. 3

    Watch it work

    Inbound mail to that address is read, answered in-thread, or forwarded to the human address — nothing else to deploy.

Show me

create an agent route

No webhook to write — the route, the prompt, and an escalation address are the whole setup.

create an agent route
import { MailKite } from "mailkite";

const mk = new MailKite(process.env.MAILKITE_API_KEY);

// One route turns an address into an AI inbox agent — the prompt
// is the program, and unresolved mail escalates to a human.
await mk.createRoute({
match: "support@myapp.ai",
action: "agent",
agentPrompt:
"Answer billing and account questions for myapp.ai. Reply in-thread. " +
"Escalate anything you can't resolve to humans@myapp.ai.",
agentForwardTo: ["humans@myapp.ai"],
});
Install Docs →
In the box

What's included

Questions

Do I need to write a webhook handler?

No — that's the point of this route action. MailKite reads the inbound message, runs it against your prompt, and sends the reply or escalation itself.

What happens to mail the agent can't answer?

Set agentForwardTo to a human address; anything outside the prompt's scope is forwarded there instead of getting a wrong automated reply.

Is this different from giving my own agent an inbox over MCP?

Yes — this is a built-in agent you configure with a prompt and no code. For a custom agent you build and control yourself, connect it to a mailbox over MCP — see Email for AI agents.

Keep reading

Ready to build?

Start free on unlimited domains — no credit card. Or browse the other solutions.