The email infrastructure
for autonomous lead qualification.
Developers building qualification agents need primitives to read inbound inquiries, ask qualifying questions via email, and score leads based on responses. Mailgent provides the email API so your agent can qualify leads through natural conversation before handing them to sales.
API Primitives used
mail.list_messagesDetect inbound leads
Monitor the sales inbox for new inquiries. Filter by source label to separate lead channels.
mail.get_threadRead lead context
Load the full conversation to understand what the lead is asking, their company, and their needs.
mail.replyAsk qualifying questions
Reply with targeted questions — budget, timeline, team size, use case. Build a qualification profile through conversation.
mail.update_labelsScore and route
Label leads as hot, warm, cold, or disqualified. Route qualified leads to the right sales rep.
Sales reps spend half their time on leads that will never close.
Inbound leads arrive with minimal context — a name, an email, maybe a one-line message. Sales reps spend hours emailing back and forth to determine budget, timeline, and fit, only to discover half the leads are unqualified. That time could have been spent closing real deals.
Developers building qualification agents need email primitives to engage leads conversationally and score them based on responses. Mailgent provides mail.list_messages for intake, mail.get_thread for context, mail.reply for qualification conversations, and mail.update_labels for scoring.
How to build it.
mail.list_messagesReceive inbound leads
Your agent monitors the sales inbox with mail.list_messages, detecting new inquiries. It reads the initial message to understand what the lead is looking for.
mail.replyQualify through conversation
The agent replies with qualifying questions using mail.reply — budget range, decision timeline, team size, and current tooling. It adapts follow-up questions based on responses.
mail.update_labelsScore and route
Based on the qualification data, the agent scores each lead and labels them using mail.update_labels. Hot leads get routed to senior reps, warm leads enter nurture sequences.
Example prompt
“Check the sales inbox for new inbound leads. Ask each one about their team size, budget, and timeline. Score anyone with 50+ employees and a budget over $10k as 'hot' and notify the enterprise sales team.”
What developers build.
BANT qualification
Build agents that systematically qualify leads on Budget, Authority, Need, and Timeline through natural email conversation.
Product-fit screening
Build agents that ask about the lead's tech stack, use case, and requirements to determine product fit before involving sales.
Event lead follow-up
Build agents that email trade show and webinar attendees, ask qualifying questions, and route interested prospects to sales reps.
Partner qualification
Build agents that engage potential partners via email, assess their capabilities and customer base, and route qualified partners to your partnerships team.
Why not use lead scoring in your CRM?
CRM lead scoring uses form fields and behavioral signals — page views, downloads, job titles. It scores based on attributes, not conversation. A VP who downloads a whitepaper scores high but might have zero budget. A startup founder who sends a short email might be your best deal.
Mailgent gives you primitives for conversational qualification. mail.reply engages the lead directly, mail.get_thread tracks what they said, and mail.update_labels scores them based on actual responses. Your agent qualifies based on what leads tell you, not just what your forms capture.
Dedicated sales identity
Qualification emails come from a professional agent identity. Leads see a real email address, not a bot.
Scoped access
The qualification agent can only access its own inbox. It cannot read support tickets or internal conversations.
Conversation audit
Every question asked and response received is logged. Review how your agent qualifies leads and refine your criteria.