The 90 seconds that used to take hours
Every year, 1 in 7 insured Americans has a health insurance claim denied.
The denial letter isn’t the hard part. What comes after is: someone, usually a medical billing specialist, not a doctor, not a lawyer, has to read the denial, decode the reason code, dig through payer policy, track down clinical evidence, draft an appeal, check every citation by hand, watch the deadline, and get it submitted before the window closes.
That’s hours of procedural work standing between a patient and care they were already supposed to get.
The question I couldn’t let go of
Where should an AI agent stop in an enterprise workflow?
Not “how autonomous can I make this.” A narrower, harder question: where does preparation end and a human decision begin?
The answer I landed on became the whole architecture:
AI prepares. AI verifies. Human authorizes.
That boundary, not the model and not the agent count, is the actual product. Everything else exists to make that boundary enforceable.
What I built
DenialDefender is an 8-agent Google ADK fleet that runs an insurance denial through a governed pipeline instead of a single prompt.
Agent Job Patient Advocate Intake, urgency, deadline extraction Denial Triage Reason-code classification, appealability assessment (Gemini 3.6 Flash) Policy Research Payer policy contradiction retrieval Evidence Assembly Clinical evidence with provenance tiers Citation Verification Citation resolution and SHA-256 hash matching Letter Drafting Evidence-grounded appeal letter with inline citations (Gemini 3.6 Flash) Quality Review Adversarial 7-check battery that refuses to pass until every claim is grounded Deadline Tracker Deadline monitoring and escalationTwo human-in-the-loop gates sit inside that pipeline. Gate 1: a human confirms the triage before research begins. Gate 2: a human approves the final letter before it’s submitted. No letter reaches a payer without explicit human sign-off.
Why Gemini 3.6 Flash
Two agents in the fleet do the real reasoning, and both run on Gemini 3.6 Flash via the Vertex AI global endpoint. Denial Triage classifies the denial and estimates appeal success. Letter Drafting generates the appeal letter itself, with citations that resolve back to hashed evidence. Take away Gemini 3.6 Flash and those two agents have nothing to reason with.
The governance layer
Trust isn’t a claim here. It’s four mechanisms, each with an auditable proof:
- PHI Guard: a 10-pattern classifier that runs before model invocation. On block, zero model calls happen.
- Agent Identity: runtime RBAC enforcing 4 violations. Quality Review cannot write appeals. Letter Drafting cannot read outcomes, which keeps bias from leaking backward into the draft.
- Domain Validator: 20 automated rules pulled from CMS X12, 42 CFR, and AMA CPT.
- Decision Trace: every step, gate, and permission check persisted as a structured, inspectable event.
Evidence the architecture actually works
I built three evaluation harnesses instead of just asserting the system works.
- A 31-file evidence corpus pulled from 10 public sources (CMS, HHS, KFF, AHA, GAO, OIG, Noridian, X12, Health Affairs), SHA-256 hashed and provenance-tiered.
- Outcome learning across 10 held-out cases, measured before and after outcome ingestion. Top-3 accuracy went from 70% to 88%. Citation grounding went from 75% to 89%.
- Agent ablation across 1, 3, 5, and 8-agent topologies on the same 10 cases. Unsupported claims dropped from 4.9 per case to 0, and only the full 8-agent topology got there.
The hardest lesson
Honesty is an asset, not a liability.
The outcome-learning dataset uses 5 public records and 45 synthetic ones. I labeled it that way instead of presenting all 50 as real. The GEAP components report backend=local honestly instead of hiding it. Every one of those choices made the architecture stronger, because the claim can be independently checked against the underlying evidence.
Try it
- Live demo: https://denialdefender-web-7ffj23k2va-ew.a.run.app
- Source code: https://github.com/sodiq-code/denialdefender
- Demo video: https://youtu.be/tbxddtTvshk
AI prepares. AI verifies. Human authorizes.