Skip to content
Start a project

AI agents · Sports analytics

AI agents that answer sports stat questions in plain English.

People ask in everyday words, with nicknames and loose time ranges. The agent returns a stat table with a short summary. StatGPT, which we built for NBA, AFL, AFLW and cricket, got 99% of answers correct in the client's manual checks against Footywire and AFL Tables, Feb 2026.

accuracy in the client's manual checks, Feb 2026
99%
median response in a 1,000 question AFL smoke test
2.9 s
AFL nicknames recognized for players, teams and venues
781
off topic questions declined in testing
90 of 100

What a sports analytics agent does

It turns a loose question into an exact query, then shows the numbers.

  • Plain English questions answered as stat tables with a short summary.
  • Season, per game, advanced and round by round stats, plus head to head comparisons.
  • AFL players, teams and venues recognized by name or nickname.
  • Conversation memory for signed in users.
  • A data pipeline that loads NBA, AFL, AFLW and cricket statistics.

How the numbers stay right

A wrong number is worse than no answer. In the 2026 AFL engine, the model plans the query and our code writes the SQL.

  • 896 worked SQL examples sit in pgvector. A classifier picks the ones that match each question before a query is written.
  • In the AFL engine, the model returns a query plan. Our code validates it and writes parameterized SQL.
  • A Redis cache answers repeat questions in about 40 ms.
  • Forecasts and off topic questions get a fixed message, not a guess.

How it fits together

  1. People

    • Beta usersAsk in plain English, in chat or search
    • The client's teamPlans, limits and the admin console
  2. Apps

    • Next.js web appChat with memory for signed-in users, and search
    • Admin console
  3. Services

    • NestJS APIPlans and daily request limits
    • LangGraph agentsWrite and check the SQL for each question
    • AFL query engineThe model plans the query, our code writes the SQL
  4. Models and data

    • OpenAI models
    • PostgreSQL with pgvectorNBA, AFL, AFLW and cricket stats
    • Redis
    • Data pipelineLoads the statistics
How StatGPT answers a question

What the build took

Team
12 engineers plus PM, QA and design
Timeline
22 weeks for the chat agent, 81 weeks for the whole platform
Stack
LangGraph agents, a NestJS query engine, OpenAI models, PostgreSQL with pgvector, Redis
Status
Private beta for investors

How we deliver

  1. Scope the use case

    We pick one workflow, list its data sources and write down what a correct answer looks like.

    Output Use-case brief and a first test set

  2. Design the agent and its guardrails

    We define the tools, access rules and model, and mark the steps where a person reviews.

    Output Architecture, tool list and permission map

  3. Build in milestones

    A working agent comes early. Each milestone adds tools or data you can try on real cases.

    Output A running agent at every milestone

  4. Evaluate and run in production

    We measure accuracy on the test set, then launch with logging and review queues in place.

    Output Evaluation report, runbook and a live agent

Shipped work

Questions about sports analytics agents

Short answers to the questions we hear most often.

Which sports does StatGPT cover?

NBA, AFL, AFLW and cricket, with AFL as the launch sport.

Does it draw charts?

No. StatGPT answers with stat tables and a short summary.

Can I try StatGPT?

No. It runs as a private beta for the client's investors. The full build is in the case study.

Have an agent, protocol or product to ship?

Send a short brief and we'll reply with times for a 30-minute scoping call.