# "I Built an AI Agent That Researches, Scores, and Emails B2B Leads — Automatically

> Source: <https://dev.to/rcortez056/i-built-an-ai-agent-that-researches-scores-and-emails-b2b-leads-automatically-29g9>
> Published: 2026-11-30 20:36:00+00:00

**Recommendation:** Split lead qualification into sequential agents — research, scoring, then generation — and pass each stage's structured output downstream so the email is grounded in the scored profile and top pain points.
More in the playbook "Designing agent systems": <https://wpnews.pro/playbooks/agent-architecture>

Most sales teams are still doing this manually. Someone pulls a lead, Googles the company, tries to figure out if they're a good fit, writes a cold email, and hopes for the best. It's slow, inconsistent, and doesn't scale.

I built a system that does all of that in seconds.

The Autonomous Lead Intelligence System is a multi-agent pipeline built on Relevance AI. You drop in a name, email, and company domain — that's it. The agents take over from there.

The Pipeline: Research → Analyze → Score → Email

Agent 1 — Research & Analysis

The first agent takes the company domain and runs a structured research pass. It extracts core business operations, company scale, industry vertical, and surfaces the primary operational pain points. This isn't a simple web scrape — it's a reasoning pass that synthesizes what it finds into a structured profile the downstream agents can act on.

Agent 2 — Lead Scoring

The second agent takes that company profile and scores the lead on a 0–100 scale. The score is based on three dimensions: fit with B2B automation use cases, operational complexity (how much manual work do they likely have), and automation potential (how much of that work can actually be replaced). It outputs a label — HOT (80–100), WARM (50–79), or COLD (0–49) — so you know exactly where to focus your time.

Agent 3 — Email Generation

The third agent takes the lead score, company summary, and top 3 pain points and writes a personalized outreach email using the Claude API. Subject line and body. It's not pulling from a template — it's reasoning about what that specific company is struggling with and writing to that. The CTA is intentionally low-friction: no "book a 30-minute call" pressure, just an open door.

What You Get Back

Lead score + status label

Company summary

Top 3 operational pain points

Generated email — subject line and body

Recommended next action

Stack

Relevance AI — multi-agent orchestration

Claude API — email generation and reasoning

Netlify — live demo hosting

[https://github.com/rcortez056-spec/automonous-lead-intelligence-system](https://github.com/rcortez056-spec/automonous-lead-intelligence-system)
