
Billing teams do not lose most of their time to coding. They lose it to chasing: appeal letters, prior authorisation packets, status checks and payer phone calls. The work is repetitive, text-heavy and grounded in documents that already exist — which makes it the part of AI medical billing where LLMs and agentic workflows now deliver the most visible time savings.
It is also the part where a careless design can send an inaccurate letter to a payer under your organisation's name. This post covers how we design these agents at TechCirkle so they are useful, verifiable and auditable.
The design rule
Everything below follows from one principle:
Agents prepare and propose. Humans approve anything that goes to a payer or a patient.
That rule shapes the tool permissions, the state machine and the logging. It also makes the system much easier to get through a compliance review.
Anatomy of an appeal agent
A denial comes back on an 835 with CARC/RARC codes. The agent's job is to turn that into a reviewed, send-ready appeal.
denial event (835)
│
▼
1. classify denial ──► not worth appealing? → close with reason, log
│
▼
2. retrieve clinical evidence (EHR: notes, orders, results)
│
▼
3. retrieve payer policy (medical policy, coverage criteria)
│
▼
4. draft appeal letter with citations to 2 and 3
│
▼
5. deterministic checks (required fields, dates, claim identifiers)
│
▼
6. [PAUSE] HUMAN REVIEW — billing specialist edits / approves / rejects
│
▼
7. submit via existing channel, log outcome
Retrieval: two corpora, kept separate
The agent needs two different kinds of grounding, and it helps to retrieve them independently:
-
Clinical evidence — pulled from the EHR for this encounter only: the relevant note sections, orders, results and procedure details. Apply the minimum-necessary principle; retrieve what the denial reason requires, not the whole chart.
-
Payer policy — the payer's published medical policy or coverage criteria for the service in question, versioned by effective date. A policy retrieved from the wrong date is a common, avoidable failure.
Keep the retrieved passages with stable identifiers (document ID, section, effective date) so the draft can cite them and the reviewer can click through to the source.
Drafting: citations or it didn't happen
The draft should quote or reference the specific policy language and the specific clinical evidence that satisfies it. We instruct the model to produce a structured output — claims made, each with a supporting citation — and render the letter from that structure. Any assertion without a citation is flagged in the review UI rather than silently included.
from dataclasses import dataclass
@dataclass
class Assertion:
text: str
policy_ref: str | None # e.g. "payer-policy:MP-123#criteria-2@2026-04-01"
evidence_ref: str | None # e.g. "ehr:doc/8812#assessment"
def unsupported(assertions: list[Assertion]) -> list[Assertion]:
"""Anything the reviewer must look at before approval."""
return [a for a in assertions if not (a.policy_ref and a.evidence_ref)]
It is a small check, but it changes reviewer behaviour: specialists review the gaps instead of rereading the entire letter.

Prior authorisation: the same pattern, earlier in the cycle
A prior authorisation assistant runs the same loop before the service rather than after the denial. It assembles a clinical justification packet against the payer's criteria, highlights criteria that the documentation does not yet satisfy, and hands the packet to staff for review and submission.
The regulatory direction is helpful here. The CMS Interoperability and Prior Authorization final rule requires many payers to support electronic prior authorisation APIs, with the main API requirements taking effect from January 2027. That makes structured, automated prior authorisation far more practical — and it rewards providers whose systems already produce well-structured, evidence-linked requests. Designing your agent's output as structured data now, rather than free-text PDFs, positions you to use those APIs when payers expose them.
Human approval checkpoints as first-class state
Treat approval as part of the workflow state, not a UI afterthought:
-
The agent has no tool that can submit to a payer. Submission is a separate, human-triggered action.
-
Each draft moves through explicit states:
drafted → in_review → approved | rejected | needs_info → submitted. -
Reviewer edits are captured as a diff against the model draft. That diff is your best training and evaluation signal.
-
Low-confidence classifications (for example, an unfamiliar CARC/RARC combination) skip drafting and go straight to a human queue.
Voice agents for payer status calls follow the same idea: scripted flows, bounded actions, and every outcome logged for a human to pick up.
Audit logging: reconstruct any decision months later
Payer audits arrive long after the appeal was sent. For every agent run, log:
-
The triggering denial and claim identifiers
-
Every retrieval query and the IDs/versions of documents returned
-
The exact prompt and model output, plus model name and version
-
Deterministic check results
-
The reviewer, their edits and the final decision, with timestamps
Store logs in an append-only store with role-based access. Every vendor in this path that processes PHI — including the LLM provider — needs a Business Associate Agreement, and prompts and outputs must not be used for vendor training.
Where to start
Appeal drafting is one of the best first projects: it works on denials you already have, it is human-reviewed by design, and its value is easy to measure. This is the core of our agentic workflow development work, and it usually pairs with LLM integration into the EHR and billing platform.
For how appeals fit alongside denial prediction, coding assistance, HIPAA design and costs, read our full guide to AI medical billing.
Frequently Asked Questions
Can an LLM agent submit appeals on its own?
It should not. In the design described here, the agent drafts and checks, but a billing specialist reviews and approves before anything is sent to a payer. The agent simply has no submission tool.
What should the agent retrieve for an appeal?
Two separate sets of sources: the clinical evidence for the specific encounter, and the payer's medical policy or coverage criteria in effect on the date of service. Both should be cited in the draft.
How do you stop the model from inventing justifications?
Require structured output where every assertion carries a policy reference and an evidence reference, and flag any assertion missing either. Reviewers then focus on those gaps.
What changes with the CMS prior authorisation rule?
The CMS Interoperability and Prior Authorization final rule requires many payers to support electronic prior authorisation APIs, with the main API requirements taking effect from January 2027. Providers with structured, evidence-linked requests will be best placed to use them.
What exactly needs to be logged?
The triggering claim, retrieval queries and returned document versions, the prompt, output and model version, deterministic check results, and the reviewer's edits and decision — enough to reconstruct any appeal during a later audit.
Is appeal drafting a good first AI project?
Usually, yes. It runs on existing denials, keeps a human in the loop by design, and produces measurable results such as turnaround time and overturn rate.