Project
UK Company Due Diligence & Risk Intelligence Agent
An evidence-driven agentic research workflow for UK company due diligence and insurance underwriting pre-screening, with source-aware evidence, follow-up research, contradiction detection, and human decision boundaries.
Company research that shows its working.
Resolve the entity. Check the evidence. Surface the gaps. Keep the decision human.This project turns fragmented UK company data into a reviewable underwriting pre-screening assessment with source evidence, follow-up research, contradiction detection, and explicit limits.
The regulatory check is incomplete. The absence of an adverse result must not be interpreted as affirmative low risk.
Important findings retain source, retrieval time, quality, confidence, and structured source data for inspection.
The project thesis
The point is not more data. The point is reviewable research.The application does not simply gather company facts and ask a model for a verdict. It separates source evidence, AI judgement, deterministic controls, and human authority.
Company, filing, officer, regulatory, news, fraud, and ownership checks answer different business questions.
A source failure becomes an incomplete check, not a hidden clean result or a crashed research run.
The system produces findings and underwriting indicators, not an approved binding quote, refer, or decline decision.
Implemented system flow
Eleven nodes, one evidence-control loop.
The model handles bounded interpretation. Code owns workflow state, route validation, retries, evidence merging, and authoritative fact transport.
Understand
Turn the business request into typed research intent.
Resolve
Match the intended legal entity and company number.
Plan
Select the research dimensions required for the case.
Route
Choose a compatible registered source for each dimension.
Collect
Run independent retrievers concurrently inside one graph node.
Classify
Turn raw news candidates into typed risk signals.
Critique
Assess source authority, relevance, completeness, and quality.
Find gaps
Separate complete research from weak or missing dimensions.
Follow up
Decide whether a limited targeted research pass is justified.
Reconcile
Surface contradictions rather than silently averaging them.
Synthesize
Build the assessment while preserving structured source facts.
A stronger second-pass result can replace weaker evidence without erasing unrelated first-pass dimensions.
quality -> confidence -> recency
Research coverage
Eight dimensions answer eight different risk questions.
Keeping the dimensions separate prevents a large volume of weak public-web evidence from masking a missing authoritative source.
Company profile
Does the legal entity exist, and what is its current statutory status?
Companies HouseOfficers
Who currently manages the company, and what governance history is visible?
Companies HouseFiling history
Is the company maintaining expected filings, and are unusual changes visible?
Companies HouseRegulatory status
Is the firm authorised, and is relevant disciplinary history available?
FCA RegisterNews signals
Are there recent regulatory, financial, legal, operational, or governance events?
Brave + LLM classificationWeb evidence
Is there useful supplementary public context that supports further review?
Brave SearchFraud signals
Are there disqualification, phoenix-company, or possible sanctions indicators?
Companies House + OpenSanctionsBeneficial ownership
Who controls the entity, and are there ownership opacity or jurisdiction concerns?
PSC + OpenSanctionsResponsibility boundaries
Source facts, AI judgement, code controls, human authority.
The system becomes reviewable when those responsibilities remain visible instead of collapsing into one model response.
Source systems
- Provide statutory and public evidence.
- Return records, snippets, and screening candidates.
- Remain subject to availability, freshness, and matching limits.
Language models
- Understand, plan, classify, critique, and synthesize.
- Return typed outputs through Pydantic boundaries.
- Express judgement without becoming the authority.
Deterministic code
- Validates routes and enforces loop limits.
- Merges evidence and preserves authoritative facts.
- Converts failures into visible incomplete evidence.
Human reviewer
- Confirms identity and material findings.
- Applies appetite, authority, and specialist judgement.
- Owns the final business decision and override.
The trust rule
Evidence status must stay separate from risk severity.
A system cannot safely treat every empty result as a clean result. It needs explicit semantics for what happened.
The check ran successfully and returned no material adverse finding in the available evidence.
The source returned too little information to support a confident conclusion.
The check could not complete and may require retry, disclosure, or human referral.
A material finding exists, but its authority, entity match, recency, and business meaning still require review.
Engineering decisions
What makes this more than a multi-agent demo.
The reusable value is in the boundaries and failure handling, not the number of agent nodes.
Typed decisions
Every LLM decision becomes usable workflow state only after it passes a Pydantic output contract.
Executable routing
The source selector matters because its typed output changes the retriever factory that actually executes.
Concurrent collection
Independent synchronous retrievers run through worker threads under `asyncio.gather`, reducing avoidable sequential latency.
Cumulative retries
A follow-up pass improves the evidence map through deterministic merge precedence instead of replacing the first pass.
Fact preservation
Sanctions, enforcement, disqualification, ownership, and phoenix facts are copied deterministically into the final assessment.
Visible progress
FastAPI streams completed stages so a long-running research request has an inspectable operational path.
Operator reading order
Do not start with the headline score.
Until risk and confidence are calibrated, the assessment should be read from identity and missing evidence outward.
- Confirm the resolved company name and number.
- Review source errors and missing dimensions.
- Review sanctions, disqualification, enforcement, phoenix, and PSC findings.
- Review contradictions between sources.
- Inspect source quality and the evidence trace.
- Review the risk matrix and company-specific risks.
- Review referral, exclusion, loading, and decline indicators.
- Treat overall risk and confidence as synthesis summaries, not independent proof.
Project series
Business value first. Trust controls next. Engineering failures after.
The chapters form a guided system document. Links can replace the upcoming labels as each article is published.
Why fragmented company research is a workflow problem before it is an AI problem.
Launch chapterThe implemented LangGraph workflow, source boundaries, and evidence controls.
Launch chapterHuman accountability, referral authority, overrides, and decision limits.
UpcomingEvidence sufficiency, source failures, confidence, and false-clean results.
UpcomingWhat public evidence can establish and when specialist verification is needed.
UpcomingThe cumulative evidence bug and deterministic merge semantics.
UpcomingWhy valid schemas did not guarantee facts survived final synthesis.
UpcomingResponse drift, authentication, quotas, and partial live coverage.
UpcomingCalibration, identity gates, security, persistence, monitoring, and ownership.
Production closeHonest limits
Working research framework, not a finished underwriting platform.
The project is valuable because the control structure is visible. The remaining production gaps must be equally visible.
Explore the project
Inspect the code, then follow the system build.
The repository contains the workflow, schemas, connectors, tests, business documentation, operational guide, and implementation devlogs. The public demo stays behind a readiness gate until privacy, quotas, abuse controls, and live integrations are verified.