Insurance pricing is exactly the kind of domain where agentic AI is both tempting and terrifying. Tempting, because pricing decisions weigh risk, demand, competition, and fairness at once — a natural fit for specialist agents. Terrifying, because a hallucinated premium is a regulatory incident. ZenRate is my answer to that tension, and its core design rule is blunt: all pricing maths lives in a deterministic core that no agent can touch.
The maths agents can’t touch
Risk pricing decomposes into four composable interfaces — RiskModel, DemandModel, ProfitabilityModel, and Optimizer — wired together by a single pipeline, so a new line of business ships as a plugin, not a fork. Two lines exist today: travel insurance (a Poisson×Gamma frequency–severity GLM, logistic demand, and a constrained optimiser) and annuities (pure-risk reference pricing over public ONS mortality tables and EIOPA risk-free rates). Because the maths is plain scikit-learn and numpy, the system’s behaviour is unit-testable without ever calling an LLM.
Agents advise; one of them can veto
Above the core, four specialists — Risk, Market, Compliance, and Explainability — fan out in parallel over an in-process MCP tool layer. They advise, contextualise, and explain. The one with real power is Compliance: it can veto any price that breaches fair-value or affordability guardrails. Agents propose; the deterministic pipeline and the compliance veto dispose.
Memory a regulator could audit
Every quote produces a persisted DecisionRecord, and decision memory lives in a bi-temporal knowledge graph — you can ask not just what did we decide? but what did we believe at the time we decided it? Every quote is also scored on a dual scorecard measuring profit and customer outcome, so the system’s incentives are inspectable rather than implied.
Testing agents as rigorously as models
The test suite evaluates the models (coefficient recovery, calibration, fairness parity) and, separately, the agents (tool-call accuracy, parallelism, auditability). All 43 tests across nine suites run the full agent workflow hermetically — no SDK, no API key, no database — via in-memory fallbacks that swap for Claude orchestration and Graphiti/FalkorDB in production. CI never depends on an external service.
The paperwork should write itself from the architecture — not be reverse-engineered afterwards.
That’s why ZenRate ships with a compliance pack of roughly 30 documents mapping the system to FCA Consumer Duty and the EU AI Act. Not because a personal R&D project needs regulatory sign-off — because it demonstrates that agentic systems can be built so governance falls out of the design.
The reusable recipe
Nothing in the recipe is insurance-specific. Keep the numbers deterministic, give exactly one agent a veto, record decisions bi-temporally, and evaluate agents as rigorously as models — that shape transfers to lending, underwriting, and any domain where a wrong number is an incident rather than an oops. And because the whole thing is an MIT-licensed, end-to-end worked example in roughly 4.6k lines of Python, it doubles as study material: a complete, testable answer to the question “what does agentic AI under real regulatory constraints actually look like?”
Under the hood Python, scikit-learn, numpy, scipy, pandas, Claude Agent SDK, MCP tools, Graphiti/FalkorDB, DeepEval/Langfuse, Docker, GitHub Actions. Open source, MIT.