Pype raises $1.2M in pre-seed funding
Pype
Pype

How to Build Auditable AI Agents for Healthcare: Every Decision Needs a Trail

A
Ashish Tripathy
13 Oct 2026
blogImage

How to build auditable AI agents for healthcare: every decision needs a trail

A healthcare AI agent should be able to tell you what it heard, how sure it was, which rule it followed, and what it did. For every decision, on every call. Here's what that looks like in practice, and why it starts with reliability.

Ashish Tripathy, Founder, Pype AI | 13 October 2026 | 13 minute read


An auditable AI agent is one where every decision on every call leaves a trail: what the agent heard, what it concluded, how confident it was, which rule turned that into an action, which version was running, and what happened next.

If you can replay any call decision by decision, your agent is auditable. If all you have is a transcript and a list of tool calls, it isn't.

Quick context. At Pype AI we build voice agents that talk to patients for hospitals. Booking, reminders, follow-ups, triage. After millions of minutes of these calls, this is the one thing I'd tell any team building in healthcare.


Why reliability comes first

Every industry wants reliable AI. Healthcare has four reasons to care more.

An agent can finish the task and still fail the patient. Someone calls to book a cardiology follow-up and mentions their chest has felt tight since morning. An agent tuned only for booking confirms Thursday at 11. Task done. Patient at risk.

A booking call where the patient mentions chest tightness and the AI agent books Thursday at 11 anyway, marked task complete while the missed escalation is flagged in red

The dashboard says green. The patient needed a nurse.

There is no undo. A voice agent speaks live. Whatever it says has already reached the patient. Nobody reviews it in between.

Failures are quiet. Earlier this year some of our calls went wrong and none of our dashboards noticed. Task completion looked fine. Transcripts looked clean. The real problem was speech-to-text mishearing drug names and doctor names, with total confidence. The agent did the task perfectly, on the wrong words.

A prescription refill call where speech-to-text hears metoprolol instead of metformin with 0.91 confidence, and the agent books the patient into cardiology, marked task complete while the misheard drug name is flagged in red

The transcript reads perfectly. The patient said a different word.

The caller can't correct it. Healthcare callers are often elderly, unwell, anxious or on a bad line. They're the least likely to say "no, that's not what I meant."

So here's how I think about it. Reliability is what the agent does. Auditability is how you prove it. You need both, and the first person you need to prove it to is yourself.


"The LLM called a tool" is not an audit trail

Here's what most agent logs look like:

10:42:07  llm.response
10:42:08  tool_call: transfer_to_nurse_line
10:42:14  call.transferred

It's true. It's also almost useless. It tells you what happened, not why.

It can't answer the questions that matter in healthcare:

  • What did the patient actually say, and did the agent hear it right?
  • Why the nurse line, and not a normal booking?
  • How sure was the agent when it made that call?
  • What rule told it to transfer?
  • Would it do the same thing tomorrow, for the same patient?

If you can't answer those, you can't defend the decision. And you can't improve it either.


What a real decision trail looks like

Let's take one call. A daughter rings to book a GP appointment for her mother:

"She's had a fever for three days, and since this morning she's been a bit confused."

Here's the trail an auditable agent should leave behind. Every step records what it did, how sure it was, and the rule it followed.

StepWhat the agent didHow sureThe rule it followed
1. HeardTranscribed "fever for three days" and "confused since this morning"Speech recognition: 0.93If a symptom word scores below 0.70, ask the caller to repeat it
2. UnderstoodRecognised this as a symptom call, not a routine booking0.95Symptom calls go through triage before any booking
3. TriagedFever plus new confusion in an older adult: urgent0.870.80 or above: escalate. 0.60 to 0.80: ask one confirming question. Below 0.60: hand to a human
4. ActedCalled transfer_to_nurse_line with the reason "urgent: fever and new confusion"Urgent triage rule, triage rules v7
5. ResultNurse line answered in 6 secondsIf no answer in 30 seconds: give the emergency number and log it

Also recorded: call ID, agent version v3.14, triage rules v7, and who approved those rules.

The numbers and rules above are an illustration, not clinical guidance. Your thresholds should come from your clinicians.

Now compare that with the three-line log. Anyone can read this trail. A nurse. A hospital's compliance lead. An auditor eighteen months later. Every line answers a question the old log couldn't.

Side by side: a three-line agent log showing only a tool call, next to a five-step decision trail showing what was heard, understood, triaged, acted on and the result, each with a confidence score or rule

Same call, two records. One tells you what happened. The other tells you why.

That's the bar. Not "the model called a tool", but "the model called this tool, for this triage decision, at this confidence, because of this rule."

Every moment, not just the big ones

Triage is the obvious one. But a call is made of dozens of small moments, and any of them can go wrong. A fully auditable agent leaves a trail for all of them:

  • Every response. Why the agent said what it said, and what it was reacting to.
  • Every interruption. When the patient cut in, what the agent was saying at the time, and how it recovered.
  • Every API call. Why it was called, what was sent, what came back.
  • Everything it read. Which patient record, which appointment slots, which doctor's schedule.
  • Everything it wrote. Which booking it created, which note it saved, which field it changed.
  • Every triage decision. What it concluded, how sure it was, which rule applied.
  • Every transfer. Who it handed to, why, and how long the patient waited.

A transcript gives you the words. This gives you the reasons.

A timeline of one patient call with traced moments for a response, a record read, an interruption, a triage decision, an API call, a write and a transfer, each with its reason, and the guardrails checked on the call

Every moment of the call, each with a reason, and the guardrails you can check because of it.

And here's the part people miss. You can only guardrail what you can see. A guardrail is just a rule that sits on one of these moments: "never book before triage", "always transfer if the patient mentions chest pain", "never write to the record without confirming the date of birth". If the moment isn't traced, the rule can't be checked, and you'll never know whether it held. Transparent comes first. Auditable and guardrailed follow from it.


How confidence makes your agent more deterministic

Language models are probabilistic. Ask the same thing twice and you might get two different answers. That's fine for writing an email. It's not fine for triage.

The fix isn't to take the model out. It's to split the job in two:

  1. The model makes a judgement and says how sure it is.
  2. A written rule turns that into an action.

Same confidence, same action, every time. The model proposes, the rule decides.

Three panels: the model judges a call urgent at 0.87 confidence, a clinician-approved rule maps confidence bands to actions, and the action transfers the patient to a nurse

The model proposes, the rule decides. Same confidence, same action, every time.

This is what makes an agent's results predictable. The rule is plain English, so a clinician can read it. It has a version, so you know which rule was live on which day. And if the agent is ever unsure, the rule says exactly what happens next: ask again, confirm, or hand to a human.

Three things to get right:

Measure confidence, don't just ask for it. Models are bad at grading themselves. If you ask "how sure are you?", you'll get a confident number either way. Use scores you can check: the speech recognition score, a classifier's score, or whether the model gives the same answer when you ask it a few times.

Confidence is not accuracy. Confidence is how sure the agent was on this call. Accuracy is how often it was right on calls like this one, checked by humans afterwards. You need both. If decisions made at 0.85 confidence turn out to be right only 70 percent of the time, your threshold is wrong, and now you can see it.

Thresholds are clinical decisions. Who decided 0.80 is the bar for "urgent"? It should be a clinician, not an engineer. Write it down, version it, and record who signed it off.


The other half: version, test, review

A decision trail tells you what happened on one call. These five habits keep the whole agent trustworthy over time.

Version everything. Every change to a prompt, tool, rule, model or knowledge base is a new version. Every call records the version it ran on. Never edit a live agent in place.

Test before go-live, and write the gate down. Run the agent against hard scenarios: interruptions, bad audio, language switching, emergencies that come up mid-booking. Treat safety paths as pass or fail, never as an average. An agent that gets 99 percent right but misses one emergency is not a 99 percent agent.

Check your AI judge against humans. Most teams use an LLM to score calls at scale. Measure how often it agrees with your human reviewers, metric by metric. Trust it where it agrees. Keep a human where it doesn't (usually tone, empathy and clinical nuance).

Review production every day, and fix at the right layer. Flag bad calls, have a human triage them, fix the actual cause, rerun every test, ship a new version. When our speech recognition was mishearing drug names, a prompt rule would have hidden it. A speech dictionary fixed it.

Make memory auditable too. The best healthcare agents remember the patient. Their last visit, their doctor, the reminder they asked for. But memory is data the agent acts on, so it needs a trail like everything else. Every piece of context should record where it came from, which call added it, and when. If the agent greets someone with "calling about your follow-up with Dr Mehta?", you should be able to see exactly why it knew that.

And protect the trail itself. It holds patient data, so keep only what you need, lock down who can see it, make it tamper-evident, and write down how long you keep it.


What the rules ask for

Not legal advice, but the direction is clear.

RuleWhat it asks for, simply
HIPAA Security Rule, 45 CFR 164.312(b) (US)Systems that use patient data must record and examine activity. An agent that books into a hospital system counts.
EU AI Act, Article 12 (EU)AI systems classed as high-risk must automatically log events over their lifetime.
NIST AI Risk Management Framework (US, voluntary)Govern, map, measure and manage AI risk across the whole lifecycle.

Each one asks for the same thing in different words: know what your system did, know why, and be able to show someone else.


How Pype makes this practical

Quick disclosure: this is the part where I talk about what we've built. I'll stick to what it does.

Decision traces, not just transcripts. Every call in Pype comes with a trace of why each thing happened. Why every response was made. Why a turn was interrupted. Why an API was called. What was read from the hospital's systems and what was written back. Every triage decision. Every transfer. All on one timeline, from speech recognition through to the voice the patient heard. That's how we caught the misheard drug names: the problem was at the very top of the call, where a transcript would never have shown it.

A live QA review queue for every flagged call. When a call is flagged, by our QA agent or by a guardrail that fired, it lands in a live review queue. A human opens it, sees the full decision trace, and records a verdict. If something needs fixing, the fix ships as a new version after the full test suite reruns. Every step is on the record.

Every patient journey in one place. Not just one call, but every call, reminder and follow-up for a patient, in order. It's the easiest way to see how a patient actually moved through your hospital, and where they got stuck.

Warm inbound context. Once someone is your patient, they're always greeted with context. When they call back, the agent already knows their last visit, their doctor and what was left open, so they don't start from zero every time. And every piece of context that gets added is auditable: where it came from, which call added it, and when.

One patient's journey across five touchpoints, ending with the agent greeting her with context about her knee follow-up, and a panel showing where each piece of context came from and when

Once your patient, always greeted with context, and every piece of that context is on the record.

Clinical pathway agents that know where patients belong. Getting a patient to the right department is the triage decision that matters most on an inbound call. Our clinical pathway agents are fine-tuned across 14+ departments, including orthopaedics, gastroenterology and paediatrics, and route patients to the right department with high accuracy. And because every triage decision sits in the decision trace, you can see why each patient was sent where they were, and check that accuracy yourself.

Guardrails you can check. Because every moment is traced, every guardrail can be checked on every call. You don't hope a rule held. You can see that it did.

Decisions are built as decisions. Our agents are built with named decision points for routing, triage, transfers and consent, with checks on every hospital system call. Not one giant prompt. That's what makes each step traceable and each rule readable.

Every change is a new version, and nothing goes live without a gate. Every fix ships as a new version, no exceptions. Every draft agent is scored on about two dozen metrics and can't go live until task completion clears 95 percent, then passes two human QA rounds, then the hospital's own testing. Our AI judges are checked against human reviewers, metric by metric.

Under the hood, our tracing layer, Whispey, is built on OpenTelemetry and is open source, so you can use it even if you never use Pype.

Pype AI's loop engineering diagram: a build-and-improve loop before go-live and a deploy-and-improve loop in production, joined around one agent-building engine

Two loops around one engine. Build and improve before go-live, deploy and improve after it. Every pass produces a new, recorded version.


Launch week: 19 to 25 October

Next week we're running a launch week. Seven launches in seven days.

Each day shows one piece of how we've grown Pype into a truly auditable platform for healthcare agents. Decision traces for every moment of a call. Clinical pathway agents that triage across 14+ departments. A live QA review queue. Every patient journey in one view. Warm context for returning patients, with every detail on the record. Guardrails you can actually check.

We think it's the most auditable way to run AI agents in healthcare today. Next week you can judge that for yourself.

Pype launch week poster: 7 launches, 7 days, 19 to 25 October. Building the next stage of reliable and auditable agents for healthcare.


Where to start if you already have an agent live

You don't need all of this by Friday. Start with three things:

  1. Log the version on every call. It's cheap, and almost everything else depends on it.
  2. Pick your single most important decision (usually triage or emergency escalation) and give it a full trail: what was heard, how sure, which rule, what happened.
  3. Write that rule down and get a clinician to sign it.

Then do the next decision. Then the next.

Nobody demos their audit trail. But the first time a hospital asks "why did your agent do that?" and you can answer in five minutes instead of five days, it feels pretty great :)


Auditable healthcare AI agent checklist

  • Every call records the agent version and rule versions it ran on
  • Every high-stakes decision (triage, routing, emergency, transfer, consent) is a named decision point
  • Each decision logs what was heard, what was concluded, the confidence, and the rule applied
  • Every tool call logs why it was called, not just that it was called
  • Every response, interruption and transfer is traced with a reason
  • Every read from and write to hospital systems is logged
  • Every guardrail sits on a traced moment, so you can check it held on every call
  • Every piece of patient context records where it came from, which call added it, and when
  • Confidence comes from scores you can check, not the model grading itself
  • Accuracy at each confidence level is measured against human review
  • Thresholds are set and signed off by clinicians, and versioned
  • Safety paths are tested as pass or fail before every release
  • Every flagged call lands in a review queue with a recorded human verdict
  • Every fix ships as a new version after a full test rerun
  • Logs are minimised, access-controlled, tamper-evident and kept to a written policy

Frequently asked questions

What is an auditable AI agent?

An AI agent where every decision on every call leaves a readable trail: what it heard, what it concluded, how confident it was, which rule turned that into an action, which version was running, and what happened next.

What is a decision trail in an AI agent?

A step-by-step record of how an agent got from what a person said to what the agent did. It goes beyond "the model called a tool" to record why that tool was called, for which decision, at what confidence, and under which rule.

How do you make an AI agent's decisions more deterministic?

Split the job. Let the model make a judgement and measure how confident it is, then let a written, versioned rule decide the action. The same confidence always leads to the same action, and anyone can read the rule.

What is the difference between confidence and accuracy in AI triage?

Confidence is how sure the agent was on a single call. Accuracy is how often decisions like that turned out to be right, checked later by humans. You need both to know whether your thresholds are set in the right place.

What is the difference between a transcript and a decision trace?

A transcript records the words. A decision trace records the reasons: why each response was made, why a turn was interrupted, why an API was called, what was read and written, and why the call was triaged or transferred the way it was.

How can a healthcare AI agent remember returning patients safely?

By treating memory as auditable data. Returning patients can be greeted with context from earlier visits, but every piece of context should record where it came from, which call added it, and when, so anyone can see why the agent knew what it knew.

Why is reliability so important for healthcare AI agents?

Because a healthcare agent can complete its task and still harm a patient, for example by booking a routine slot for someone describing emergency symptoms. Voice agents also speak live, so there's no human review between the agent and the patient.

Does HIPAA require audit logs for AI agents?

HIPAA's Security Rule (45 CFR 164.312(b)) requires audit controls for systems that contain or use electronic patient data. It doesn't mention AI by name, but an agent that reads or writes patient data falls within it. Confirm the details with your compliance team.


About the author

Ashish Tripathy is the founder of Pype AI, which builds voice AI agents for hospitals and healthcare providers. Pype also maintains Whispey, an open-source, OpenTelemetry-based observability tool for voice AI agents.