How an AI Sales Agent Handles Outreach and Replies Safely

The agent has a prospect list, a draft that reads well, and permission to send. Then a request times out. The worker retries, another worker picks up the same contact, and the buyer gets duplicate outreach before either worker reads the reply. For developers connecting Claude Code, Cursor, Codex, MCP tools, or a REST API to email, the hard part isn't generating the message. It's building a send gate that rejects the wrong action before it reaches the mailbox.
Table of Contents
- What an AI Sales Agent Does From Research to Reply
- How One Outreach Send Moves Through the Agent
- Policy Limits, Legal Requirements and Logs
- Defending the Agent Against Malicious Email
- Coordinating Several Agents on the Same Contacts
- Choose Your Autonomy Level Before the First Send
What an AI Sales Agent Does From Research to Reply
An AI sales agent is software that runs part of outbound sales work on its own, from choosing a prospect to reading a reply. Think of a junior sales development rep working a list around the clock, except every operating rule needs to be written down before the first send.
Email is already a practical interface for this work. In participating organizations, drafting and sending emails was the most common sales-agent action, according to Salesforce's Agentic Enterprise Index, followed by creating to-do items and sending meeting requests.
The outbound workflow of an AI sales agent
| Stage | What the agent does | Where it fails |
|---|---|---|
| Research | Reads account and contact records, picks the next prospect | Stale or wrong contact data |
| Draft | Writes a first-touch email from account facts and a template | Generic copy or unverified claims |
| Send | Sends from the agent's own mailbox | Duplicate or too-soon messages |
| Reply | Reads each response and classifies its intent | Misread intent, such as treating an objection as interest |
| Handoff | Passes the thread to a person with a note | Escalation that arrives too late |
Research should produce evidence, not just a flattering opening sentence. Store the source of each account fact alongside the draft so a reviewer can distinguish a verified product announcement from a model's guess. Reject unsupported claims about the prospect's budget, purchasing authority, or internal problems.
Separate reasoning from permission
The model can propose a recipient, draft, and next action. Application code decides whether that action is allowed. A tool call named send_email should not bypass eligibility checks just because the model provides a convincing explanation.
For a broader explanation of the sales-development role, MakeAutomation on AI-driven prospecting provides context for deciding which tasks belong in the agent's workflow. The implementation still needs explicit boundaries between those tasks.
Consider a reply saying that purchasing won't happen this quarter. Classifying that response as interest can start an unwanted follow-up sequence. The classifier needs a defined objection category, a deferral field, and a rule that pauses ordinary outreach when timing is the objection.
Practical rule: A plausible next action isn't permission to execute it.
How One Outreach Send Moves Through the Agent
Check order determines what gets blocked. Generating a draft before checking eligibility wastes work; checking suppression only when a campaign starts leaves queued messages exposed to later opt-outs. The final send gate must evaluate current state, not a snapshot from list import.
The diagram shows the outbound queue path. The numbered implementation sequence also includes receiving replies and transferring threads.

-
Pull the next contact and confirm the record is current. Read the verification timestamp, account association, and contact status before drafting. Importing a list without a last-verified field leaves the worker unable to distinguish a current employee from someone who has changed jobs.
-
Check suppression for opt-outs and past bounces. Treat suppression as shared operational state, not a campaign setting. A common slip is importing an old list and assuming its contacts remain eligible because the import succeeded.
-
Check recent duplicates and another agent's claim. Reserve the action with an idempotency key before dispatch, and persist its state. If a request times out after submission, reconcile the result instead of blindly retrying a message that might already have been sent.
-
Check the contact's cooldown. Calculate eligibility from the contact's message history, not just the active campaign. Separate campaigns shouldn't each conclude that the same buyer hasn't heard from anyone recently.
-
Send from the agent's own inbox. Give each agent its own address and inbox so From and Reply-To identify the intended sender. A shared address without explicit thread ownership can route a reply into another worker's queue.
-
Receive the reply before advancing the thread. Inbox reading, webhooks, live event streams, and the
molted listenCLI command provide receiving paths. A webhook without durable processing and retries can lose the reply while the follow-up scheduler continues running. -
Classify the response into an explicit action. Use interested, objection, unsubscribe, and out-of-scope categories, with uncertainty routed for review. An unsubscribe must update suppression immediately rather than waiting for a later CRM synchronization.
-
Hand judgment calls to a person with a note. An upset customer or a refund above the agent's authority shouldn't remain in an ordinary sales sequence. Include the last message, the proposed next action, and the reason for escalation, not merely a thread identifier.
Make the send gate inspectable
A useful application boundary is evaluate_send(candidate, current_state), returning an allow, block, or hold decision with a reason code. The transport should accept only candidates that passed that boundary, not arbitrary drafts from the agent.
Immediately before dispatch, revalidate mutable conditions such as suppression and ownership. A draft can wait in a queue while the buyer unsubscribes or a person takes over the conversation.
Run a test contact through all eight steps and confirm that each produces a durable result before widening the list. Test blocked paths too, especially a timeout after dispatch and a reply arriving while a follow-up is queued.
Policy Limits, Legal Requirements and Logs
| Control before dispatch | Input checked by code | Failure prevented |
|---|---|---|
| Sender identity | From, To, Reply-To, routing, originating domain | Misleading or mismatched sender information |
| Commercial-message requirements | Message purpose, opt-out mechanism, postal address | Sending an incomplete commercial message |
| Suppression | Current recipient status | Contacting someone after an opt-out |
| Mailbox health | Bounce and complaint reporting | Continuing after a configured stop condition |
| Decision record | Candidate, policy version, outcome | An unexplained send or block |
Sender identity and opt-out handling belong in code before every send. The FTC's CAN-SPAM compliance guide says the law covers commercial email whose primary purpose is advertising or promoting a commercial product or service, and describes requirements for accurate sender and routing information, a clear opt-out mechanism, a valid physical postal address, and honoring opt-out requests.
A policy function should read message purpose, sender fields, and the suppression store before calling the transport. Letting the model decide whether its own draft needs an opt-out creates a circular control: the component proposing the message also decides whether it meets the rules.
Keep limits outside the prompt
Store operator-controlled limits in configuration that the agent can't loosen. Agents may tighten their behavior, but raising a sending limit or resuming a paused mailbox needs a person's decision.
Use bounce and complaint measurements from the actual sending system. Configure a pause condition with an explicit measurement window and denominator; an unexplained percentage in a dashboard isn't enough to reproduce a decision. If reporting is missing or stale, the worker should hold sends rather than assume the mailbox is healthy.
For teams also automating social messages, DMpro's compliance monitoring for DM outreach offers an adjacent monitoring reference. Channel-specific rules still need separate implementations; email eligibility shouldn't be copied into a direct-message workflow unchanged.
A policy prompt can explain a restriction. Only the send path can enforce it.
Record decisions, not just deliveries
Every outgoing email should be checked first, with a dry run available to inspect whether it would go out. A dry run isn't a reservation or a guarantee, because recipient status can change before dispatch.
After a run, inspect every blocked send, its rule identifier, timestamp, and contact-record version. Store approval outcomes separately from model explanations so an auditor can distinguish a person's decision from generated reasoning. The mailbox audit-log guide provides a concrete reference for inspecting mailbox activity and decisions.
Defending the Agent Against Malicious Email
An incoming email contains white text telling the agent to search the inbox and forward matching messages to an outside address. The visible message looks like a prospect asking about pricing. Both parts are untrusted input, and neither has the authority to change the agent's operating policy.

This attack isn't limited to producing an odd reply. OWASP's prompt-injection guidance describes an email-assistant attack in which an incoming message causes an agent to scan a private inbox and forward information to an attacker's address.
Build containment before reply automation
- Screen the full message representation. Inspect visible text, hidden HTML text, extracted attachment content, and instructions attempting to change authority or destinations. Scanning only the displayed plain-text preview misses content the model might later parse.
- Quarantine suspicious originals. Keep risky bodies outside the agent's normal reasoning context. A warning prepended to the malicious body still exposes the model to the instructions.
- Restrict tools during inbound processing. A reply classifier rarely needs broad inbox search, file access, or administrative tools. Give that stage only the capabilities required to produce its classification.
- Separate credentials by capability. Use mailbox-scoped read, send, and management keys. The process reading an untrusted message shouldn't automatically hold permission to change policy.
- Add canary tokens as detection signals. Flag attempts to expose or act on those tokens, but don't treat their absence as proof that a message is safe.
- Log blocks against the message ID. Preserve enough context for investigation without copying sensitive message content into unrestricted application logs.
The email-pipeline prompt-injection scanning guide is a useful implementation reference for placing screening before normal agent processing. Detection supports containment; it doesn't replace permission boundaries.
Make quarantine review useful
A review record should contain the message ID, sender, matched rule, triggering excerpt, and action taken. The excerpt should be narrowly scoped and access-controlled, especially when an attachment contains customer information.
A person should be able to distinguish an actual redirection attempt from ordinary discussion of security instructions. Release decisions must stay outside the same agent that received the suspicious content.
An agent reading inbound mail must not send to arbitrary new destinations without an approval step.
Coordinating Several Agents on the Same Contacts
Agent A works an account list while Agent B follows a product-interest signal. Both choose the same buyer and send on the same day. Neither worker has necessarily violated its local rules; the developer failed to give them a shared claim on the contact.
Add ownership before parallelism
Start with clear sending identity. Separate mailboxes make ownership easier to inspect, although several agents can share a mailbox when their responsibilities require it. Mailbox identity alone doesn't prevent competing agents from choosing the same recipient.
Use a contact lease, a short-lived claim acquired before preparing an outreach action. A hypothetical Redis command is SET lease:jane@acme.example agent-a NX EX 3600. Here, NX makes acquisition fail while another claim exists, and the expiry provides recovery if the worker disappears.
The worker must check that it still owns the lease before sending. Release should compare the stored owner token before deleting the key, otherwise an expired worker could accidentally delete a newer worker's claim. The contact-lease guide explains this coordination boundary.
| Shared component | What every worker must do |
|---|---|
| Agent registry | Identify the worker requesting an action |
| Contact lease store | Acquire and verify ownership |
| Policy evaluator | Apply the same eligibility rules |
| Duplicate store | Read and record dispatch attempts |
| Decision record | Preserve ownership and action outcomes |
Coordinate across client workflows
An agency operating client mailboxes needs a deliberate definition of contact scope. Where contracts and data boundaries permit shared coordination, leases can prevent the same prospect from entering conflicting sequences. Where clients must remain isolated, the developer shouldn't pool their contact records.
Registration, contact leases, and consensus votes can coordinate several agents, but a vote isn't a substitute for exclusive ownership. Multiple agents agreeing to send still need the same final gate.
- Create the sending identities. Assign each agent a mailbox or an explicit role within a shared mailbox.
- Set lease duration deliberately. Allow enough time for processing, with renewal and expiry behavior defined.
- Test contention before production. Run competing agents against a shared test contact and confirm that only the lease holder can dispatch.
Leases can delay the first contact while another worker holds a claim. That waiting time is the price of avoiding a conflicting second message.
Choose Your Autonomy Level Before the First Send
Autonomy levels for an AI sales agent
| Autonomy level | What the agent does alone | When a person decides | Best starting point |
|---|---|---|---|
| Automatic sending | Sends and replies without review | Only when a thread is handed over | Known contacts with low-risk follow-ups |
| Approval for first contact | Sends follow-ups to contacts it has already reached | Before the first message to each new contact | New lists or a new sending domain |
| Approval for every message | Drafts and queues each message | Before every send | The first week, or any outreach with legal exposure |
Choose the starting level before granting send access. Automatic sending isn't permission to exceed scope; approval settings decide who authorizes an otherwise eligible message, while policy checks still apply.
The OWASP Top 10 for Large Language Model Applications identifies excessive agency and prompt injection as risks involving connected functions, including email-based inbox exfiltration. Narrow permissions and human decisions for sensitive actions address different failure paths, so neither should replace the other.
Start with observable decisions
A practical starting recommendation is approval for every message during the first week. Review the send log alongside the original contact evidence and subsequent replies. The important question isn't whether the drafts sound natural, but whether the agent selects appropriate recipients, interprets objections correctly, and stops when it should.
Move to approval for first contact only when those decisions look right. Known, low-risk follow-ups can then run without reviewing each draft, while unfamiliar recipients still require a person.
An agent can lower its own mailbox autonomy at any time, but raising it requires a person's decision. It also can't approve a held send: the request_decision tool returns a link for the agent to pass to a person.
Give the agent a mailbox, not just a send function
Molted is a mailbox for AI agents, what Gmail is for humans. Each agent sets up its own address and inbox, while the business owner decides how much it does alone. It isn't an API wrapper or a layer on top of Resend, Postmark, or SES, and no separate email provider account is needed.
New mailboxes run on their own by default. Approvals are an optional dial, not the central operating model. MCP, CLI, and REST interfaces let the mailbox sit behind the developer's workflow without turning the model into the authority over sending policy.
The production boundary should remain explicit: the agent proposes work, deterministic checks constrain execution, and people decide when its authority expands.
Molted Email offers agent mailboxes with inbound screening, outgoing policy checks, and human handoff for threads that need judgment. Visit Molted Email to connect a mailbox to an agent and test the send path before expanding outreach. Start free at molted.email (free for people, paid plans from $19 a month).