AIAI EngineerAug 19, 2026· 20:25

Healthcare’s Agent Bytecode: X12 as the Harness for AI Agents — Vasant Kearney, Onlay

Vasant Kearney of Onlay argues that X12, the healthcare claims data standard, is the harness for AI agents: every step of the claim lifecycle—from eligibility (270) through acknowledgment (999) to payment (835)—has an X12 correspondence, and an agent calling a payer or driving a portal is emitting the same transaction by another route. He says phone, portal, and X12 surfaces are built by different teams and can all agree on the wrong answer, so no surface is ground truth; his system keeps a semi-correct internal X12 representation, correct only until downstream evidence says otherwise. Enterprise memory must live in a database rather than local disk, and swapping in a stronger model is not automatically better inside a system built around the old one—evals and validation must be redone. The goal is cutting insurance costs and improving patient experience, and that means being AI pilled but also AI skeptical.

  1. 0:00Intro
  2. 1:07The goal
  3. 1:59AI evolution
  4. 3:07AI limits
  5. 6:17Execution layer
  6. 7:23Memory & models
  7. 8:31X12 harness
  8. 10:02Errors & memory
  9. 12:36Claim lifecycle
  10. 15:31No ground truth
  11. 17:14Patient journey
  12. 19:00AI skepticism

Powered by PodHood

Transcript

Intro0:00

Vasant Kearney0:13

Hey everybody. How's everyone doing today? Good.

So, this is a bit about my background, but I think it's always really good to learn what the audience background is. If it's more on the technical side, which I know this conference is, healthcare side, let's get a quick show of hands to see who here is on the healthcare side.

Ooh, wow, that's a lot of you. That's more than I expected, wow. Okay, who here is on the technical, does agentic workflows? Wow, okay, overlap. Allright, that should be expected at this conference. Who here has models runningright now somewhere doing some work?

Wow. It's like the whole audience. Okay. Allright, so I know who I'm talking to. Wonderful. This is theright crowd. So,

what is the goal of this? Like, if we're working in healthcare and we're doing some agentic workflows, we have to keep in mind the goal. And that goal, at least from my perspective, is to drive the overall cost down.

The goal1:07

Vasant Kearney1:23

So, and this talk will be about insurance costs specifically, the cost of interacting with insurance, but also to improve the patient experience, because insurance relates back to the patient and how they experience the whole process. So let's keep that in mind when we're solving problems.

I know that if we're on the technical side, we like to get really experimental with things and get excited about just the technology itself, but it has to be grounded in one of these two concepts.

So, a little trip down memory lane, just starting from this long journey of AI, machine learning, and where we are today. And we're obviously going to talk about the last point, this agentic execution layer. But we can see this evolution from the neuron, convolutional neural networks, large scale unsupervised learning back in 2011, 2012, then the introduction of attention is all you need, one of my favorite titles for a paper, the introduction of the transformer.

AI evolution1:59

Vasant Kearney2:33

Then we go into this modern chat interface with these large language models, and then finally with the Claude codes, the codexes, and our system internally, and a lot of systems, you have OpenClaw, Hermes agent, all that kind of stuff, which really brings into the picture this execution layer.

So we're going to be talking about how to do this execution layer safely and reliably in healthcare.

So let's think back to some of the earlier examples of, like, getting really excited about some AI technology and then realizing it has all these little bits and pieces, which make it a lot more trickier than maybe it is obvious at first.

AI limits3:07

Vasant Kearney3:21

So, like, you have a check and you want to cash it, you want to deposit it into your bank account. You might say, "Oh, we have solved the handwritten digit problem, we can recognize digits from 0 to 9,"right?

Wow, oh, oh, so now we're ready to deposit this check into this person's account and transfer money. Well, not quite, because as you dig in a little bit deeper, you see that you have to identify all sorts of characters in the check, you have to make sure it matches up with all these other pieces of the infrastructure.

You have to make sure that it is, that it is going to the target account that you're interested in. So parts of this can be thought of as the harness. In claims, we have a similar challenge, that there's a lot of these little AI steps involved in fulfilling that whole patient journey of eligibility to getting the insurance company to deposit money in the provider's bank account.

A whole bunch of little steps, and we have to make sure that we're safely doing this, that we're operating, like, in these tight, these strict confinements.

So another thing that comes up, just sort of setting the stage, is that

multimodal context, and it comes up very frequently with claims. So you might have an image, and it might seem like at first for cost reasons or something else, that you'd want to take that image and reduce it down to the findings.

Like, here's the anatomy in the image, and maybe even extract some geometries from that anatomy. Here's pathologies. And then you would take that and then combine it with some other machine learning, with some other data in a different downstream machine learning model, like EHR.

And that might make sense from a cost perspective and also just, like, model capabilities. But in a lot of situations, you lose context. So it might be that you're extracting all this information and missing something that relates to some downstream procedure that you didn't, that wasn't, the upstream model wasn't aware of it.

So that introduces this concept of just multimodal processing. So another place this comes up in healthcare, but not related to anatomy or anything like that, is desktop use. You can see that sometimes, you know, things are buttons or, you know, might have some shapes that are only obvious when you do this multimodal.

Execution layer6:17

Vasant Kearney6:17

Allright, what is the agentic execution layer? So this can, this can take on a lot of different forms. It is the ability of this model to take actions. So it might be you're starting out with

database queries, and let's say just completely open. You're querying the database, you're finding your schema, you're figuring out what this, what the data looks like, and then it might even have access to your code. So then you're querying your code with respect to your data, and you might actually, in our system or other systems, you might be making insurance transactions, you might be making a phone call, you might be looking at a web portal, you might be interfacing with an EHR.

These are all actions you can take. And some of these actions haveright implications. If you're interfacing with different PMSs, you're going into the desktop, you can have at least user logs at the minimum.

And then the next concept is memory. So Claude code or codex, they use local memory, they write to your desktop. In enterprise healthcare, we can't really do this, so we do memory in a database, just so we have that logical separation.

Memory & models7:23

Vasant Kearney7:41

An important concept here is that when you're introducing new and improved, better models, more sophisticated, more parameters, you can't, you can't just replace the model and assume it's going to be better. It's different,right? It's a, it's a, on certain evals it's a better model as measured by these different metrics, but it doesn't necessarily mean it's better for all the situations that you want it to be better at, because of the way you've designed your system.

So you really have to redo everything from scratch. Just make sure your evals, your testing, your validation is all set up so that you can introduce these new models and not break your system.

X12 harness8:31

Vasant Kearney8:31

So this concept of harness, different groups have different definitions of this. So I'm going to use a super broad definition here, which is like all the different nuts and bolts that surround this agentic reasoning. And that is the concept of memory that we discussed, the different tools, the checks, the permissions, the handoffs, the evals.

But also in the context of healthcare and claims, it's X12. So just like we have these old school languages or formats like Cobalt or other stricter, maybe strict languages, TypeScript, LLMs really thrive. They work well when they're confined, they have clear limited values that they can predict.

And X12 is exactly this. So it provides this underlying structure, this contract between what you're trying to communicate and the insurance company.

So when you're reasoning in this, in this healthcare, your objective is to do something, handle a claim, or research your EHR with respect to claims. It might be that you have like 50 steps or something like that. There's a lot of different steps.

And so you can, at each of those steps, as you make mistakes, those mistakes can propagate down your system. And so it's very good to have something grounded that can be rejected too. So if you have really strict guardrails, you can reject something that happens that's incorrect.

Errors & memory10:02

Vasant Kearney10:28

So

if you're reasoning over, let's say the previous example, 50 steps, and they're multimodal, you're considering images and everything like that, that can get really expensive. It can also take a really long time, and folks might not want to wait.

You know, it could be too expensive and people don't want to wait that long, and each time, each step is an opportunity to introduce an error, and you can have problems. But if you hard code your whole system, you say, we're going to throw out this whole agentic process, you limit yourself or your code can explode to be just unmanageable.

So now all of a sudden you just have this crazy bloat, and you have to have this giant engineering team, which poses its own problems. So what we want to do is strike this balance between what we should be completely free, like with just pure agentic reasoning and execution, and what is hard coded.

So we do that internally with introducing memory, just this partner level memory, organizational, organizer memory, and user memory. So we say if a user, we find people in multi-site health organizations, they tend to do the same thing day after day.

And it might be if they mention a few words, "Oh, they usually do eligibility, and they usually do it within this context, they probably mean this,"right? Where another user, they probably mean that. So we want to be really careful here because as you introduce memory, you also, persistent memory across chats, across days, you also introduce bias.

So maybe that person doesn't want to do the exact same thing that they did yesterday, and now you steer them to do the exact same thing they did yesterday. That's a problem. So you want to strike a balance somewhere in there, and you want to make sure that any user can break out of this.

Claim lifecycle12:36

Vasant Kearney12:36

So for folks that are unfamiliar with the whole claim lifecycle, it's many steps. So each step does have an X12 correspondence with it, starting with the schedule when, let's say you're showing up at the doctor's office, before you even show up.

That's insurance starts then. When you're getting treated, that also relates to insurance, what you, you know, the different procedures that you are a candidate for, depending on your insurance, your documents, sometimes the X-ray itself is the document, and you would send proof of that in, submitting the claim, and then finally getting the payment in the provider's bank.

So this, I think this concept is a little bit, I found it to be obvious in retrospect, but let me talk you through it. Maybe you find it's interesting or not, but if you're calling an insurance company, that boils down to a transaction, an X12 transaction.

You'd say, "Hey, this is the patient I'm talking about." Great, that's like an eligibility request, a 270. "Oh, I need to do, you're requesting a claim status," or whatever it is you're doing. That has an X12 grounding, and that is the whole concept here, this X12 harness.

So you call the insurance company, you have an agent interact with the desktop, you have an agent interact with the browser, your imaging system, that's a 275, and your insurance, your bank, your ACH. So that's not X12, but still that structured transaction.

So this is just a reiteration of these different transactions. And the other beautiful thing about it, it's not, you know, you ask an agent to do something, let's say you're agentically programming, or let's say you're just, you're programming how, you know, maybe half the companies I spoke with here still program today just everything by hand, and they use these Claude code or codex for research.

If you look up any of these transactions, they're all public. Like this is not, the beautiful thing about this is like, this is not my schema. If you ask agents to make a schema for you, you're going to get like all sorts of stuff.

But now if we ground it in something standard, you can look up all of these, and you would know justright off the bat my schema. Let's say you're a new engineer coming in, like, you know.

So X12 is

No ground truth15:31

Vasant Kearney15:35

a system of rules, and it doesn't mean that when an insurance company gives you an X12, it's true. So that concept is, when an insurance company tells you something, it's coming from different teams potentially. They can have an engineering team that's, it could be even a different company.

A different company that the insurance company contracts out designed their web browser, their phone system, or their X12 layer, or their fire. And we have to understand that there's no ground truth. They also, within all these systems, they can, they can all actually agree on the wrong information as well.

Like let's say they all say this patient is covered, all three, you call them, you look in the browser and the X12, and they all say, "Yes, this patient is covered." And then you treat the patient, they say claim is denied due to the patient wasn't covered during that time.

So they can all disagree, but sometimes you'll learn some idiosyncrasies of these different payers that some of these systems are more reliable than others. But regardless of if it originates as an X12 or not, you can boil all those transactions down to your own internal semi-correct X12.

Correct until downstream evidence proves it otherwise to be incorrect.

So just a little bit more on that. So any of the X12, any of the information coming from the insurance company at any time can be wrong, and it can be updated later. So have fun.

This is just an example of what it would look like if you're in that patient journey, you're trying to figure out how much you would pay as a patient upfront, and it's very important for your experience going to the doctor.

Patient journey17:14

Vasant Kearney17:33

And then the different treatments that you have in that clinic can,

yeah, the different treatments that you have in that clinic can be the evidence that you need. Like you might get a CBCT. Well, that, those images and the slices of those images might be the evidence that they're asking for.

So ultimately, if you're delivering that treatment, you're sending that claim, that claim is like a receipt of what you did. I did this, like here's the invoice,right? Like you send it to the insurance company as an invoice, and they would pay you back.

So that is your ultimate like contract of you're saying you did this work, it's sealed, and now the ball is in the insurance company's court.

And just a little bit about this progression of the claim from you're sending it, you're getting some acknowledgment, it has like the syntax isright with that 999, the status has been updated, "Hey, cool, we received it." Maybe you call them and you verify if the status didn't come in, then you have this EOB, 835 receipt of payment.

AI skepticism19:00

Vasant Kearney19:00

And then we're getting to the end of this talk here, but I think that, you know, LLMs, I'm fully AI pilled,right? But we want to make sure that we introduce large language models, small, tiny models in a very skeptical, conservative way.

So being AI pilled is great, but you should also be very AI skeptical. Like these things, they make mistakes, and it's not even, you can't even say they make mistakes, like we make mistakes designing them. We might set them up to fail.

So we have to be very skeptical of them, and we have to use them in a way that's also cost effective. You can't throw, I mean, you don't want to use an overpowered, overexpensive model, because then if you're going back to if you're reducing costs or not, let's say it ends up being super, super expensive to deliver one of these routine things that need to be done a thousand times a day.

You definitely don't want that.

Allright, thank you very much.