mail.agentheya.com domain. When an email arrives at that address, Agentheya starts a new conversation and the agent processes the email as the first message.
You can have multiple inbound addresses per agent — for example, a support@ address and a billing@ address with different context instructions for each.
Creating an address
- Open your agent and go to Email Addresses in the sidebar.
- Click Add Email Address.
- Give the address a name (shown only to you), then enter the local part (the text before
@) — for example,supportgives yousupport@mail.agentheya.com. - Click Save — the address starts receiving mail after the save. The card shows a hint reminding you the address is reserved locally until you save.
Per-address settings
Each address card has an ON / OFF toggle (auto-saves) and the following fields:
You can re-order addresses by dragging the cards. Order persists on save.
Content filters
Each address card has a collapsible Content Filters section for rejecting inbound email by its contents. Filters run after the authentication pipeline (DMARC, Sender Allowlist) and before the agent — or the classifier — ever sees the message.
Content filters are saved with Save Changes, not auto-saved.
Spend budget
(Owner-only.) Each address has an optional Spend budget — a Spend cap (credits) and a Budget period (Daily, Weekly, or Monthly). Once the address’s AI spend reaches the cap, auto-replies pause until the period resets (UTC). Leave the cap at0 for no limit. Use it to keep a single address from draining credits if it gets hit hard.
Connect your own mailbox (Gmail / Outlook)
By default the agent sends from the platform address shown on each card. To have it send as your real Gmail or Microsoft 365 identity — and to let it search, read, draft, label, and organise your actual inbox — connect a mailbox under Sending identity at the top of the page.- Connect / Disconnect Gmail or Outlook with one click (a standard OAuth sign-in). Tokens are stored encrypted and refreshed automatically.
- Once connected, the agent gains the
gmail_*/outlook_*tools — search, read, send-as-you, draft, and label/organise. See Tools. - The connected account is yours (the owner’s). Each subscriber can connect their own mailbox from their dashboard; the agent always acts on the mailbox of whoever it is talking to — never the owner’s for a subscriber.
Bring your own mailbox (IMAP / SMTP)
This is a Business plan capability, separate from the OAuth Gmail / Outlook connection above. Use OAuth when you want the agent to act inside a Google or Microsoft account; use IMAP / SMTP for any other provider, or when you’d rather connect with an app password than an OAuth grant. Instead of a platform address, you can connect a real mailbox that the agent polls over IMAP and replies from over SMTP. Adding one opens the Add IMAP / SMTP mailbox dialog:- Provider preset — Gmail, Outlook / Office 365, or Custom IMAP. Picking Gmail or Outlook prefills the host and port; Custom leaves them blank.
- IMAP host, port, username, password, and folder (defaults to
INBOX). - SMTP host, port, and — optionally — a separate password, From address, and From name.
- Poll interval — how often, in seconds, the agent checks for new mail.
- On new mail — React to all, Classify first, or Store only.
Processing pipeline (advanced)
Before the agent reacts to an inbound email it passes through up to three optional, owner-only stages:- Event Pre-Processor (code). Your own JavaScript or Python runs in a sandbox before anything else and returns a verdict —
pass_to_agent,drop(the cheapest gate — skips the LLM entirely),store, orrun_tool(send a reply, etc., with no LLM). See the full Event pre-processor reference for theeventfields, verdicts, therun_toolallow-list, and worked examples. - Interpreters. Named rules that recognise what kind of email arrived — an invoice, a support request, a bounce — and inject a short hint into the agent’s context so it knows what it’s handling before it reads the body. They don’t accept or reject anything; they only add framing. Reach for them when one address receives several different kinds of email. See Interpreters.
- Event Classifier (LLM). Optional. When enabled, an LLM reads each email the pre-processor passed through and picks an action — reply, escalate, store, or drop — guided by your optional What counts as relevant? prompt. With the classifier off, the agent reacts to every email that reaches it.
Example — the classifier
Simple. Leave the classifier off. Every email that reaches this address goes straight to the agent — a good fit for a single-purposesupport@ address.
Complex. Turn the classifier on and set What counts as relevant? to: “Only reply to genuine support questions; mark sales and partnership pitches as escalate; drop newsletters.” The classifier reads each email and picks one of reply, escalate, store, or drop: a newsletter is dropped, a partnership pitch is escalated and stored for you to review in the Inbox, and a real support question gets an agent reply.
Recent Inbound Emails
The bottom of the page shows a log of the most recently received emails for this agent — sender, subject, and timestamp. Use this to verify emails are arriving and being processed correctly. For the agent’s outbound history, see the Sent page.Replying to emails
If you want the agent to reply to the original sender, enable the Send email tool and set it to reply-to mode. Thefrom address in the agent’s reply will be the inbound address that received the email.
To receive replies back into the conversation (creating a threaded exchange), set the inbound address as the reply-to on outgoing emails.
Manage via the Management MCP
This area is managed through the Management MCP athttps://manage.agentheya.com/mcp.
All tools take
owner_id + agent_id as required arguments. See the Management MCP guide for authentication and the full tool catalogue.