Systems / UK Company Pre-Screen

UK Company Pre-Screen

UK Company Pre-Screen

A first look at a UK company for a commercial underwriter: written rules recommend a route, and every check that couldn't run says so.

StatusPublic demo: nine real example cases; demo codes on request
Development evaluation · 19 Oct 20269 companies, 9 of 9 target facts, AI-rescored · method and limits
Built withFastAPI, MCP, Postgres, gpt-oss models (via Groq or OpenRouter), Companies House and FCA APIs
Tests363 passing (29 Oct) · MIT licence

The problem

Before a commercial underwriter quotes for a UK company, they want to know one thing: is there anything on the public record that means I should refer this, decline it, or ask the broker a question first? The answers are spread across Companies House, The Gazette, the UK Sanctions List, the FCA Register and the news. A check that quietly fails looks exactly like a check that found nothing, and a tool that says "clear" when it didn't look is worse than no tool, because the underwriter stops looking.

The Pre-Screen answers that question on one screen, with a link to every source. The checks take 5 to 15 seconds, the optional AI review 20 to 60 more, and reading the page about a minute. It recommends a route. A named person decides.

Status: a public demonstration, not a product. The routes and most thresholds are my draft policy from public guidance; nobody with underwriting authority has signed them off.

The Pre-Screen case page for Monzo Bank Limited from the offline demo: route Refer, one referral reason (FCA action in July 2025), coverage 11 of 13 checks completed, adverse media couldn't be checked
The case page, from the offline demo data. The route and its reason come first, then a count of which checks ran and which couldn't.

How it works

Written rules decide. Models read text and explain. Each step is a file you can read.

  1. Pin down one company. If a name matches several, the underwriter picks, and no decision can be recorded until the company number and address are confirmed against the proposal (identity.py).
  2. Run thirteen checks (fourteen when the proposal says what the company does) against the public registers: status and filings, insolvency and Gazette notices, charges, directors and their other companies, ownership, sanctions, FCA authorisation, and the news. Each source has its own small client, and a source either returns data or says it failed, never an empty "all clear" (sources/, checks.py).
  3. Read the news against the company. One model call answers a narrow question: is this article about this legal entity? (media.py)
  4. Apply the rules. Thresholds are written down and versioned, and they pick one of four routes: Note only, Refer, Outside appetite, or Compliance hold (rules.py).
  5. Agents on top, through an MCP server. They explain a case and draft questions for the broker. There is no tool for recording a decision, and they can't change the route (mcp_server.py, agents_v2/). A guardrail checks their drafts and can hold one back; it isn't a guarantee.
UK Company Pre-Screen reference architecture. Underwriters use the case page and AI assistants use MCP, both through a FastAPI app with access codes and limits. Running a pre-screen goes to the deterministic core: identity.py pins one company, source clients ask Companies House, The Gazette, the UK Sanctions List, the FCA Register and news search, checks.py runs 13 or 14 checks with one model call for news relevance, and rules.py sets the route, which is saved with every gap. Above a read-only boundary, the agent layer is a LangGraph supervisor: load case, plan, three specialists (director history, news, broker email draft) and assemble in code. Each specialist works inside a guardrail of four code rules and a model judge, and can call only its allowed tools through toolbox.py. The MCP server has nine tools and none records a decision or changes a route. Only a named underwriter records a decision, which is added and never overwritten.
The whole system on one page: the route is set below the red line, and agents work above it, inside guardrails. Select it to open full size.

Two rules that make it reviewable

"Nothing found" isn't "clear". Every check ends in one of five states: clear, worth reading, flagged, couldn't check, or not applicable. A check is clear only when it saw everything: a source that failed, a list that was cut short or a news result nobody read is "couldn't check". If a critical check couldn't run, the best a case can be is Refer. The lesson behind this rule is Nothing found isn't the same as nothing checked.

No model writes the route. My first attempt let an agent write the risk level, and one bank came out "medium" because that was the schema's default value. That story is told in My AI agent called a fined bank "medium risk". Here the route is copied from the rules into every output, and the agents can only read it.

What works, and what doesn't yet

Works today

  • A pre-screen of a real UK company on live public data, usually in 5 to 15 seconds.
  • Every gap named on the page and in the file note, with a re-run button.
  • Decisions recorded with a reason and a name, added to, never overwritten.
  • The same checks as nine MCP tools, locally or over HTTP.
  • The core demo runs offline without API keys, on two captured real companies and five invented ones that show each route and failure. AI analysis requires a model connection.

Not yet

  • County court judgments aren't checked (paid data); they always show as not covered.
  • Registered societies, such as co-operatives, aren't covered: Companies House doesn't hold their directors or owners, so the tool says so and checks nothing.
  • HSE and Environment Agency enforcement aren't connected.
  • The public demo doesn't search The Gazette, which has refused its server since late October. It's listed as not covered, so a winding-up petition published there before Companies House records it won't show. Local runs search it.
  • Most thresholds are drafts from public guidance; someone with underwriting authority needs to sign them off.
  • The sanctions screen matches names and dates of birth against the UK list only. It's a pre-screen, not an insurer's sanctions process.
  • Large LLPs are slow, and only their first 15 members are checked, which the page says.
  • It has been evaluated on nine companies, not on a book of real referral decisions.

Start here

Try it

The live demo opens nine real example cases, read-only, with no sign-up. To run companies of your own, ask for a demo code from the demo page: five pre-screens and two agent reviews a day. The code is MIT-licensed on GitHub, and its core demo runs offline without API keys. If you underwrite commercial risks and see a gap, message me on LinkedIn.

The notes

  1. Version 1 let an AI agent decide. Version 2 lets written rules decide.A better model removes the model's excuses. What's left is the design: if a check has no way to say it didn't run, it will be reported as clean.
  2. Before you quote a UK company, know what wasn’t checkedAn underwriter needs a route and its reasons before quoting a company, plus an honest list of what wasn’t checked. A tool that hides its gaps is worse than none.
  3. Try the UK Company Pre-Screen yourselfTwo saved cases teach the difference between a check that couldn’t run and a finding on the record. Then screen your own company, or make it fail on purpose.
Built by Teja Sagiraju

AI engineer with 14 years across machine learning and applied AI: prompt design, document AI, LLM workflows and the review loops that make them safe to ship. I build real systems and write up what breaks along the way.

Connect

Get the next note by email

One short email when something ships or breaks. Free.