Agentic B2B Lead Acquisition Engine
LeadForge AI
LeadForge AI automates end-to-end B2B sales development. It orchestrates a 4-phase asynchronous agent pipeline: Scout Agent (scraping), Enrichment Agent (contact mining), Auditor Agent (Lighthouse & social harvesting), and Copywriter Agent (Claude AI pitch generation) streaming live over Server-Sent Events (SSE).
Status
Production
Stack
Python, FastAPI, Playwright, Claude AI, Async SQLite, SSE Streaming
Throughput / Users
1,200+ Leads / Day
Performance
99.2% Uptime
System Architecture & Problem Statement
Architecture Layers:
Key Product Features
Database Entity Schema & Relationships
Leads
Collection/Table→ Has one AuditResult and many CopyDrafts
AuditResults
Collection/Table→ Belongs to Lead
CopyDrafts
Collection/Table→ Belongs to Lead
API Specifications & Endpoints
/api/leads/discoverTriggers Playwright scout agents to find local businesses in a given city & niche.
/api/pipeline/stream/:sessionIdReal-time Server-Sent Events (SSE) endpoint streaming 20-step agent progress live.
/api/copy/generateInvokes Claude 3.5 Sonnet to craft tailored outreach copy based on audit results.
/api/outreach/sendDispatches personalized email via SMTP with delivery tracking.
Interactive Visual Screenshots & Previews
[04:02:11] ScoutAgent: Scraping 45 B2B leads in 'San Francisco' (Niche: SaaS)...
[04:02:14] EnrichmentAgent: Extracted 38 emails, 42 direct phone lines, 5 social links.
[04:02:18] AuditorAgent: Lighthouse PageSpeed score: 42/100 (LCP: 4.8s). Missing meta description.
[04:02:22] CopywriterAgent (Claude 3.5): Generated customized pitch hook. Tier A lead queued for outreach!
Real-time SSE streaming dashboard displaying live agent logs, active web scrapers, and lead enrichment steps.
Total Throughput
1,240 / day
Avg Latency
18ms
Health Index
99.8%
Detailed audit breakdown showing PageSpeed scores, SEO deficiencies, contact details, and tier ranking.
🚀 Quick Start & Process to Run
Prerequisites
- Python 3.10+
- Pip & Virtualenv
- Playwright Chromium Browser
- Anthropic API Key
Required Environment Variables (.env)
ANTHROPIC_API_KEY=sk-ant-...
PAGESPEED_API_KEY=AIzaSy...
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=user@domain.com
SMTP_PASS=app_password
Execution Steps:
1. Clone Repository & Create Virtual Environment
Initialize project codebase and activate isolated Python 3 environment.
2. Install Python Dependencies & Playwright Browsers
Install FastAPI, Pydantic, aiosqlite, Anthropic SDK, and headless Chromium.
3. Configure Environment Credentials
Set ANTHROPIC_API_KEY, PageSpeed API key, and optional SMTP settings in .env file.
4. Launch FastAPI Engine & Open Dashboard
Start Uvicorn server on http://localhost:8000 and view the agent control center.