How to Build AI Farms for Lead Generation and Outreach
Last month I needed to pull fresh leads from LinkedIn, enrich each with company size and tech stack, then send a personalized cold email—all without hiring a VA.
I tried doing it manually and burned out after two hours.
Instead I built a small ai farm—three agents that hand off work to each other—and let it run overnight, which showed me how ai farms can scale outreach without extra headcount.
Why Most People Start with the Wrong Tool
Many guides tell you to slap everything into one giant prompt and hope the model figures out the steps.
That approach works for a demo but falls apart when you need reliability.
The model starts to forget earlier instructions, mixes up data, and you end up with duplicate or missing fields.
I learned this the hard way after watching my first attempt send the same email to three different prospects.
How to Structure Your ai farms for Reliable Hand-offs
Think of an ai farm as a small factory line where each agent has a single job.
The first agent scrapes LinkedIn profiles and returns a raw JSON blob.
The second agent takes that blob, calls an enrichment API, and adds company size and tech stack.
The third agent receives the enriched data, writes a personalized email, and drops it into a draft folder.
Each agent only needs to know its input format and its output format.
This keeps the prompts short and reduces the chance of drift.
Why do agents duplicate work when scaling?
When you run multiple copies of the same agent at once, they can all pick up the same item from a shared queue.
If the queue doesn’t mark an item as “in progress” before processing, you get duplicate work.
I ran into this when I launched ten scrapers simultaneously and ended up with three copies of the same profile.
The fix is simple: use a queue that supports atomic claim operations, or add a lock file that agents check before they start.
Once I switched to a queue with built‑in claim, the duplicates vanished.
Real Prompt and Cost Example
Here’s the exact prompt I use for the enrichment agent, run through OpenAI’s GPT‑4o.
You are a data enrichment specialist.
Given a LinkedIn profile JSON with keys: name, headline, company, location.
Return a JSON object that adds two fields: company_size (string) and tech_stack (array of strings).
Use public knowledge; if you cannot find a value, set it to null.
Profile: {input_json}
I feed the scraper’s output into this prompt.
Each call uses about 800 tokens.
At the current rate of $0.006 per 1k tokens, that’s roughly $0.0048 per lead.
For a batch of 500 leads, the enrichment step costs under $2.50.
I think that’s a fair price for the time saved—though some might balk at any per‑lead cost.
What Most Guides Get Wrong About Agent Hand‑offs
Most tutorials assume you can just pass the raw output of one agent straight into the next.
They ignore the need for a clear contract between agents.
If the scraper changes its field names, the enricher breaks silently and you get nulls everywhere.
I now version the schema and store it in a shared JSON file that both agents read at startup.
When the schema updates, I bump the version number and the agents automatically adapt.
This tiny bit of governance has saved me hours of debugging.
