Email Inbox

An email inbox gives an agent its own address. Inbound mail starts a run; the agent replies in the same thread when it finishes.

Set Up an Email Inbox

email_inbox=True generates a unique @notifications.m8tes.ai address at creation time:

Python
from m8tes import M8tes

client = M8tes()

bot = client.agents.create(
    name="support inbox",
    instructions="Classify incoming emails as bug, question, or feature request. Reply to questions directly.",
    tools=["slack"],
    allowed_senders=["@acme.com", "vip@partner.com"],
    email_inbox=True,
)
print(bot.email_address)  # e.g. 3f2a9c1b8e4d7a60@notifications.m8tes.ai

An inbox is also provisioned the first time an agent proactively emails its owner (see Agent-initiated email), so an agent can have an email address without ever passing email_inbox=True.

Branding. Addresses are issued on @notifications.m8tes.ai, and agent mail sends under the m8tes name. Agents can run on your own domain instead. That is a setup we do with you, not an API field: email sales@m8tes.ai.

Quick create: run + inbox in one call

create_and_wait can create the agent, enable its inbox, run the task, and return the address in one response:

Python
result = client.runs.create_and_wait(
    message="process this week's signups",
    tools=["stripe", "slack"],
    instructions="you are an ops assistant",
    permission_mode="autonomous",
    email_inbox=True,
)
print(result.output)
print(result.email_address)  # forward emails here to trigger future runs

Allowed Senders

allowed_senders controls who can trigger the agent. Without it, only the API key owner's registered email can trigger a run. Email from any other sender is silently dropped (fail-closed).

Entries are exact addresses or @domain patterns:

Python
# Any @acme.com address, plus one specific partner
bot = client.agents.create(
    name="support bot",
    instructions="Handle support emails",
    allowed_senders=["@acme.com", "vip@partner.com"],
)

# Update later
client.agents.update(bot.id, allowed_senders=["@acme.com", "@partner.com"])

The Slack and iMessage inboxes apply the same allowlist model with their own fields (allowed_slack_senders, allowed_imessage_senders).

Multi-Tenant Sender Scoping

Set user_id to scope an inbox to one end-user. Runs it triggers carry that user_id, so the agent's memories, task history, and app connections stay isolated to that end-user. See Multi-tenancy.

Python
bot = client.agents.create(
    name="inbox bot",
    instructions="Process incoming emails for this customer",
    allowed_senders=["alice@customer.com"],
    user_id="alice_123"
)

This scoping model is shared by all inbox channels: one agent per end-user, each with its own allowlist and user_id.

Agent-Initiated Email

Email is not one-way. Any first-party agent can email its owner mid-run (to flag a finding, ask for a decision, or hand off a result) via the built-in send_email_to_user tool. No setup needed.

  • Owner-only. The recipient is always the account owner, never an arbitrary address.
  • Rate-limited. 3 proactive emails per agent per 24 hours.
  • First-party only. Unavailable on runs scoped to an end-user via user_id.
  • Reply to continue. A reply lands back in the same run, so the agent picks up where it left off.

The first proactive email also provisions a reply inbox for the agent.

Next: Webhook Triggers · Scheduling · Read-only Inbox

Was this page helpful?