Professional work · Research system · AI
Lead Factory
A lead pipeline in four stages: distributed collection from Google Maps, scoring into tiers, enrichment by research agents, and an agent interface over the result.
Research agents drive a browser to find each business website, then read the site and write a research report onto the lead.
01
Collection
- Industry keywords are crossed with every city above a population threshold to produce the search queries for a market.
- Queries become jobs in PostgreSQL. Workers claim them atomically with a skip-locked select, so a worker fleet needs no coordination between its members.
- A campaign is a versioned directory with its own market list, ordered search terms, generated queries, and manifest.
- Workers run as Docker services and are deployed by script from one machine. No manual server access is part of the workflow.
- A central web viewer browses and filters the collected organizations, and a selection exports as CSV.
02
Scoring
- Every collected organization gets a tier of GOOD, MEDIUM, BAD, or NOT RELEVANT, and a score from zero to one hundred for the order within the tier.
- Each scored row keeps a snapshot of every signal the scorer read, so an operator can see why a lead has its tier.
- The scoring path deliberately uses Google Maps signals only. Enrichment data travels with the response but never moves a tier.
- Scoring annotates and does not delete. A bad lead can qualify again when fresh reviews arrive on a later collection.
03
Enrichment
- A discovery agent searches for the official website of a business through a browser and rejects directory and social pages before it accepts a result.
- A second pass crawls the accepted website, answers a fixed research template, and writes the report and its timestamp back onto the lead.
- The enrichment queue is ordered by tier and score, because the language-model pass is the most expensive step in the pipeline.
04
Agent interface
- An MCP server exposes the scored leads to an assistant through three validated tools: fetch a filtered list, read one lead, and record an outreach enrollment.
- The server reads through an internal HTTP API over the lead store and a read-only database connection. It performs no scoring of its own.
- A response carries the tier, the score, the reason codes, and, when the lead is enriched, the firmographic and research data alongside it.
05