# Healthcare’s Agent Bytecode: X12 as the Harness for AI Agents — Vasant Kearney, Onlay <!-- ref: @content/youtube/aie/healthcare-s-agent-bytecode-x12-as-the-harness-for-ai-agents-vasant-kearney-onlay tags: [healthcare AI, insurance claims, X12 EDI, agent harness, agent execution, memory, evaluation, skepticism, cost] version: 3 updated_at: 2026-11-24T04:27:39.979Z --> **[Watch on YouTube](https://www.youtube.com/watch?v=UyyOoJmuATU)** # Healthcare’s Agent Bytecode: X12 as the Harness for AI Agents — Vasant Kearney, Onlay *Synthesized from Vasant Kearney's talk on AI Engineer, 2026-08-19.* Vasant Kearney, of Onlay, presents a talk to a technical audience about running AI agents on healthcare insurance claims. The talk is a single presentation with no host. ## Core Thesis Vasant Kearney argues that healthcare agent systems should be designed to reduce insurance costs and improve patient experience, and that the safest way to do this is to constrain agents with a standard contract. He proposes X12, the insurance transaction standard, as the "harness" around agentic reasoning, because LLMs perform better inside clear boundaries and each claim involves about 50 steps where errors compound. ## Key Insights - **Goal first.** The talk frames the target as lowering the cost of interacting with insurers, with the patient experience as a second goal. - **Small steps add up.** Like check-cashing, which needs far more than digit recognition, a claim moves through many small AI steps from eligibility check to payment. Each step must work within strict constraints. - **Multimodal context loss.** Reducing an image to extracted findings before passing it downstream can drop details the later procedure needs. - **Agent execution levels.** Agents can run database queries, query code against data, make insurance transactions, place phone calls, browse payer portals and write to EHRs. Some actions have real consequences. - **Memory must be separated.** Healthcare cannot rely on local agent storage the way coding tools do, so memory goes in a database with logical separation. Memory is kept at partner, organization and user levels, but persistent memory can also add bias by repeating past actions. - **Model swaps are not drop-in.** A newer model that scores better on metrics can still break a system designed around the old one, so evaluation, testing and validation must run before any replacement. - **X12 as structure.** X12 transactions such as 270 (eligibility inquiry) and 275 (attachments) give agents a constrained, public vocabulary. Non-X12 channels such as portals, phone and bank transactions can be mapped to the same internal format. - **No absolute truth.** Insurer systems can confirm each other and still be wrong, so the speaker treats incoming data as correct only until contrary evidence appears. - **Lifecycle.** Claims move through scheduling, treatment, eligibility, claim submission, file 999 syntax acknowledgment, status checks and the final EOB or Form 835 payment proof. - **Skepticism on cost.** Use small models where possible, because an expensive model running a routine task thousands of times a day erodes the savings. ## Actionable Takeaways 1. Constrain agent work with a published standard such as X12, and map every other source into one internal format with a confidence level. 2. Keep memory per partner, organization and user, and check it for bias that repeats yesterday's actions. 3. Build evaluation and validation before swapping in a new model, since the system design may not transfer. 4. Add strict safeguards that can reject a step, and expect errors to propagate across a roughly 50-step claim. 5. Price each routine agent task against its volume and use the smallest model that works. ## Notable Quotes > "LLMs thrive where they are constrained." — Vasant Kearney > "Consider it correct until further evidence proves otherwise." — Vasant Kearney > "We're making mistakes when we design them." — Vasant Kearney --- *Related: `@protocol/eval` · `@content/web/github/2026-11-26-opus-context-fills-faster-issue-112194` · `@content/web/github/2026-11-26-autodream-silently-ignored-issue-112310` · `@protocol/memento` · `@content/youtube/sequoia/how-companies-are-building-their-own-intelligence-sonya-huang-sequoia-capital`* --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*