EliconStart a project →
← ALL WORK

CASE 06

6 weeks

AI Sales Research Agent for B2B

Replaced three hours a day of manual prospect research with a structured agent.

  • TypeScript
  • Node
  • LangGraph
  • OpenAI
  • HubSpot API
Sector
B2B SaaS sales
Team
8 SDRs, 2 AEs
CRM
HubSpot
Engagement
Fixed scope, 6 weeks
Rollout
Browser extension + CRM workflow

A B2B sales team was losing half of every rep's day to prospect research before a single email got written. We built a multi-tool agent that assembles a typed dossier per prospect — company summary, ICP fit, recent trigger events, talking points — and writes it straight back into HubSpot where the reps already work.

THE PROBLEM

What was going wrong.

SDRs were spending the first half of every day on prospect research — web, LinkedIn, public filings, prior touches in CRM — before they could write a single email.

Research quality was entirely tenure-dependent. Experienced reps knew which signals predicted a reply; new reps copied company boilerplate into a template and wondered why nothing landed.

Prior touches were the worst failure. Reps regularly cold-emailed accounts a colleague had worked six months earlier, because checking meant three clicks nobody made under quota pressure.

The team had trialled a data-enrichment vendor. It returned firmographics — headcount, funding, industry — which answered 'who are they' but never 'why now', which is the sentence that gets a reply.

CONSTRAINTS WE WORKED UNDER

  • ·HubSpot stays the system of record; reps should not have to learn a second tool.
  • ·Per-prospect cost had to stay well under a euro at a few hundred runs a day, or the unit economics collapse.
  • ·Scraped sources are rate-limited and occasionally hostile; the agent had to degrade rather than fail.
  • ·Output had to be verifiable — a rep opening a claim needed to see where it came from before repeating it to a prospect.

WHAT WE DID

The short version.

  1. 01

    Multi-tool agent over web search, LinkedIn scraping, and HubSpot history.

  2. 02

    Strict structured output: the agent returns a typed dossier (company summary, ICP fit score, recent triggers, talking points) that writes directly back to HubSpot.

  3. 03

    Guardrails on cost and rate limits; any run over budget escalates to a cheaper model path.

  4. 04

    Browser extension that lets SDRs kick off a run on any LinkedIn profile.

ARCHITECTURE

How it's built.

01

Agent graph

A LangGraph state machine rather than an open-ended loop: plan → gather (parallel tool calls) → reconcile → score → write. Explicit state means a failed tool degrades the dossier instead of derailing the run, and every step is inspectable after the fact.

02

Tool layer

Web search, a LinkedIn scraper behind a rotating fetch pool, public filings lookup, news search, and a HubSpot reader for prior touches and open deals. Each tool has its own timeout, retry policy and cache TTL — company facts cache for days, news for hours.

03

Typed dossier

Output is a validated schema: summary, ICP fit score with reasoning, up to five trigger events each with a source URL and date, three talking points, and an explicit prior-contact section. Anything failing validation is retried once, then written as partial with the gaps marked.

04

Cost governor

Per-run and daily token budgets enforced in code. Crossing the per-run ceiling switches remaining steps to a cheaper model; crossing the daily ceiling queues runs to the next window and alerts. Cost is a system property here, not a monthly surprise.

05

Surfaces

A browser extension fires a run from any LinkedIn profile, and a HubSpot workflow triggers one when a lead enters a stage. Both write to the same contact record, so there is one dossier per prospect regardless of origin.

KEY DECISIONS

What we chose, and what it cost.

A constrained state graph instead of an autonomous agent loop

WHY

The research task has a known shape. Letting a model decide its own control flow bought nothing and made cost, latency and failure modes unpredictable.

TRADE-OFF

It cannot improvise on genuinely novel prospect types. In exchange, runs finish in bounded time at bounded cost, which is what a sales floor needs.

Every trigger event carries a source URL and date

WHY

A rep quoting a funding round that closed three years ago on a cold call is worse than no research. Dates and sources make staleness visible.

TRADE-OFF

Fewer triggers survive into the dossier, since unsourced ones are dropped. The reps preferred three verifiable facts to eight plausible ones.

Wrote back into HubSpot instead of building a research UI

WHY

Adoption follows the path of least resistance. The reps' day already runs through the CRM, and a second tool is a second thing to abandon.

TRADE-OFF

HubSpot field limits shaped the dossier format, and API rate limits required batching. Worth it — usage was near-universal in week one.

THE HARD PARTS

What nearly broke it.

Scrapers that break on a Tuesday

LinkedIn markup changes without warning. Rather than chase selectors forever, the agent treats any single source as optional: it reconciles whatever came back, marks what is missing, and still produces a usable dossier. Silent degradation to a partial result beat loud failure.

Company name ambiguity

Common names returned dossiers about the wrong company — confidently. We added a disambiguation step keyed on domain rather than name, and the agent now refuses to guess when domain evidence conflicts.

Talking points that read like a robot

The first version produced generic openers. The fix was not prompt engineering but input selection: feeding the agent the team's own highest-replying emails as examples of what a good talking point sounds like changed output quality more than any instruction rewrite.

HOW IT RAN

The timeline.

  1. 01

    Shadow a rep

    Week 1

    Watched two reps do research manually and wrote down every source they touched and every judgement they made. The dossier schema is that observation, formalized.

  2. 02

    Tools & graph

    Weeks 2–3

    Built the tool layer with caching and timeouts, then the state graph, benchmarked against dossiers the reps had written by hand for the same accounts.

  3. 03

    HubSpot integration & extension

    Weeks 4–5

    Write-back with idempotency, workflow triggers, and the browser extension. Cost governor added here, before the volume arrived rather than after.

  4. 04

    Rollout & tuning

    Week 6

    Two reps first, then the floor. Tuned scoring against which dossiers actually preceded replies.

OUTCOME

What changed.

~5×

Prospects worked per rep per day

3 hrs → ~20 min

Daily research time per rep

<€1

Cost per dossier

Enforced by the cost governor, not estimated.

100%

Trigger events carrying a source and a date

SDRs work roughly five times the prospects per day. Email reply rates improved because the opens are actually tailored.

The prior-contact section produced an unplanned benefit: duplicate outreach to already-worked accounts effectively stopped, which reps described as the single most embarrassing failure mode removed.

New-rep ramp compressed noticeably. A first-week SDR now opens with the same research quality as a tenured one, so coaching shifted from 'what to look for' to 'what to say'.

STACK

What it's made of.

RUNTIME

  • TypeScript
  • Node
  • Postgres
  • Redis

AI

  • LangGraph
  • OpenAI
  • Structured outputs
  • Model fallback path

INTEGRATIONS

  • HubSpot API
  • Web search
  • LinkedIn
  • Public filings

SURFACES

  • Browser extension
  • HubSpot workflows

HANDOVER

What they kept.

  • Documented tool-adapter pattern so their developer can add a source without touching the graph.
  • Cost dashboard and alert thresholds, with a written explanation of what to change when volume grows.
  • A rep-facing one-pager on reading fit scores and when to ignore them.