How to Build an AI Lead Follow-Up Agent (Step by Step)

How to build an AI lead follow-up agent: the trigger, enrichment, AI-written reply, approval step, follow-up schedule, stop rules, logging and guardrails.

Josh Pocock6 min read

Automation & Agents

Lead follow-up agent

Stride AI Academy

To build an AI lead follow-up agent, trigger on every new lead, save it to the CRM, have a language model draft a short personal reply, route it through human approval at first, send it, follow up on a schedule and stop when the lead replies, books or opts out.

This guide walks through the architecture, each component and a sample prompt. It's tool-neutral: you can build it with a CRM's own automation features, a workflow tool, or custom code written with an AI coding assistant like Claude Code calling the APIs directly.

The architecture

New lead (form, ad, listing site, missed call)
        |
        v
 1. Trigger  ->  2. Save to CRM  ->  3. Enrich
                                        |
                                        v
 6. Send  <-  5. Approval (day one)  <-  4. Draft reply with an LLM
   |
   v
 7. Follow-up schedule  ->  8. Stop rules  ->  9. Log every step

Each step is small. Most of the work is in steps 4, 5 and 8.

1. Trigger

Every lead source needs to fire the same entry point. Common sources:

  • Website forms: most form tools can send a webhook when a form is submitted
  • Ad lead forms: the ad platform's lead forms can usually push leads by webhook or through an integration
  • Listing sites and directories: often email notifications only, so you may need to parse the email
  • Missed calls: your phone system can usually send an event for missed calls

Normalize every source into one format: name, phone, email, source, message, timestamp.

2. Save to the CRM

Save the lead before doing anything else, so nothing is lost if a later step fails. Record the source and time, and check for duplicates by email and phone. A returning lead should update the existing contact instead of creating a new one.

3. Enrich

Add context the reply can use:

  • What service they asked about, from the form or message
  • Their location, to confirm you serve the area
  • Whether they're a past customer
  • Business hours right now, so the reply can set expectations

Keep enrichment to data you have a reason to use. Don't pull in personal data the reply doesn't need.

4. Draft the reply with a language model

Send the lead details and a clear instruction set to the model, and ask for structured output so your code can check it before sending.

A sample prompt:

You write the first reply to a new lead for [Business], a [type of business]
in [area].

Lead details:
- Name: {name}
- Service asked about: {service}
- Their message: {message}
- Source: {source}
- Is it currently business hours: {is_open}

Rules:
- Under 60 words. Friendly, plain language, no exclamation marks.
- Use their first name once.
- Refer to what they asked about in one short phrase.
- Offer the booking link: {booking_link}
- Never quote prices, promise availability or give advice.
- If the message is a complaint, an emergency, or not a sales inquiry,
  set "needs_human" to true and leave "reply" empty.

Return JSON only:
{"reply": "...", "channel": "sms" or "email", "needs_human": true or false,
 "reason": "one short sentence"}

Then validate the output in code: is it valid JSON, under the length limit, containing the booking link and none of a list of banned phrases? If any check fails, send it to a human.

5. Approval step on day one

For the first week or two, every drafted message goes to a staff member for approval before it sends. They can approve, edit or reject it with one click from email, a team chat or the CRM.

Track how many drafts get edited and why. When the edit rate stays low for a message type, switch that type to auto-send and keep approvals for the rest.

6. Send

Send by SMS, email or both, depending on what the lead provided and consented to.

Guardrails at this step:

  • Consent. Only text or call people who have given permission, such as by submitting a form that clearly says they'll be contacted. Rules for texts and calls are strict in many countries. In the US, the TCPA applies.
  • Quiet hours. Hold SMS outside reasonable local hours and send in the morning.
  • Rate limits. Respect your SMS and email providers' rate limits, and cap messages per lead per day.
  • Opt-out. Every SMS should honor replies like STOP, and every email needs an unsubscribe option.

7. Follow-up schedule

Most leads don't reply to the first message. A simple schedule:

Touch Timing Channel
1 Within 2 minutes SMS and email
2 Next day SMS
3 Day 3 Email with a different angle
4 Day 7 SMS: "Should I close your request?"

Each follow-up is drafted the same way as the first, with the earlier messages included so the model doesn't repeat itself.

8. Stop rules

The agent must stop at the right time. Stop the sequence when the lead:

  • Replies (hand the conversation to a human or a reply agent)
  • Books an appointment
  • Opts out
  • Is marked as a customer, spam or not a fit in the CRM

Check stop conditions immediately before every send, not only when the sequence starts. A lead who booked an hour ago shouldn't get a "still interested?" text.

9. Logging and monitoring

Log every run: the trigger, the data used, the prompt version, the model output, the checks it passed or failed, who approved it and the send result. When something goes wrong, the log tells you where.

Set alerts for failed sends, API errors and spikes in "needs human" results. Review a sample of sent messages every week.

Building it with an AI coding assistant

If you build it as custom code, an AI coding assistant can write most of it from a clear spec. Describe the nine steps above, the lead format, the prompt and the stop rules, and ask it to build and test each step separately with sample leads. Review the code, especially anything that sends messages, and test with your own phone number before it touches real leads.

Learn to build it

Lead follow-up is one of the agents covered in the Stride AI Automation course, alongside inbox triage, client reports and content pipelines. Bring your build to the weekly live calls if you get stuck. The free guide library has walkthroughs for many of the tools involved.

FAQ

What is the 5-minute rule for leads?

It's the common sales advice to contact a new lead within five minutes of their inquiry, while they're still thinking about the problem. An automated follow-up agent makes this realistic for small teams, because the first reply goes out in minutes at any hour.

Do I need to code to build a lead follow-up agent?

Not necessarily. Many CRMs and workflow tools can handle the trigger, send and schedule. Custom code gives you more control over the AI drafting, checks and stop rules, and AI coding assistants now write much of that code from a clear description.

Should the AI send messages without approval?

Not on day one. Start with a human approving every message, measure how often drafts get edited, and switch message types to auto-send once they're consistently right. Keep human review for complaints, emergencies and anything unusual.

What can go wrong with AI lead follow-up?

The most common problems are messages sent after a lead already booked, replies that promise things the business can't do, texts sent without consent and duplicate contacts. Stop-rule checks before every send, strict prompt rules, consent checks and duplicate matching prevent most of them.