Autonomous agents with memory and context — patent filed with the USPTO

Hal-AI for hospitals · Revenue cycle

Hospital billing and denial recovery

The account went out. The payer paid less. And the hospital only finds out how much it lost when the remittance arrives — sometimes 60 days after the care, when nobody remembers why that line was on the account in the first place.

The agent audits the account against the patient chart, flags the item the documentation does not support and assembles the appeal with the evidence. Signing the correction is still the hospital's job.

Professional reviewing financial indicators on a screen.
Plain vocabulary

A denial is the line the payer decided not to pay

Anyone who works in hospital billing knows this by heart. We spell it out anyway, because the rest of the page depends on us naming the same thing: the account goes out whole, the payment comes back smaller, and the difference has a name, a cause and a deadline. In Brazil the denied line is called a glosa, and the payer is the health plan that holds the contract.

Administrative denial

The item exists and the care happened, but the paperwork does not close: a claim form with no authorization, an out-of-date member number, a mismatched date, a mandatory field left empty, a claim sent after the window shut. It is the denial that stings most, because it was almost always avoidable — and almost always recoverable once the evidence shows up.

Technical denial

The payer questions whether the item was warranted: supplies above what the procedure calls for, an item with no justification in the patient chart, a code that does not match the room rate billed, a quantity outside the usual range. Here the appeal is not paperwork — it needs someone on the clinical side to stand behind what was done.

Blanket reduction

A cut to the amount with no line-by-line criticism: the payer pays a percentage of what was submitted and keeps the rest without pointing at a single line. It is the hardest one to work, because there is no denied line — there is an account paid short, and you have to rebuild the difference before you can dispute anything.

The remittance

The file that comes back from the payer

It is the payment return: which accounts were processed, how much was paid on each one, which items were denied and under which reason code. It arrives per closed billing period, in the payer's own layout, one file per payer.

  • It arrives late. The care happened weeks ago; billing has closed another cycle in the meantime.
  • It arrives in pieces. Every payer has its own calendar, its own layout and its own way of describing a denial reason.
  • It arrives unexplained. The reason code is short; the actual reason that line fell is almost never written there.
The deadline

The clock nobody watches

Every contract sets how many days the hospital has to appeal a denial once the remittance lands. After that, the line stops being an argument: it becomes a loss. No appeal, no negotiation, no later invoice brings it back.

The problem is almost never disagreeing with the cut. It is finding the cut too late, in a file that sat in a shared folder waiting for somebody to have a free week.

A denial that expires is not a financial loss. It is an administrative loss wearing a financial loss's clothes.

The reconciliation Squad

It wakes up when the remittance arrives

A Squad is an orchestrating agent: no channel, no waiting for a question. It has a schedule, a set of tools and a job. This one's job is to match, line by line, what the account asked for against what the payment brought — and to separate what was paid, what was denied and what was paid short.

What it does on every run

Reconciliation is simple arithmetic that nobody has time to do at the volume it shows up in. The Squad does the whole calculation, every day, and only calls a person when a decision is left over.

  • Reads the payer's return. api_get_payer_remittance brings the billing period, the accounts paid and the items carrying a denial reason, one payer at a time.
  • Pulls the original account. api_get_patient_account returns what was submitted: procedures, supplies, drugs, room rates and fees, line by line.
  • Matches line by line. Every line on the remittance finds its line on the account. Anything left without a match becomes a named exception, not silence.
  • Sorts into three piles. Paid in full, denied with a stated reason, and paid short with no line flagged — which is where the blanket reduction lives.
  • Opens the appeal. api_post_denial_appeal files the dispute with the item, the reason, the attached evidence and the deadline that specific contract allows.

It is the same mechanism as the Squads already running in other operations: a schedule, tools declared one by one, a logged run and a stop button. What changes here is the vocabulary.

Hal-AI · Squad run Remittance reconciliation
Running Remittance reconciliation · on schedule Step 4 of 6
06:00:02Context loaded — billing period closed, returns received since the last run 06:00:05api_get_payer_remittance(payer="A") 06:00:09api_get_payer_remittance(payer="D") 06:00:12api_get_payer_remittance(payer="K") 06:00:18Three new returns; the other contracted payers published nothing today 06:02:41api_get_patient_account(account) — every account in the three returns read 06:07:55Items matched: paid in full · denied with a reason · paid short 06:08:10Payer K paid short without flagging a line — difference rebuilt line by line 06:09:02api_post_denial_appeal(item, reason, evidence, deadline) 06:09:04Assembling the root-cause dashboard
3 returns reconciled · 1 with a blanket reduction · appeals waiting for approval running on the server
Nothing goes out on its own when the hospital requires approval, the appeal sits ready and waits Waiting for approval
1

The return lands

The payer publishes the remittance for the period. The Squad picks it up on the next run — it does not wait for somebody to announce that the file arrived.

2

Matched to the account

Every paid line finds the line that was submitted. Whatever is left unmatched becomes a declared exception, with the account number and the item that did not line up.

3

Classified by cause

The reason the payer stated is translated into the cause that produced the item back upstream — authorization, price table, charting, deadline or coding.

4

Appeal prepared

It finds the evidence, assembles the dispute and marks the contract deadline. If hospital policy requires human approval, it stops here and says so.

Line-by-line matching is the part nobody can do at real volume. Below, the shape of the comparison — with no amounts, because what matters here is the outcome of each line, not the figure.

Hal-AI · Account × remittance Line by line · closed period
Payer A · closed billing period

No column on this screen carries a patient name, a diagnosis or any clinical data.

Comparison between what the account submitted and what the remittance paid, line by line, with the reason stated by the payer and the root cause identified by the agent.
Account item What the remittance brought Stated reason Root cause Outcome
Main procedure Paid in full Reconciled
High-cost supply Denied no justification for the item Clinical charting Appeal assembled
Closed-unit room rate Denied incompatible code Coding Appeal assembled
Operating-room fee Paid short no reason given Payer processing rule Difference rebuilt
Formulary drug Denied amount above the contract Price table mismatch Appeal with contract
Supporting exam Denied no prior authorization Authorization No evidence · returned
The three piles of reconciliation: paid in full + denied with a stated reason + paid short with no line flagged. No item stays outside one of them.
One item came up without evidence supporting exam · authorization not found Returned to internal audit the agent does not build an appeal without proof of the item — the open issue goes back with its cause named

Reconciliation stops being a month-end scramble and becomes a routine that runs overnight.

The point of this page

A denial is not a billing problem. It is a symptom.

Appealing well recovers money once. Finding out why that item was denied stops it from being denied again next month, and the month after. So the agent does not stop at the dispute: it groups denials by the cause that produced them — and the cause almost never sits in the department that issued the account.

Root causes of denial, the department where each one starts, who can eliminate it and whether the item is usually appealable.
Root cause Where it starts Who can eliminate it Appealable
Missing prior authorization Front desk and authorization, before the visit Authorization, alongside the schedule Depends on the contract
Price table mismatch Price registry and the version of the reference table Compliance and contracting Yes, with the contract attached
Item with no justification in the chart Clinical charting during care Clinical staff and internal audit Yes, if the justification exists
Claim sent past the window The billing submission window Transmission and batch closing Rarely
Code incompatible with the room rate Coding, at account closing Compliance between care and billing Yes
Paid short with no line flagged The payer's processing rule Contracting, with the difference rebuilt Only with the account rebuilt

Two of the six causes disappear before submission

A price table mismatch and an incompatible code never have to become denials: they are compliance deviations the agent's audit catches while the batch is still open, by cross-checking what was delivered against what was billed. That is a different agent on a different front, and it is what actually pulls the denial rate down instead of only improving recovery — preventing is worth more than appealing.

Compliance between care and billing

One of them is purely a question of timing

A claim past the window rarely comes back on appeal, because the argument is not about the item — it is about the date. That one belongs to the transmission front: the batch validated before it goes out, technical rejections caught on the spot, and the protocol receipt imported with no manual checking.

Claims validation and transmission

Grouping by cause is what makes the denial stop happening. Grouping by payer only tells you who to argue with.

The deliverable

The denial dashboard that arrives finished

At the end of the run, the Squad publishes a document: what was reconciled, how much of the denied value came back, which causes concentrate the loss and what needs a human decision. It goes out as HTML to read on screen and as a PDF to attach to the revenue committee's email.

Hal-AI · Document published by the Squad Revenue cycle · PDF

Denial reconciliation and recovery

Where the denial started, how much came back and what still needs a decision

Document published at the end of the 06:00 run, covering the remittances received in this billing period. Mid-to-large hospital network, 28 outpatient specialties, 14 contracted health plans.

source api_get_payer_remittance cross-check api_get_patient_account payers 14
01Where the cycle closed

Every remittance received was reconciled on the day it arrived. The initial denial rate — the share of billed value the payer cuts before any appeal — came in at 4.1%, against 9.8% at the start of the cycle. Of the denied value actually appealed, 71% came back, against 38% before the routine existed.

Appealed denials recovered 71% was 38% at the start of the cycle
Initial denial rate 4.1% of billed value; was 9.8%
Loss to expired deadlines −94% whatever still expires sits in the alert queue
02Where the appealed value went
Value appealed this cycle100% Returned by the payer71% Denied or still under review29%

Figure 1 — 71% returned + 29% denied or under review = 100% of the value appealed this cycle.

03Denials by root cause and by payer
Root causes of denial this cycle, the payers with the highest incidence, relative weight and trend. Payers appear anonymized.
Root cause Payers with the highest incidence Weight this cycle Trend
Missing prior authorization Payer A · Payer D highest item volume falling
Paid short with no line flagged Payer K highest disputed value needs the contract
Item with no justification in the chart Payer A · Payer F mid volume, high value depends on clinical staff
Price table mismatch Payer D residual since the review fixed at the source
Code incompatible with the room rate Payer F · Payer K residual blocked before submission
Claim sent past the window no concentration nearly extinct window shortened
04What was left for a human decision

Payer K holds the highest disputed value of the cycle, all of it paid short with no line flagged. The agent rebuilt the difference line by line and left the appeal assembled, but disputing a processing rule is a contract conversation — and a contract is not appealed by routine.

What the manager has to decideTake the Payer K case to the contracting table, or appeal line by line in this period. The Squad does not choose between the two: it leaves both ready and names the deadline on each.
Payer names anonymized; no screen in this section shows patient data.

What you are looking at

A document, not a dashboard: numbered sections, written analysis, one figure with the proportion of what came back and a table with the cycle's root causes. This is the piece the revenue committee reads in the weekly meeting, with nobody having to build a deck.

Where the numbers come from

The table and the figure are not typed by the agent. It declares which API call the data comes from and the server builds the block from what returns. When a figure is an aggregate, the parts are printed with it — the 71% and the 29% sit right next to the total.

What the screen does not show

No patient name, no diagnosis, no clinical data. The aggregate dashboard works with item, cause, payer and value. Identifiable data only appears inside a specific appeal, for someone with permission to open that appeal.

How the agent publishes an analytical document

Appeal with evidence

Disputing without evidence is just complaining in writing

The appeal that comes back is the one that arrives with the proof attached. The agent audits the item against the patient chart: it finds the justification that supports it, or records that there is none, attaches what the payer asked for and files the dispute inside the contract deadline. The limits of that autonomy sit right beside it — and matter just as much.

How the case is put together

  • Reads the stated reason. The payer's short code is translated into what has to be proven: authorization, clinical warrant, contracted price or date.
  • Looks for the evidence where it lives. The item's justification in the patient chart, the authorization issued, the price-table version in force on the day of care, the submission receipt.
  • Attaches what supports the item. Only what refers to that item and that account. A generic attachment is grounds for another denial.
  • Writes the dispute in prose. What was done, on what basis and why the cut does not apply — in the language of the contract, not from a canned template.
  • Files it with a deadline. api_post_denial_appeal records the appeal already tied to that payer's contractual deadline, and from then on the clock is visible.

When the evidence does not exist, it says where it is missing. An item with no justification recorded in the chart goes back to internal audit named as a charting gap — with the item, what the progress note failed to record and the deadline — instead of becoming a weak appeal filed to tick a box.

Declared limits

What it does not do

  • It does not sign off in the medical audit's place. It audits the account against the patient chart and hands over what does not hold up: the item, the record that is missing and the reason. Correcting the chart and signing the conclusion stays with whoever answers for the case.
  • It does not invent a justification. If the chart does not record it, the agent does not write in what was missing. It names the gap and hands the case back.
  • It does not submit without approval, when the hospital requires approval. The appeal sits assembled, with the evidence attached, waiting on the click of whoever answers for it.
  • It does not change the original account. An issued account is a document. What the agent produces is the dispute, beside it.
  • It does not negotiate contracts. Processing rules and blanket reductions go to the contracting table with the material ready — and stop there.

The agent's autonomy runs up to the edge of the decision: the work of finding what does not hold up arrives done, and the signature stays with the hospital.

Deadline alerts

The warning arrives before it expires, not after

Missing the contract deadline is the one kind of denial with no appeal. So the deadline is not a hidden column in a monthly report: it is an alert that surfaces on screen and in the inbox of whoever answers for the appeal, with the days remaining and what is still missing for the case to go out.

Hal-AI · Appeal queue Sorted by contract deadline
Appeals by contract deadline Sorted by what expires first, not by what is worth most. Approve selected
Expires in 2 days · Payer A appeal assembled · evidence attached · waiting for approval Approve today missing prior authorization — authorization located and attached to the appeal
Expires in 9 days · Payer D appeal assembled · ready to submit In the queue price table mismatch — the version in force on the day of care attached
Expires in 16 days · Payer F returned to internal audit No evidence item with no justification recorded in the chart — no appeal assembled

No appeal leaves this queue without someone approving it, when hospital policy requires approval.

Deadline at risk
Payer A · closed billing period
2 daysprior authorization
Evidence attached. All that is missing is the billing coordinator's approval.
Flagged on the first business day Open appeal
Contract decision
Payer K · paid short
Under reviewblanket reduction
Difference rebuilt line by line. The case went to the contracting table with the material ready.
No automatic submission View the rebuild
How the alert is calculated

Three dates, one clock

The deadline is not a global platform setting. Every contract has its own, and that is where the count comes from: the remittance date, the payer's contractual deadline and the business days left before it expires.

  • The alert is raised per payer, because the deadline is per contract
  • The warning goes to whoever answers for the appeal, not to a generic list
  • An appeal with no evidence still shows in the queue, flagged as an open issue
  • Whatever expires unappealed is logged as an avoidable loss, with its cause

The alert email goes to a closed recipient list. No number in the warning exists outside the document published on the same run.

Why this changes the number at year end

Recovering more is half the way. The other half is no longer losing for administrative reasons: loss to expired contract deadlines falls 94% — not because anyone started working faster, but because the deadline stopped being discovered in the rear-view mirror.

The Squad that watches this every day

What the manager tracks

Four numbers, with the arithmetic open behind each one

Orders of magnitude for a hospital of the size described across this section — a mid-to-large network, 28 outpatient specialties, 14 contracted health plans. Each indicator points back to the list that produced it; none of them is an aggregate without an origin.

71% of appealed denials come back, against 38% at the start of the cycle
2 days to assemble an appeal with evidence, against 11 days before
−94% in loss to expired contract deadlines
100% of remittances reconciled on the day they arrive

Initial denial rate

The share of billed value the payer cuts before any argument. It is the indicator that tells you whether the problem is being solved at the source: it falls from 9.8% to 4.1% of billed value, and that drop comes from compliance before submission, not from appeals afterwards.

High recovery with a high initial rate means the hospital got good at arguing. A low initial rate means it got good at billing.

Recovery rate

How much of the disputed value the payer gives back. It goes from 38% to 71% once the appeal stops being boilerplate and starts carrying the item's evidence with it — the authorization, the table version or the recorded justification.

The figure in the dashboard prints the parts: 71% returned and 29% denied or under review add up to the value appealed this cycle.

Time to appeal

Days between the remittance arriving and the appeal being filed. From 11 days to 2, because reconciliation stopped depending on a free window in somebody's calendar and started happening overnight, every day.

The time dropped; human approval stays in the path, when the hospital requires it.

Loss to expired deadlines

The value that never got disputed because the contract deadline passed. It falls 94% — the harshest indicator of the set, because every cent here is a loss that never had a technical argument at all.

Whatever still expires is logged with its cause, so it becomes a review agenda item instead of disappearing.

Ask instead of hunting

The daily dashboard answers what was planned. When the question is something else — "which denial causes grew at this payer since the price-table review?" — the one who answers is the Hal-AI Copilot, in read-only mode, with a table and a chart on screen and a PDF export. The same audit trail applies there: what was queried stays on the record.

What changes for people who billed by hand

The team needed for the same volume gets smaller.

Manual reconciliation is typing plus checking: open the remittance, find the account, compare line by line, note it in a spreadsheet, repeat fourteen times. It eats the whole week and leaves nobody better at the subject.

Where the structure shrinks

  • 1,400 hours a month of manual work that stop existing in the operation — checking remittances, typing appeals and hunting for a document in a shared folder.
  • From nine posts on protocol-receipt checking down to three. That is six posts fewer for the same volume of accounts; the three that remain handle exceptions — the case the routine flagged as an open issue and the contract that has to be discussed.
  • The structure stops growing with the volume. Doubling the number of accounts reconciled does not mean doubling the team that checks them — the routine absorbs the volume, and the cost per account falls.
  • Internal audit gets an agenda. Instead of finding the unjustified item two months later through a denial, it gets the charting gap flagged with the item and the reason, while the process can still be fixed.

Worth saying what does not change: approving an appeal is still a person's job, arguing a contract is still a person's job, and correcting the chart is still the job of whoever records it. What arrives finished is the audit — the item, the evidence that is missing and the likely cause.

Administrative team working side by side at their computers.
The routine leaves the spreadsheet. The decision stays at the table.

Reconciling by hand

  • The remittance waits in the folder until someone has a free week
  • Line-by-line comparison is a sample, because the volume allows nothing else
  • The blanket reduction goes untouched: there is no line to check
  • The deadline shows up once it has already passed
  • Root cause lives in the head of whoever bills, not in a report

Reconciling with an agent

  • The return is reconciled on the day it arrives, with no queue
  • Every item of every account on the remittance enters the comparison
  • The difference on an underpayment is rebuilt line by line
  • The alert is raised per payer, with the days left before expiry
  • Root cause becomes a table, and the table becomes a review agenda
Questions

What finance always asks first

These are the five questions that come up in every revenue-cycle conversation. The answers describe the standard design; what changes from hospital to hospital is the approval policy and the access scope.

Who approves an appeal before it goes to the payer?

Whoever the hospital decides. Approval is a policy configured per payer and per denial type: you can allow automatic submission on an administrative denial with objective evidence — an authorization that exists and was attached — and require human approval for anything that touches clinical warrant or contract terms.

When approval is required, the appeal sits in the queue with the evidence already attached and the deadline visible. The agent does not submit, does not nag and does not route around it: it raises the warning again as the deadline gets closer.

What if a payer changes the remittance layout?

Reading it is not a rigid parser pinned to column positions. The agent interprets the return and validates what it understood against a declared schema: if an expected field is missing, or turns up under another name, it marks the run as partial and names what it could not read — instead of reconciling with data missing.

A layout change becomes an exception on that day's run, with the payer and the field identified. The fix is tool configuration, not a rewritten routine.

Does the agent read the patient's clinical data to build an appeal?

Only what is needed to support the disputed item, and only when the hospital grants that scope. Pulling the justification for a supply out of the patient chart is not the same as reading the chart: access goes through a parameterized query, restricted to that account and that item, with the purpose on the record.

On the aggregate dashboard, patient data never appears under any circumstance — the columns are item, cause, payer and value. Access scope, legal basis and purpose are defined during the project, before any integration.

Integrations, LGPD — Brazil's data protection law — and what the agent can do on its own

Can we audit what the agent did on each appeal?

Every run is on the record: which API calls were made, what each one returned, how the items were matched, which evidence was attached, what was classified as an exception and who approved the submission. The trail covers the whole agent, not only the result.

It is the same control that applies to any agent on the platform — curated queries instead of open access, tools declared one by one, and runs with a history and a stop button.

The platform's controls

And when the denial is legitimate? Does the agent appeal anyway?

No. Appealing everything is an expensive way to lose credibility with the payer and to tie up your own team with cases that never come back. When the evidence does not support the item, the agent closes it as an accepted denial and hands the cause back to whoever can treat it at the source — authorization, clinical charting or coding.

That is why the root-cause table exists. An accepted denial is not a failed appeal: it is the most useful information in the cycle, because it shows where the process has to change so it does not repeat.

Bring us a remittance that takes a week to check today

Tell us how your revenue cycle works: how many payers, which system holds the account, how long each contract gives you to appeal. We design the reconciliation Squad with you, using the tools and the access scope your operation allows.