Classify incoming emails by urgency, topic, and sentiment in real time. Route to the right team instantly and send acknowledgments automatically.
Manual ticket triage creates bottlenecks that cascade through your entire support operation. A single person scanning emails becomes the chokepoint — urgent issues wait behind routine questions, misrouted tickets bounce between teams, and customers receive no acknowledgment for hours. As volume grows, the problem compounds.
MultiMail lets your AI agent read every incoming email, classify it by urgency, topic, and sentiment, then route it to the appropriate team — all within seconds of arrival. With monitored oversight, the agent operates autonomously while your team maintains full visibility into every classification and routing decision.
Your AI agent monitors the support mailbox via MultiMail's inbox API or webhooks. Every new email is read and its content extracted for classification.
The agent analyzes the email content and assigns urgency (critical, high, normal, low), topic (billing, technical, account, feature request), and sentiment (frustrated, neutral, positive).
Classification results are applied as tags via the tag_email tool. The agent forwards the email or sends a structured notification to the appropriate team's queue based on your routing rules.
The agent sends a personalized acknowledgment to the sender with an estimated response time based on urgency and current queue depth. Under monitored oversight, these send automatically while your team can review.
Critical or high-urgency tickets with negative sentiment trigger immediate escalation — notifying senior staff via email with full context and classification details.
import requests
API = "https://api.multimail.dev/v1"
HEADERS = {"Authorization": "Bearer mm_live_xxx"}
"cm"># Fetch unread emails
inbox = requests.get(
f"{API}/mailboxes/{MAILBOX_ID}/inbox",
headers=HEADERS,
params={"status": "unread", "limit": 50}
).json()
for msg in inbox["emails"]:
email = requests.get(
f"{API}/emails/{msg[&"cm">#039;id']}", headers=HEADERS
).json()
# Your classification logic
classification = classify_email(email["text_body"])
# Returns: {urgency: "high", topic: "billing", sentiment: "frustrated"}
# Tag the email with classification results
requests.post(
f"{API}/emails/{email[&"cm">#039;id']}/tags",
headers=HEADERS,
json={"tags": [
f"urgency:{classification[&"cm">#039;urgency']}",
f"topic:{classification[&"cm">#039;topic']}",
f"sentiment:{classification[&"cm">#039;sentiment']}"
]}
)Read a new email and classify it by urgency, topic, and sentiment using your AI model.
import requests
API = "https://api.multimail.dev/v1"
HEADERS = {"Authorization": "Bearer mm_live_xxx"}
ROUTING = {
"billing": "[email protected]",
"technical": "[email protected]",
"account": "[email protected]",
"feature_request": "[email protected]"
}
def triage_and_route(email: dict, classification: dict):
"cm"># Send acknowledgment to sender
requests.post(f"{API}/reply", headers=HEADERS, json={
"in_reply_to": email["id"],
"text_body": (
f"Hi {email[&"cm">#039;from_name']}, we've received your message "
f"and our {classification[&"cm">#039;topic']} team will respond "
f"within {get_sla(classification[&"cm">#039;urgency'])}. "
f"Your reference number is {email[&"cm">#039;id'][:8].upper()}."
)
})
# Route to appropriate team
team_email = ROUTING.get(classification["topic"])
requests.post(f"{API}/send", headers=HEADERS, json={
"from": "[email protected]",
"to": team_email,
"subject": f"[{classification[&"cm">#039;urgency'].upper()}] {email['subject']}",
"text_body": (
f"New ticket routed to your team.\n\n"
f"From: {email[&"cm">#039;from']}\n"
f"Urgency: {classification[&"cm">#039;urgency']}\n"
f"Sentiment: {classification[&"cm">#039;sentiment']}\n\n"
f"---\n{email[&"cm">#039;text_body']}"
)
})Send a personalized acknowledgment to the sender and notify the appropriate team.
"cm">// Triage agent using MultiMail MCP tools
async function triageNewEmails() {
const inbox = await mcp.check_inbox({
mailbox_id: "support-mailbox-id",
status: "unread",
limit: 50
});
for (const msg of inbox.emails) {
const email = await mcp.read_email({ email_id: msg.id });
"cm">// Classify with your AI model
const { urgency, topic, sentiment } = await classifyEmail(email);
"cm">// Tag for tracking
await mcp.tag_email({
email_id: email.id,
tags: [`urgency:${urgency}`, `topic:${topic}`, `sentiment:${sentiment}`]
});
"cm">// Send acknowledgment (auto-sends under monitored mode)
await mcp.reply_email({
email_id: email.id,
text_body: `We've received your message. Our ${topic} team will respond within ${getSLA(urgency)}.`
});
"cm">// Escalate critical + negative sentiment
if (urgency === "critical" && sentiment === "frustrated") {
await mcp.send_email({
from: "[email protected]",
to: "[email protected]",
subject: `[ESCALATION] ${email.subject}`,
text_body: `Critical ticket with frustrated sentiment.\n\n${email.text_body}`
});
}
}
}Use MCP tools for a streamlined triage workflow inside an AI agent framework.
Every email is classified and routed within seconds of arrival. No single person becomes the chokepoint for your entire support queue.
AI considers content, sentiment, and context — not just keywords. Critical issues from frustrated customers surface immediately instead of waiting in a FIFO queue.
Every sender receives a personalized acknowledgment with a reference number and expected response time, reducing 'where is my response?' follow-ups.
Your team sees every classification and routing decision in real time. No approvals needed for speed, but full transparency to catch and correct any misroutes.
Whether you receive 50 or 5,000 emails per day, triage happens at the same speed. No additional headcount needed as support volume grows.
Email infrastructure built for AI agents. Verifiable identity, graduated oversight, and a 38-tool MCP server. Formally verified in Lean 4.