
Case study · Sales intelligence
ProspectIQ
Also developed as LeadScope AI
Evidence-grounded B2B research and sales intelligence.
ProspectIQ is an evidence-grounded B2B research and sales intelligence system. It combines multi-source research, deterministic scoring, Evidence Graphs, Delta Intelligence, internal Sales Knowledge retrieval and a bounded model-directed agent runtime. Consequential actions are proposed first, explicitly approved, reauthorized at execution time, executed atomically, audited, and resumed within the same AgentRun.
The system path
- External research
- Normalization
- Evidence Graph
- Deterministic signals & ICP
- Deterministic scoring
- Delta Intelligence
- Sales Knowledge RAG
- Model-directed tool runtime
- Capability matching
- Sales Copilot
- Write proposal
- Human approval
- Atomic execution
- Same AgentRun resume
- Grounded final result
Research is evidence, not prose
Every provider result is normalized into claims that carry a source, a time and a confidence. The Evidence Graph resolves those claims into facts, and FactResolver weighs sources with fixed, auditable quality weights: a crawl of the company’s own site outranks a directory listing.
Providers
- Tavily
- SerpAPI
- Apify
- Normalization
- Evidence Graph
- FactResolver
- Source quality
- Freshness
- Contradictions
- Coverage
Apify only runs actors the backend allowlists. The model cannot pass an actor ID, and there is no tool for fetching an arbitrary URL.
The score belongs to the backend
ICP fit, signals, digital maturity, the score breakdown and deltas are all computed in code. The model interprets the result. It never computes the facts it is interpreting.
- ICP match
- Signals
- Digital maturity
- Score breakdown
- Deltas
Digital maturity, as the code computes it
| Official website | 20 |
|---|---|
| Mobile responsive | 10 |
| Online booking | 15 |
| E-commerce | 15 |
| 10 | |
| Social presence | ≤ 15 |
| Contact channels | ≤ 15 |
| Review volume | 5 |
| Structured services | 5 |
Capped at 100. Low below 40, medium from 40, high from 70.
What changed?
A new research run is compared with the last one, fact by fact. Only a real change in a canonical fact becomes a change event, and its effect on the score is recalculated by the same deterministic rules.
- Previous research
- Current research
- FactDiffEngine
- ResearchChangeEvent
- Deterministic score impact
- Optional explanation
Changes it tracks
- Online booking added
- Branch count changed
- Rating moved
- New service listed
- WhatsApp added
- Hiring activity
The model never decides whether something changed. It can only explain a change the diff engine has already recorded.
Two kinds of knowledge
Lead evidence
What is true about the prospect?
Tavily, SerpAPI and Apify research, plus earlier runs.
Sales knowledge
What can we credibly sell them?
Services, case studies, playbooks, past proposals and internal docs.
- Capability match
- Supported opportunity
- Grounded outreach
No supported match
When nothing in the knowledge base fits, the Copilot says so. It does not invent a service to make the answer look better.
Retrieval sized to the corpus
Sales knowledge lives in MariaDB. Tenancy is filtered inside the query, then cosine similarity runs in Python over a bounded candidate set. The retrieval architecture is sized to the current corpus instead of adding vector infrastructure without a measured need. Retrieved text is always treated as untrusted.
A real agent runtime
The model picks each tool based on what the previous tool returned. The backend validates the arguments against the tool’s schema, checks workspace and permissions, runs it and hands the result back. The order of calls is never scripted.
- 01Model chooses a tool
- 02Schema validation
- 03ToolRegistry
- 04Permission and workspace checks
- 05Read or research tool runs
- 06Result returns to the model
- 07Model decides the next step
Tool classes
- Read
- Lead, evidence, score, history and deltas
- Research
- Tavily, SerpAPI and allowlisted Apify crawls
- RAG
- Sales knowledge, playbooks and case studies
- Write proposal
- Notes, follow-ups, tasks, stage, tags and drafts, as previews
- Action
- Deep-research requests and external sends. Sending is high risk and off by default
34 registered tools across five classes.
Server-side budgets cap steps, tool calls, searches, crawls and runtime, and identical repeated calls are blocked. One shared runtime serves every agent profile: research, sales copilot, read-only and admin.
AI can propose. The backend executes.
Proposal-time permission is never trusted at execution time.
- 01LLM proposal
- 02AgentAction
- 03Exact preview
- 04Human approval
- 05Current-user reauthorization
- 06Payload hash verification
- 07Atomic claim
- 08Domain service
- 09Execute once
- 10Audit
Expired, rejected or tampered actions cannot run, and approving an action that has already executed changes nothing.
Same-run resume
When the run reaches a consequential action it stops and waits. After the backend confirms the approval, the same AgentRun continues on the same live stream. No new workflow is started.
- Queued
- Running
- Waiting for approval
- Running
- Completed
Queued
An interactive replay of the lifecycle and its real event names, not a recording of a run.
Live event streaming with persisted replay and reconnect support.
Release verification
Gates from the latest release run.
Backend
- Ruff · clean
- mypy strict · 235 source files, no issues
- pytest · 519 passed, 0 failures
Frontend
- TypeScript · 0 errors
- ESLint · clean
- Vitest · 52 passed
- Production build · passed
End-to-end
- Playwright · 202 passed
- 19 intentional skips
- 0 unexpected failures
Live, demo and stub modes are explicit, and production fails closed instead of falling back to demo data.
Accessibility, in specifics
- Dialogs return focus to the control that opened them
- Focus stays trapped inside open dialogs
- Copilot, Evidence Graph and Research History are labelled regions
- Every select on the lead page has an accessible name
- Map markers are named after the company
- Live regions stay bounded during a Copilot run
- Statuses carry text, not only colour
- Arabic right-to-left
- 390px mobile without horizontal overflow
Audited with axe-core against WCAG 2.1 A and AA on the new surfaces and the lead page. Contrast was checked against the design tokens.
Real screens
Captured from a local build of the web app. The marketing strip under the hero is cropped out: it carries placeholder claims, not verified figures.


Inside the product
Logged-in screens from a local build running on the project's own demo seed. The names, units and amounts are fictional test data, not production figures.






Architecture
FastAPI, Pydantic v2, SQLAlchemy 2 and Alembic on MariaDB. Research through Tavily, SerpAPI and allowlisted Apify actors. A single agent runtime with a typed ToolRegistry, an approval gate and live event streaming. A React, TypeScript and Vite frontend, Docker Compose.
Stack
FastAPI · Pydantic v2 · SQLAlchemy 2 · Alembic · MariaDB · React · TypeScript · Vite · Docker Compose · GitHub Actions
Source
Private repository


