icp-agent
Autonomous lead-engagement agent. Receives {email, domain}, enriches, scores against an ICP, routes Hot/Warm/Cold, drafts a personalized first email, logs every decision.
Live status
Endpoint
live https://icp-agent-ten.vercel.app
Try it
curl -X POST https://icp-agent-ten.vercel.app/api/webhook/inbound \
-H "content-type: application/json" \
-d '{"email":"founders@linear.app","domain":"linear.app"}'
Returns
202 {lead_id, sheet_row_url} immediately. The background agent runs ~15s and writes a fully scored row to the
decision log .
What happens to each lead
POST /api/webhook/inbound {email, domain}
│
▼
validate + idempotency
│
append placeholder row → Sheet
│
respond 202 {lead_id} ← returns immediately
│
waitUntil(run agent) ← background
│
┌──── enrich (parallel) ────┐
│ scrape(domain) [cheerio] │
│ hunter.domainSearch │
└────────┬───────────────────┘
│
┌──── LLM assess loop (bounded ReAct, ≤2 deepen rounds) ────┐
│ action ∈ { score_now, fetch_linkedin, fetch_news, │
│ fetch_email_finder } │
│ agent picks; code executes; context grows; loop. │
└────────┬───────────────────────────────────────────────────┘
▼
LLM final score → {score 0-10, criteria_breakdown, reasoning}
▼
route to Hot ≥8 / Warm 4-7.99 / Cold <4 → LLM email
▼
Sheet row → status=done with full decision chain
Endpoints
POST /api/webhook/inbound — webhook receiver. Body {email, domain, source?}. Returns 202.
GET /api/leads/:id — fetch a single decision row by lead_id.
GET /api/health — dep-configuration check.
TypeScript · Hono · Azure OpenAI (gpt-4o-mini) · Hunter.io · SerpAPI · Google Sheets
Built as a take-home assignment. See
README for ICP criteria, decision logic, prompts, and what I'd iterate on.