Lead qualification is the most common first automation we are asked for, because it is high-volume, rule-based, and the output is checkable: you can look at a scored lead and say whether the score is defensible. This guide is the sequence we use, and the section near the end gives the filtering ratio from our own pipeline so you have a real number to compare against rather than a promise.
Step 1: Define your qualification criteria
Before any code is written, decide what “qualified” means for your business. This is the step most teams skip, and skipping it produces an agent that is vague in exactly the way the brief was.
- Fit — company size, industry, budget band, technology stack. Does this prospect match the profile you already sell to?
- Intent — pricing page visits, resource downloads, email engagement, repeat visits. Is this person actively evaluating?
- Timing — buying now or six months out. A qualified lead with no urgency is a nurture candidate, not a sales-ready one.
- Authority — decision-maker, influencer, or researcher. Each needs a different follow-up.
Write the criteria down as rules with thresholds. If your criteria read “they seem interested”, the agent will produce results that seem qualified.
Step 2: Choose your framework
Hermes — when qualification is a single-agent job and the agent should remember which leads converted and refine its scoring over time. This covers most cases, and it is what our own lead agent runs on.
OpenClaw — when the pipeline genuinely splits across agents: scoring in one, enrichment in another, routing in a third, with handoffs to orchestrate.
Custom — when you need self-hosted deployment, audit logging, or compliance guarantees the open frameworks do not offer. If you need the branching to be explicit and replayable step by step, that is the case for LangGraph agent development as the orchestration layer.
Step 3: Design the data flow
Input. The inbound lead — form submission, email, chat, ad click — with whatever the lead actually provided, which is usually less than you would like.
Enrichment. The agent adds firmographic data, technographic signals, public profile data, and company news. This is what turns a name and an email into something scoreable. Decide here what happens when enrichment returns nothing: an unenriched lead should be marked as such, not scored as though the data were absent by choice.
Scoring. The enriched record is evaluated against each criterion, and each criterion produces its own score rather than one opaque number. Per-criterion scores are what make a disagreement diagnosable later.
Routing. High scores go straight to a rep, middle scores to nurture, low scores to a documented rejection with the reason attached. Every path is recorded.
Output. The record lands in the CRM with the score, the enrichment, the reason, and the recommended action, so the rep picks it up with full context.
Step 4: Build and test on real data
The rule that matters: do not build on a demo dataset. Take 50–100 leads from the last month, run them through the agent, and compare its scoring with what actually happened. Did it rank the leads that converted above the ones that did not? Did it flag the dead ones?
This validation step is what separates a production agent from a prototype. A prototype works on curated data. A production agent works on messy records with missing fields, ambiguous signals, and duplicates. Iterate on the criteria until the agent's output matches your judgement on the clear-cut cases, and make sure everything genuinely ambiguous is escalated with its evidence rather than guessed.
Step 5: Deploy and measure what you can actually see
Track the metrics you own, and be honest that conversion is influenced by more than the agent:
- Time from arrival to routed — the metric the agent most directly controls.
- Agreement rate — how often the score matches a human reviewer on the clear-cut cases.
- Escalation rate — how many records the agent refuses to call. Rising escalations mean the criteria need work; zero escalations mean it is guessing.
- Enrichment coverage — what share of records arrive with enough data to score at all. This is usually the real ceiling.
What the filter actually looks like
Our own prospect pipeline is the clearest illustration of why volume is the wrong target. One agent assembles and segments prospects across four markets, running a discovery job daily. The master file holds 5,231 deduplicated rows. The number that reached contact-verified is 145.
That is roughly a 97% reduction, and it is the point rather than a disappointment. Collecting thousands of rows is commodity work; every unfiltered row you pass on is triage moved onto a salesperson. The full architecture — the schema, the deduplication approach, and the verification stage — is written up in thelead generation engine case study. The same gate-do-verify shape appears in every automated chain we build, described generally inhow to automate a business process with AI agents.
What this costs to build
It depends on the number of criteria, the number of enrichment sources, and the systems the agent has to write to — so we scope it explicitly rather than quoting a range that would be invented. The free blueprint produces the scope, andhow long a production agent takes to buildbreaks the timeline down by stage. We do not publish return figures for client systems, because we do not hold client-side measurement and would be guessing.