← Back to my work

BUILD 05 / RESEARCH + OUTREACH AGENT / 25 SEP 2026

Koya Lead Desk

I built an agent that researches companies, checks whether they fit a sales brief, and drafts outreach for review. It can do the research and writing. It can’t send the messages.

View the code ↗Built + tested
10/10qualified in two recorded runs
0outreach send tools
151recorded unit tests

The problem

Finding leads means deciding who fits, searching for companies, reading their sites, and writing something relevant. I wanted a shortlist with reasons and sources, not just a longer list of names.

What I built

The Claude Agent SDK worker refines the customer profile, finds companies with Apify, reads their sites with Firecrawl, and checks them against the saved criteria. It drafts a three-step email sequence and a LinkedIn message. The web app and worker share their state through Supabase.

What the agent can’t do

There’s no tool for sending outreach, and the agent doesn’t guess personal email addresses. Hooks check the search criteria, run state, spending limits, and candidate budgets. Retrieved pages also go through an injection screen before reaching the agent.

What testing changed

An early run made 25 searches without finding a qualified lead. Broadening the discovery query helped later runs finish with ten qualified leads. I also corrected the budget wiring, provider cost tracking, and worker state. The linked test records cover those changes.

WHAT I LEARNED

What testing caught

I initially passed the budget cap into the actor’s input instead of its billing options. The unit test passed, but the real request had no cap. I fixed the wiring and checked the actual provider call.

Recorded live runs · 25 September 2026. The figures here come from those test records.

← See the other projectsGot a workflow in mind? ↗