lead-qual-agent
Inbound lead in, ICP score + enrichment + draft first-touch email out. Human hits send.

§ 01 · Overview
An agent that converts an inbound lead (email plus optional company details) into a scored, enriched, and drafted first-touch email. Enrichment covers the company website (fetch and parse) and — for UK-registered companies — Companies House filings via the companies-house-mcp client. Scoring is LLM-driven against a configurable ICP rubric. Every draft references a specific, verifiable piece of enrichment evidence and is routed through the human review queue provided by hitl-review before any send action.
§ 02 · Estimated impact
§ 03 · Architecture
- 01
A lead arrives via webhook, forwarded email, or manual paste. The agent fetches and parses the company website (homepage, about, careers, blog) and, where a company number is provided, pulls filings and officers via the companies-house-mcp client.
- 02
Scoring is LLM-driven against a YAML-defined ICP rubric with weighted criteria. Every score has per-criterion reasoning tied to enrichment evidence. Sub-threshold leads are archived with a stated reason; above-threshold leads progress to drafting.
- 03
The drafter is required to reference one specific, verifiable piece of enrichment evidence (a job posting, a filing entry, a blog title). Drafts that cannot find a grounded anchor are flagged for the reviewer with an explicit warning rather than shipped as generic outreach.
- 04
Drafts are routed through hitl-review. Approve, edit, or reject via the terminal CLI or the browser dashboard. Approved drafts are materialised as markdown files in the local drafts folder; direct-send adapters (Gmail, Outlook) are on the roadmap.
Stack
§ 04 · Positioning
The differentiator against volume-oriented AI-SDR platforms is the combination of grounded personalisation and human-in-the-loop routing as first-class features. Emails that reference something specific and verifiable from the prospect's own materials read differently from generic AI outreach, and human approval prevents sender-reputation damage.
| Alternative | Trade-off |
|---|---|
| Automated AI-SDR platforms (Clay-style, Instantly-style) | Optimised for send volume rather than reply rate. Recipients typically identify the AI copy immediately, and sender reputation degrades quickly on the sending domain. This pipeline is designed for lower-volume, higher-signal sends with a human sign-off. |
| Manual research and hand-crafted outreach | Higher quality per email, but throughput ceiling of approximately 15 emails per day per SDR. The agent handles the mechanical 80% of research and drafting; the reviewer signs off on a near-final draft. Quality bar is maintained at approximately three times the throughput. |
| Ad-hoc LLM-prompting workflows | Effective for the first 20 leads. Consistency, ICP scoring, and enrichment source-of-truth degrade rapidly past 200 leads. This pipeline formalises the workflow with rubrics, evidence trails, and structured approval logging. |
§ 05 · Frequently asked
How does lead-qual-agent prevent generic AI-written outreach?
The drafter's system prompt requires every email to reference one specific, verifiable piece of enrichment evidence — a job posting, a filing entry, a blog title. Drafts that cannot find a grounded anchor are flagged with hasGroundedEvidence: false and surfaced to the reviewer with an explicit warning, not shipped as generic outreach.
What data sources does lead-qual-agent use for enrichment?
Website scrape (fetch plus cheerio, no browser needed) and Companies House filings via the companies-house-mcp client when a UK company number is provided. Proprietary sources like LinkedIn are not included in v0.1 by design — the tool is intended for transparent, cite-able enrichment.
Does lead-qual-agent send emails automatically?
No, and by design. Approved drafts land as markdown files in ./drafts/ for the reviewer to send manually. Direct-send adapters (Gmail, Outlook OAuth) are on the roadmap for v0.2, with the send action still gated behind an explicit human approval.