Agents on FHIR

Grounded, governed, graded: WSO2's prior-auth agent as a reviewer's assistant — Oct 29, 2026

Joel Sathiyendra
Joel Sathiyendra
Software Engineer
Nikolai Ryzhikov
Nikolai Ryzhikov
CTO at Health Samurai
John Moehrke
John Moehrke
Co-Chair: Security WG at HL7, Standards Architect at By Light Professional IT Services
Giulia Baldini
Giulia Baldini
Senior AI Engineer at Coforix
Gino Canessa
Gino Canessa
Principal Software Engineer at Microsoft
Oct 29, 2026

Register to get the calendar and joining links for the weekly calls

One registration covers every upcoming Agents on FHIR call.

Sign in to register

Don't have an account? Signing in creates one in seconds.

Joel Sathiyendra of WSO2 joined from Sri Lanka for the EU slot to walk through an electronic prior-authorization (ePA) agent his team built as a reference implementation on WSO2's agentic healthcare architecture. WSO2 is a 900-person middleware company that has crossed $120M ARR; Joel sits in the solutions business unit, which builds for healthcare, government, and banking. His thesis for the hour: the model is the easy part - the harness around it is the product.

Nikolai Ryzhikov hosted. John Moehrke, Gino Canessa, and Giulia Baldini pushed on evaluation strategy, model cards, and where the "model evaluating model" recursion stops.

Demo: a prior-auth reviewer assistant with cited verdicts

Joel framed the ePA agent as an assistant, not a replacement - PA decision windows are shrinking under regulation, but accountability has to stay with a human reviewer because LLMs are non-deterministic. A request runs through four agents sequenced into a workflow: eligibility, clinical evidence, policy criteria, then a decision summary. Each one has its own tools and knowledge bases, and the final summary carries citations back to the exact clause and record line that produced each finding.

Joel Sathiyendra
Joel Sathiyendra
Software Engineer

A lot of tasks today we cannot automate with AI, but we can assist with AI. Because in a lot of tasks the problem is it's an undeterministic system, and who are we going to hold accountability of?

The admin console pulls data from a FHIR server plus FTP sources for X12 and PDFs - the PDF side being where most of the design work actually went. The agent also generates a FHIR questionnaire for whichever gaps it finds, hands the reviewer a copilot to drill in, and writes results back to the EHR under the reviewer's permission, not its own.

Joel Sathiyendra
Joel Sathiyendra
Software Engineer

The trust is established when with citations. On what basis does it say this is not provided? If we go here I can see, okay, this is the place where the agent has referred.

Policy PDFs modeled as a knowledge graph

The thing Joel wanted the room to internalise was that payer policy PDFs are not flat text. Each policy is a tree of clauses joined by and/or operators, and some clauses point to other PDFs or to external portals. Treated naively as a prose blob, it degrades fast; dissected into clauses connected by operators, with cross-document edges, it becomes a graph the LLM can traverse node-by-node and cite from.

The preparation step matters because, in Joel's framing, junk in gives junk out - and with the right structure, a smaller, cheaper model with evaluators often matches a bigger one. Modelling the policy as a graph also solves a memory problem downstream: the agent doesn't need to hold the whole document in context, only the nodes it is currently evaluating.

Governance with Agent Manager and hourly online evaluators

The governance layer is WSO2's Agent Manager, released recently on top of Open Core (their CNCF-donated Kubernetes platform). Setup is four steps: expose MCPs, configure the AI gateway, build the agents, then run-govern-observe-evaluate. WSO2 ships a prebuilt FHIR MCP server, and MCP servers can be generated from any API definition.

The AI gateway sits between agents and LLMs as a proxy that handles model routing (cheap model for simple asks, bigger model for complex ones), semantic caching to deduplicate similar prior auth requests and save tokens, cost monitoring, and guardrails. Each agent gets its own identity with downscoped permissions - the demo agent runs under a read-only MCP role, and writing results back requires the reviewer's permission on their behalf, not the agent's own token.

Online evaluators run every hour against the live agents and plot scores for groundedness, instruction-following, token efficiency, latency and budget. During the demo one of the clinical-evidence agents flagged red for not following instructions well, which in production would call for prompt fine-tuning or suspending the agent and alerting a human. The point of running evaluators continuously, not just offline before release, is that drift happens after deploy.

Lessons: grounding, evaluators, memory

Joel distilled the harness design into three moves.

Grounding means always resolving back to a source of truth and surfacing a citation, because LLMs will confidently lie otherwise. In practice this is the policy knowledge graph plus the FHIR server plus PubMed - the agent traverses and cites, it doesn't hold-and-summarise.

Evaluators act as the agent's test suite. Rule-based checks cover the parts that are mechanically checkable - FHIR questionnaire structure, SQL library validity, the exact fields that must be present. An LLM-as-judge only enters where context actually matters, like whether a generated question matches the review finding it was supposed to cover. Joel's practical rule: don't reach for a judge model when a validator does the job.

Memory gets scoped per clause and per case. Unrelated clauses from a single policy, and unrelated PA cases from the same reviewer, don't need to share context - keeping them isolated saves tokens and keeps citations clean. Joel pointed at the AI Engineer talk where a model as weak as GPT-3.5 held up well inside a tight harness, as evidence that harness design, not model choice, is where most of the lift comes from.

Joel Sathiyendra
Joel Sathiyendra
Software Engineer

The model is actually the easy part. The harness is the product.

Open question: masking PHI inside agents

Joel paused the lessons section to put a question back to the community. Regex masking fails because names and locations show up in too many forms. Machine-learning PHI reduction - including the popular open-source models on Hugging Face - leaked PHI across every one of his five test runs. So neither path alone is safe.

Joel Sathiyendra
Joel Sathiyendra
Software Engineer

I personally did run a test on popular PHI redaction models, and across five different runs five different PHIs were leaked.

The two options he's weighing both avoid masking entirely. One: use the fact that FHIR tells you which fields are PHI, and let the integration decide what to send to the model in the first place - keep PHI off the wire by design. Two: sign a business associate agreement with the LLM provider and send everything, which is what some payers already do with enterprise contracts. The room didn't converge on an answer; Joel left it open.

Benchmarks, and AI Transparency on FHIR

Nikolai pressed on evaluation design: numbers are the easy part, the hard part is building benchmarks you can trust the meaning of.

Nikolai Ryzhikov
Nikolai Ryzhikov
CTO at Health Samurai

How do you design benchmarks so you can trust the result? That's the simple part - numbers. But the meaning.

Joel's answer broke in two directions. For the harness itself, write evaluators for groundedness, accuracy against policy, and accuracy against PubMed - and ground any LLM-as-judge with its own citations so you can inspect why it scored a run the way it did. For end-to-end accuracy, the honest answer is that a realistic PA dataset is the missing piece because that data sits inside payer companies; he promised to post a research paper on the data-availability problem in the Zulip chat. WSO2 hasn't published its evaluators yet; Joel will check with the team about open-sourcing them.

Giulia Baldini raised the obvious recursion worry: if a model evaluates another model, where does it stop?

Giulia Baldini
Giulia Baldini
Senior AI Engineer at Coforix

At some point you have a model evaluating another model. Where does the recursion end?

Joel's answer was that the recursion ends where the human reviewer sits - the agent is always an assistant, not an autonomous decider, so a person closes the loop on every case. John Moehrke tied the whole demo back to the AI Transparency on FHIR IG, which is landing soon as a framework built on Provenance, Device, and AI standards like model cards. He thinks Joel's agent is exactly the kind of thing that will need additional artifacts layered onto that framework.

John Moehrke
John Moehrke
Co-Chair: Security WG at HL7, Standards Architect at By Light Professional IT Services

The IG as it's coming out soon is just purely a framework that just leverages Provenance and Device and AI standards like model cards. It's just intended to be the first framework.

Joel hasn't used the IG yet but expects to integrate it in the next iteration. Nikolai closed the call thanking Joel; Joel said he'd be back for the US-time slot in two weeks.