Building an AI lead-qualification agent in a week

The exact stack, prompts, and integration steps for a working lead-scoring agent shipped inside seven days. Live in production, scoring real leads.

The lead-qualification agent is the single best 'first AI workflow' for almost any service business. The ROI is immediate, the build is small enough to ship in a week, and the team gets to see AI do something obviously valuable before any deeper investment.

This is the build, in the actual order it happens, including the parts that go sideways and how to recover. No theory. No deck.

What the agent does

Inbound lead form submits → agent picks it up → enriches with public-source data → scores it 1–10 against a defined ICP → writes a structured note into the CRM → routes high-scores to the senior closer's calendar and low-scores to a nurture sequence.

Critically: the agent does not auto-reject or auto-disqualify in the first month. Every lead still hits a human queue. The agent's score is advisory until the team trusts it.

The stack

Day-by-day, what gets built

Day 1: ICP and scoring rubric

Before any code, the team writes the ideal customer profile and the scoring rubric. Five attributes max — anything more becomes noise. Each attribute has a weight and a 1–5 score definition. This is the document the LLM will use as its grading sheet.

Skip this step and the agent will hallucinate criteria. The rubric is the upstream artifact that makes everything else work.

Day 2: Form-to-workflow pipe

Form submission triggers a webhook into the workflow runner. Test that the payload arrives clean, with all the fields the rubric needs. If the form is missing fields, this is the day to add them.

Day 3: Enrichment

Pass the email and any company info into the enrichment API. Get back industry, company size, role title, location, anything else the rubric uses. Handle the case where enrichment returns nothing — about 15% of leads will not enrich, and the agent has to score them anyway.

Day 4: Scoring prompt

Build the LLM prompt. Structure: ICP rubric, the lead's data (form + enrichment), instructions to output a JSON object with score, reasoning, and a 2-sentence summary. Test against 20 historical leads where the team already knows the right answer. Tune until the agent agrees with the human on at least 16 of 20.

If you can't get to 16 of 20, the rubric is the problem, not the model. Tighten the rubric.

Day 5: CRM write-back and routing

Agent's output writes a structured note into the CRM lead record. Score above threshold triggers calendar invite and Slack alert to the senior closer. Score below threshold triggers a nurture-sequence enrollment. Every lead, regardless of score, still appears in the human queue.

Day 6: Monitoring channel

Every scored lead posts to a Slack channel — lead name, score, reasoning, link to CRM record. The team watches this channel for the first month. Disagreements get logged and used to tune the rubric and prompt weekly.

Day 7: Production cutover

Run the agent on real inbound for 48 hours in shadow mode (agent scores but doesn't route). Check 100% of the scores against the team's read. If the agreement rate is above 80%, flip the routing on. If not, tune for another week.

The agent isn't done when the code works. It's done when the team trusts it enough to act on the score without re-checking it.

Things that go wrong (and how to fix them)

The agent is too generous

Most first-version scoring agents over-score. Tighten the rubric, lower the threshold for 'high,' and add explicit disqualifiers (wrong industry, wrong size, wrong geography). LLMs default to politeness — you have to explicitly tell them what a bad lead looks like.

Enrichment gaps

When enrichment returns nothing, the agent has to score on form data alone. Build a fallback path that's transparent — the score includes a flag like 'low-confidence: enrichment unavailable' so the human reviewer knows to look harder.

Voice drift in the CRM note

The note the agent writes into the CRM should sound like the team writes notes, not like ChatGPT. Pass a short voice reference into the prompt — 3–5 example notes the team has actually written. The same upstream investment that makes content production work makes this work.

Edge cases triggering bad routing

Real leads include garbage submissions, test entries, partner referrals that don't fit the ICP but are still important, and existing customers who re-enter through the form. Build explicit branches for each of these before they cause an incident.

What 'shipped' looks like

Done in this order, the agent ships in a week and pays back inside the first 30 days through better closer time allocation. This is the build behind our AI integration engagements — and the entry point that makes the bigger workflows easier to scope later.

What ships next

Once the lead agent is live and trusted, the next workflows in line are call summarization and follow-up — the next two pieces in the five AI workflows progression. They use the same stack and the same patterns; the team's already done the hard part by week one.

The bottom line

A working lead-qualification agent in seven days is not a stretch goal. It's the right scope for the first AI workflow in any service business. Skip the strategy deck, follow the day-by-day above, and have something live by next Friday. And if anyone is selling you a 12-week assessment to do this same job, the strategy decks piece is the rebuttal.