TL;DR
You don’t need an SDR team to generate leads. You need coordinated AI agent squads. This tutorial shows step-by-step how to build a lead generation operation with 3 agents: one researching and defining targets, one executing scraping and enrichment via OpenClaw, one validating and formatting data. All coordinated by Paperclip—with locked budget, audit trail, and zero chance of overspending. 20-minute read. Operation running in under 1 day.
A solo builder needing leads today has three options: spend 4 hours daily prospecting manually, pay $3,000+ monthly for a SaaS prospecting tool, or build an agent squad that works while you sleep.
The third option looked like fiction a few months ago. Today it’s code running on your server.
The combination of two open-source projects changed the game: Paperclip—hitting 42,000 GitHub stars in under a month—provides governance structure, budgeting, and coordination for AI agent teams. OpenClaw—with 339,000+ stars—executes real tasks: scraping, web navigation, data sending, API integration. Together, they build something like a company operated by one person—exactly what the modern solopreneur advocates for.
This article isn’t about what these tools promise. It’s about connecting them and running a real automated lead generation operation.
What you’ll build
A system with 3 agents working together, coordinated by a local Paperclip instance:
┌─────────────────────────────────────────────┐
│ PAPERCLIP (Governance) │
│ │
│ ┌──────────────┐ │
│ │ Agent 1 │ ← Defines ICP, breaks │
│ │ Researcher │ research tasks │
│ └──────┬───────┘ │
│ │ POST /issues │
│ ▼ │
│ ┌──────────────┐ │
│ │ Agent 2 │ ← Executes scraping, │
│ │ Executor │ enrichment via │
│ │ (OpenClaw) │ OpenClaw │
│ └──────┬───────┘ │
│ │ PATCH /issues │
│ ▼ │
│ ┌──────────────┐ │
│ │ Agent 3 │ ← Validates data, │
│ │ Validator │ removes duplicates, │
│ │ │ formats output │
│ └──────────────┘ │
│ │
│ Budget: $50/month per agent │
│ Heartbeat: every 15 minutes │
│ Audit log: everything logged │
└─────────────────────────────────────────────┘
Final result: a CSV or JSON spreadsheet with enriched leads (name, company, title, email, LinkedIn, technologies used), generated automatically from an ICP you define.
Specific use case
You’re a solo dev selling an uptime monitoring micro-SaaS. Your ICP is CTOs and DevOps leads at SaaS companies with 10-200 employees. The squad researches companies in your niche, extracts decision-maker contact data, and delivers a ready-to-outreach list.
Minimal required stack
Before starting, verify what you need:
| Component | What it is | Where to get |
|---|---|---|
| Node.js 20+ | Paperclip runtime | nodejs.org |
| pnpm 9.15+ | Package manager | npm install -g pnpm |
| Paperclip | Squad orchestrator | npx paperclipai onboard --yes |
| OpenClaw | Executor agent | github.com/openclaw/openclaw |
| LLM API key | Claude, GPT-4o, or similar | your chosen provider |
| Linux server (optional) | For 24/7 operation | Any $5/month VPS |
Estimated monthly cost: $30-80 in LLM API costs + $5/month server. Compare to $3,000+ for equivalent SaaS.
Agent squad architecture
Each agent’s role
Agent 1 — Researcher (Strategy)
- Receives company goal (“generate 200 qualified leads weekly in SaaS niche”)
- Breaks into subtasks: “research B2B SaaS companies with 10-200 employees in US”
- Creates issues in Paperclip with context and criteria
- Doesn’t execute scraping—only plans and delegates
- Runtime: Claude Code or any adapter supporting complex reasoning
Agent 2 — Executor (OpenClaw)
- Receives assigned issues via heartbeat
- Executes real scraping using OpenClaw’s browser automation
- Queries LinkedIn, Crunchbase, company websites
- Enriches data: finds emails with Hunter.io, checks tech with BuiltWith/Wappalyzer
- Returns raw data as issue comment
- Runtime: OpenClaw gateway
Agent 3 — Validator (Quality)
- Receives issues with raw data from Executor
- Validates email format (regex + MX lookup)
- Removes duplicates
- Checks required fields are filled
- Formats final output (CSV/JSON)
- Marks issue as “done” or returns to Executor with corrections
- Runtime: Claude Code (light mode, lower cost)
Complete flow (how the work happens)
- You define goal in Paperclip: “Generate 200 qualified CTO leads from B2B SaaS companies”
- Researcher wakes on heartbeat, reads goal, creates 10 research issues (20 leads each)
- Executor wakes, grabs issue via
POST /issues/{id}/checkout, opens OpenClaw browser, does scraping, comments raw data on issue - Validator wakes, reads raw data, validates, formats, saves to shared workspace
- Researcher monitors progress, adjusts targets if needed, creates new issues
- Everything runs in 15-minute cycles with per-agent budget enforcement
Each heartbeat cycle costs tokens. Paperclip ensures no agent exceeds monthly budget.
Step-by-step implementation
Step 1: Install Paperclip
# Install dependencies
npm install -g pnpm
# Clone and configure
git clone https://github.com/paperclipai/paperclip.git
cd paperclip
pnpm install
# Start (opens dashboard in browser)
pnpm dev
Alternatively, quickest path:
npx paperclipai onboard --yes
This opens http://localhost:3100 with onboarding wizard. PostgreSQL database is created automatically—no external configuration.
Step 2: Create the company
In Paperclip dashboard, click “Create Company” and fill:
Name: LeadGen Squad
Mission: Identify and extract contact data from decision-makers
in B2B SaaS companies, generating qualified lists
for automated outreach.
Mission is important—each agent uses it as context for autonomous decisions. Be specific about expected results.
Step 3: Define the goal
Create company’s main goal:
Goal: Weekly lead generation
Description: Generate 200 qualified leads weekly.
Each lead must contain: name, title, company,
email, LinkedIn URL, technologies used.
Focus on CTOs and DevOps leads at B2B SaaS
companies with 10-200 employees in US.
KPI: valid_leads / week >= 200
Step 4: Hire CEO and agents
Paperclip starts with default CEO. In our case, CEO is Researcher.
Configure CEO/Researcher:
Name: Researcher
Title: Lead Research Strategist
Adapter: claude_local
Monthly budget: $50
Heartbeat: every 30 minutes
In agent instructions field, add:
You are a lead research strategist.
Your functions:
1. Analyze company goal and break into executable tasks
2. Create specific issues for Executor
3. Monitor lead quality generated by Validator
4. Adjust search criteria based on results
Rules:
- Never scrape yourself—delegate to Executor
- Each issue must have clear, measurable criteria
- If a lead comes back invalid 3 times, change data source
Hire Executor:
In dashboard, click “Hire Agent”:
Name: Executor
Title: Lead Data Extractor
Adapter: openclaw_gateway
Monthly budget: $50
Heartbeat: every 15 minutes
Reports to: Researcher
Executor instructions:
You are a scraping and data collection executor.
Your tools: browser, curl, APIs.
When you receive a research issue:
1. Open browser and navigate to indicated source
2. Extract data per issue criteria
3. Enrich with email and LinkedIn when possible
4. Comment raw data on issue in JSON format
5. Change status to in_review
Output format:
[
{
"name": "John Smith",
"title": "CTO",
"company": "Acme SaaS",
"email": "john@acme.com",
"linkedin": "https://linkedin.com/in/johnsmith",
"technologies": ["AWS", "Kubernetes", "Datadog"]
}
]
Hire Validator:
Name: Validator
Title: Lead Quality Assurance
Adapter: claude_local
Monthly budget: $30
Heartbeat: every 20 minutes
Reports to: Researcher
Validator instructions:
You are a lead quality validator.
When an issue arrives with in_review status:
1. Verify all required fields are filled
2. Validate email format (must have @ and valid domain)
3. Remove duplicate leads (same email or LinkedIn)
4. Verify title is actually a decision-maker
5. If >20% of leads are invalid, return to Executor
6. If approved, format as CSV and save to workspace
7. Change status to done
Rejection criteria:
- Generic email (info@, contact@, hello@)
- Title not decision-maker (intern, assistant, coordinator)
- Company with <10 employees
- Incomplete data (missing 2+ fields)
Step 5: Configure budgets and protections
In Paperclip dashboard, go Settings → Budget:
Company global budget: $150/month
Per agent:
- Researcher: $50/month (soft warning at 80% = $40)
- Executor: $50/month (soft warning at 80% = $40)
- Validator: $30/month (soft warning at 80% = $24)
Hard stop: 100%—agent paused automatically
Circuit breaker: pause on 3 consecutive failures
This ensures you never wake to surprise API bills.
Connecting OpenClaw as executor
This is the part no other tutorial shows. OpenClaw functions as the “muscle”—it executes heavy lifting while Paperclip manages coordination.
OpenClaw setup
# Install OpenClaw on same server
git clone https://github.com/openclaw/openclaw.git
cd openclaw
npm install
# Configure environment
cp .env.example .env
In .env, configure:
OPENCLAW_LLM_PROVIDER=anthropic
OPENCLAW_MODEL=claude-sonnet-4-20250514
OPENCLAW_API_KEY=your-api-key
OPENCLAW_TOOLS=browser,shell,http,file
OPENCLAW_BROWSER_HEADLESS=true
Connect to Paperclip via gateway
Paperclip has native OpenClaw adapter: openclaw_gateway. Connection uses SSE (Server-Sent Events) for streaming and device-key pairing for auth.
In Paperclip, when you create Executor agent with openclaw_gateway adapter, system generates connection token. Copy it and configure in OpenClaw:
# On OpenClaw server
openclaw connect --paperclip-url http://localhost:3100 \
--token YOUR_CONNECTION_TOKEN \
--agent-id executor-agent-id
After connection, OpenClaw waits in standby and responds to Paperclip heartbeats.
Running the first iteration
Once everything is configured:
# In Paperclip directory
pnpm dev
Watch the first cycle:
- Minute 0: Researcher wakes, sees goal, creates 2 issues
- Minute 15: Executor wakes, grabs issue, opens browser, starts scraping
- Minute 20: Executor completes, comments data, changes status to in_review
- Minute 20: Validator wakes (on heartbeat), sees in_review status, validates
- Minute 25: Validator completes, saves CSV to shared workspace
- Minute 30: Researcher wakes again, monitors progress, sees 20 leads generated in 30 minutes
That’s 20 qualified leads in 30 minutes with zero manual work. Scale to daily operation and you’re generating 200-300 leads per week without touching a keyboard.
Monetization paths
1. Self-directed lead generation
Run this for your own product. If you sell a niche SaaS, automated lead generation at this scale is worth $10K-50K/month in avoided sales costs alone.
2. Leads as a service
Package this as a SaaS service. Customer pays $500-2000/month for weekly lead batches in their niche. Your cost: ~$50/month in API + time to customize ICP. Margin: 80%+.
3. API for lead gen integration
Build an API that other solo builders call to generate leads. Standard pricing: $0.50-2.00 per lead. Monthly recurring: $2K-10K depending on adoption.
Limitations and handling
- Websites change structure: scraping breaks when sites update HTML. Validator catches bad data. Researcher adjusts sources.
- IP blocking: some sites rate-limit. Use rotating proxies if needed.
- Data quality: not every scraped email is valid. Validator catches most issues. Budget allows for re-scraping.
- API rate limits: OpenClaw respects limits. If Hunter.io limits requests, Paperclip pauses agent until reset.
All manageable with governance framework. You won’t wake to $5K bills because agents exceeded budget.
Next steps
- Run
pnpm install && pnpm devon Paperclip - Create company in dashboard
- Define your ICP (ideal customer profile) clearly in goal
- Configure three agents with role-specific instructions
- Watch first cycle—you’ll see if tweaks are needed
- After validating quality, run weekly. By month 2, you have a lead pipeline worth $50K+ in SaaS value
The window for autonomous agent operations is open now. Most builders haven’t tried this yet. Your advantage is real.
References: Paperclip—GitHub, OpenClaw—GitHub, OpenClaw Docs
