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

Hospitals · Revenue cycle

TISS transmission, batches and protocols

Billing that is ready is not billing that has been sent. In between sit 14 payer portals, an XML that will not validate, a login that expired and a window that closes on Friday. TISS — the claims exchange standard every Brazilian hospital and health plan has to use — is only as good as the trip the file makes. The agent covers that trip: it audits the bill before sending, transmits batch by batch, brings the protocol number back and shows you where every submission stands.

TISS is set by the ANS, Brazil's national regulator for private health plans, and the agent works inside it. It audits every claim against what the medical record documents and hands back the line the documentation does not support; rewriting the claim and deciding what goes into a batch when a document is missing stay with the hospital.

Aisle of lit server racks in a data center.
The bottleneck

Billing is ready on Tuesday and leaves the building the week after

The billing team closes the period. From there a second job begins, one nobody calls a job: open each payer's portal, remember the password, upload the file, wait for processing, write the protocol number down in a notebook or a shared spreadsheet, and repeat that fourteen times. When an XML comes back rejected over one required field, nobody can say which claim caused it without opening the file by hand.

Portal by portal, the way it works today

  • One portal per payer — each health plan with its own access rules, certificate and layout
  • A login that expires on closing day, with the password held by whoever is on vacation
  • An XML rejected for a technical inconsistency, with a message that says "validation error" and nothing else
  • The protocol number is copied by hand into a spreadsheet — when it is copied at all
  • Nobody knows where a batch stands without logging into the portal to look
  • It all lands in the same window: three days of human queue before anything is sent

With the transmission agent

  • All fourteen payers on one board, with the state of every batch in plain view
  • Credentials kept in the platform's credential store, renewed without passing across anyone's desk
  • The XML is validated before it leaves; whatever fails comes back with the claim, the line and the reason
  • The protocol number is pulled from the payer itself and written to the account, with no retyping
  • Every change of state is logged with date, time and origin
  • Sending stops being an all-hands push and becomes routine: the Squad wakes up, assembles, validates and transmits

The hard part is not producing the bill. It is crossing the distance between finished billing and the payer.

2 days submission window, down from the 12 days of the earlier scenario
14 payers on a single board, without opening a portal for any of them
6% of protocol numbers still checked by hand — it used to be 100%
The hospital in this example

A mid-to-large network with 14 contracted payers

Every page in this section describes the same reference hospital: a mid-to-large network, 28 outpatient specialties, roughly 60,000 outpatients a year, about 2,500 appointment slots offered per week, an official WhatsApp number carrying some 23,000 conversations a month and 14 contracted payers.

That is the size at which transmission stops being one person's task and turns into a calendar bottleneck: the same week every month, the same queue.

Validation before sending

The bill is audited before it leaves, not after it bounces

Rejection over a technical inconsistency is the most expensive rework in the cycle, because it arrives after everyone thought the work was done; a denial over documentation is worse, because the care has already been delivered. The agent flips the order: before transmitting, it audits the batch against the TISS standard, against that specific payer's rules and against what the medical record documents, and sends only what the documentation supports.

Layer 1 — the TISS standard

File structure, declared version, required fields, type and length of every field, claim hash, batch sequence. It is the same check the payer's portal would run — except it happens here first, with the file still in your hands.

Layer 2 — that payer's own rules

Two health plans read the same standard differently: one demands an attachment for a given procedure, another refuses a claim without prior authorization, a third uses its own contracted fee schedule. Those rules are registered per payer and run as part of the check.

Layer 3 — what the medical record supports

A file can be technically flawless and still bill a line outside the contract, or a line the documentation does not support: a procedure with no matching clinical note, a supply with no justification, a bed-day with nothing recorded against it. That audit has a page of its own, on coding compliance and reference tables, and its result reaches this step before the batch is assembled — it is what keeps the denial from happening at all.

The response

"Schema error" is not an answer anyone can act on

When something does not hold up, the whole batch is not blocked without explanation. The agent hands back the finding ready to act on, claim by claim: the line, the evidence that is missing, the likely cause and the deadline running, written in plain language — and it says what it cannot fix itself.

  • The item: which claim, which procedure, which field.
  • The reason: required field empty, code outside the contracted fee schedule, missing authorization, date inconsistent with the admission, a clinical note that does not record the procedure billed.
  • The owner: who on the team handles that kind of pending item — billing, authorizations or the clinical team.
  • The effect on the batch: the claim drops out of the period's batch or the whole batch waits, and that call belongs to a person.

The agent also simulates: it runs the validation over the batch under construction as many times as you need, transmitting nothing, so the team can see what is still missing before submission day.

Technical rejection

From 14% of batches to under 1%

Rejection over a technical inconsistency is the kind you can avoid without negotiating with anyone: it is form, not merit. Checking before you send is what moves the ratio.

Batches rejected for a technical inconsistency — before14% With validation before sending0.8%

A denial on the merits — the payer disagreeing with what was billed — is a different conversation, and it lives on the denials page.

Hal-AI · Batch validation before sending Batch 09-0409 · held
4 claims failed validation batch under construction · nothing transmitted Waiting on the team validate_tiss_batch → 612 claims checked · 608 approved · 4 returned with a reason

What went back to the team — billing period 09, payer Aurora

Claims returned by validation, with the line that failed, the reason in plain language, who resolves it and the effect on the batch. No column carries clinical information about a patient.
Claim Line Reason Owner State
G-48210 Outpatient procedure Code outside this payer's contracted fee schedule Billing Blocks the submission
G-48257 Prior authorization Authorization number missing and required by the contract Authorizations Blocks the submission
G-48301 Supporting attachment This payer requires an attachment for the procedure; the file never arrived Clinical team Drops out if unresolved
G-48344 Service date Date falls outside the period declared in the batch header Billing Simple fix
612 claims checked = 608 approved + 4 returned. Of the 4 returned, 2 block the submission and 2 drop out of the batch if they are not resolved by closing.
The agent does not fix a claim on its own changing clinical content requires a person Action blocked returned to the billing queue · no change written by the agent
Payer names, claim numbers and counts are fictitious.
One batch per payer

Fourteen payers, one board — and no portal to open

Every health plan has its own intake path: a published web service, a file exchange area, a portal with manual upload. What changes from one to the next is the transport and the credential, not your team's work. On the inside, the batch is always assembled, validated and dispatched through the same flow.

1

Assembles the period's batch

The agent reads the closed claims in the billing system through api_get_claims_period and splits them by payer, respecting the claims-per-batch limit each one accepts.

2

Validates and returns what failed

It runs the three layers of checks. What passes moves on; what fails goes back to the team with the line and the reason, and the batch either waits or ships without that claim — a human decides which.

3

Transmits over that payer's channel

The credential comes from the credential store, never from a file on somebody's machine. The submission is logged with date, time, file size and claim count.

4

Comes back to confirm receipt

Transmitting is not receiving. The agent returns to the same channel to fetch the protocol number and the processing result, and only treats the batch as delivered once that number comes back.

Hal-AI · Transmission Squad run Run #212 · in progress
Running Run #212 · 7:00 AM routine Round 6
07:00:02Context loaded — billing period 09, 14 contracted payers 07:00:05api_get_claims_period(period="09") — 2,230 closed claims 07:00:41Claims split into 14 batches, respecting each payer's limit 07:01:08validate_tiss_batch(batch) — 14 of 14 validated 07:03:20Batch 09-0409 held: 4 claims returned to the billing team with a reason 07:06:12api_post_tiss_batch(payer, batch) — 11 batches transmitted 07:18:44api_get_batch_protocol — 9 protocol numbers pulled and written 07:19:02Payer Meridiano — protocol service unavailable; retry at 7:20 AM 07:19:05Refreshing the board and drafting the period summary
14 batches assembled · 11 transmitted · 9 with a protocol number · 1 held in validation running on the server
Simulation mode available assembles and validates the whole period without transmitting anything Transmission off this is how the team sees what is still missing two days before closing
Payer names, timestamps and counts are fictitious. The log of each run stays available for audit.

Credentials stored, not circulated

Payer portal passwords tend to travel by message, spreadsheet and sticky note. On the platform, each payer's access lives in the credential store: held securely, used by the agent at the moment of submission and never displayed back on screen.

  • Each payer is a declared tool of the agent — whatever was not declared does not exist for it.
  • Credential renewals and certificate expiries become alerts before closing day, not after.
  • Every transmission lands in the audit trail: which batch, to which payer, at what time, with what outcome.
How the agent sees a payer

One endpoint, one credential, one set of rules

Adding a fifteenth payer is not a project: it is a registration. The transmission endpoint comes in as a tool, the payer-specific rules go into validation, and the board starts showing one more column of batches.

  • api_post_tiss_batch — sends the assembled batch
  • api_get_batch_protocol — fetches the protocol number for a submission
  • api_get_batch_status — asks where processing stands
  • api_get_payer_statement — reads the remittance statement when it arrives

The same REST APIs your IT team already maintains become the agent's tools, with no proprietary connector in between. See how integrations work.

There are still fourteen payers. There is now one job for your team.

Protocol numbers

The protocol number comes back on its own and lands in the account

The protocol number is the payer's receipt that the batch arrived. When it lives in a side spreadsheet, that proof depends on somebody having copied it correctly — and the first time you learn nobody did is when the payer says it never received anything.

After transmitting, the agent returns to the payer's channel, fetches the protocol number for that submission and writes it onto the batch inside the billing system. No copy and paste, no intermediate spreadsheet, no "the protocol is in Claudia's inbox".

  • Pulled, not typed: the number comes from the payer and is written by api_post_batch_protocol onto the same batch that produced it.
  • Tied to the submission: protocol number, billing period, claim count and amount submitted sit on one line — that is what you compare against when the remittance statement arrives.
  • When the number does not come back: the batch is not treated as delivered. It stays in "awaiting protocol", the agent retries in the following windows and, if that persists, tells the team with the timestamp of every attempt.
  • Nothing invented: if the payer returned no protocol number, the board shows the field empty. The agent never fills in a number it did not receive.

It is the same discipline the platform applies to any published document: the number on the screen came from an API call made during that run, not from the model's memory. How the agent builds a document with data by reference.

Manual checking

From 100% to 6%

Checking protocol numbers by hand stops being the routine and becomes the exception: only what the payer did not return automatically still needs human eyes.

Protocol numbers checked by hand — before100% Protocol numbers checked by hand — now6%

Protocol checking goes from nine dedicated posts to three. The six posts no longer needed were retyping and line-by-line checking; what still calls for a person is the case that needs judgement — appeals, authorizations, negotiation.

Doubling the number of claims stops meaning doubling the team that checks them.

What happens when the payer does not answer

A failed transmission is not a rare event: a service goes down, a certificate expires, a processing queue jams on the other end. The design assumes it.

Retries, with spacing

The agent tries again in the following windows instead of hammering the payer's service. Every attempt is logged with the time and the response it received.

Tells a person, not a log file

If the batch does not close after the planned attempts, the case goes up to the human queue with everything already tried — instead of waiting for someone to open a board by chance.

Never duplicates a batch

A resend happens only once the agent has confirmed the earlier submission was not accepted. A duplicated batch at the payer is a bigger headache than a late one.

Batch monitoring

Sent, accepted, under review, rejected — as it happens

The question nobody can answer on a Thursday is a simple one: where is each batch right now? The board answers it without opening a payer portal, because the state is updated by the agent itself on every query it makes.

Hal-AI · TISS transmission Period 09 · 14 payers
Batches in billing period 09 State of every batch across the 14 contracted payers, refreshed on each query the agent makes. Export reconciliation
Period 09
Run #212 · Transmission for the period scheduled · 7:00 AM · in progress api_post_tiss_batch → 11 batches transmitted · api_get_batch_protocol → 9 protocol numbers pulled

Batches by state — billing period 09

Ready to send3
Boreal Health Plan
Batch 09-0412Outpatient
318 claims · validated · waiting for the 7:00 AM window
Assembled today 6:42 AM Queued
Clean validation
Cordilheira Health Plan
Batch 09-0413Inpatient
96 claims · nothing returned
Assembled today 6:44 AM Queued
2 claims blocking
Aurora Health Plan
Batch 09-0409Outpatient
612 claims · 4 returned to the team
Awaiting a human decision Held
Transmitted2
Meridiano Health Plan
Batch 09-0402Awaiting protocol
441 claims · sent today 7:06 AM
2nd query at 7:20 AM In flight
Ipê Self-Funded Plan
Batch 09-0404Awaiting protocol
87 claims · sent today 7:08 AM
1st query at 7:18 AM In flight
Under review at the payer3
Vitória Health Plan
Batch 09-0397Processing
protocol 2026-09-0000731 · received yesterday 6:41 PM
Response due in 4 days Tracking
Rota 12 Health Plan
Batch 09-0398Processing
protocol 2026-09-0000742 · received yesterday 7:02 PM
Response due in 5 days Tracking
Partial rejection
Sertão Claro Health Plan
Batch 09-03917 claims rejected
protocol 2026-09-0000688 · 7 claims rejected, 196 still under review
Appeal queued with billing Open item
Accepted with a protocol6
Aurora Norte Health Plan
Batch 09-0384Accepted
protocol 2026-09-0000615 · written to the batch
Reconciled automatically Closed
Serra Azul Health Plan
Batch 09-0386Accepted
protocol 2026-09-0000623 · written to the batch
Reconciled automatically Closed
4 more batches accepted in this period

Protocol reconciliation — last 24 hours

Batches transmitted in the last 24 hours, with payer, batch number, claim count, the protocol number returned and the state of processing.
Payer Batch Claims Protocol State
Aurora Norte 09-0384 254 2026-09-0000615 Accepted
Serra Azul 09-0386 139 2026-09-0000623 Accepted
Sertão Claro 09-0391 203 2026-09-0000688 Partial rejection
Vitória 09-0397 376 2026-09-0000731 Under review
Rota 12 09-0398 118 2026-09-0000742 Under review
Meridiano 09-0402 441 Awaiting protocol
Ipê Self-Funded 09-0404 87 Awaiting protocol
Aurora 09-0409 612 Held in validation
Claims in the batches listed — 254 + 139 + 203 + 376 + 118 + 441 + 87 + 612 2,230 2 protocol numbers still outstanding · 1 batch held before submission
Submission window — days between closing the period and the batch reaching the payer
period 09 payers 14 protocols outstanding 2 7:00 AM routine on
Payer names, batch numbers, protocol numbers and counts are fictitious.

What you are looking at

A whole billing period on one screen: the batches ready to go out, the ones already transmitted and waiting for a protocol number, the ones under review at the payer and the ones closed with a protocol on file. Below that, the last 24 hours of reconciliation and the submission window next to the earlier scenario.

The advantage

Nobody opened fourteen portals to build this list. What needs a person is exactly what is flagged amber and red: one batch held in validation and one partial rejection that will turn into an appeal. The eight accepted batches ask nothing of anyone.

Only at Hal-AI

Notice what the screen does not show: no clinical patient data. The columns are payer, batch, claim count, protocol number and state. The board tracks the transport of billing, not clinical content — and every change of state is logged with who or what caused it.

The same data feeds the daily panel the Squad publishes and sends. See dashboards and indicators

Effect on cash

Sending earlier means getting paid earlier — and nothing more

Worth saying plainly: transmitting sooner does not increase the amount billed. The effect is on the calendar, not on the gross. What changes is when the money lands, how much rework disappears from the path and how predictable the month becomes.

What changes, concretely

  • The period leaves the twelve-day window:, the batch reaches the payer in two days. Ten fewer days of waiting before the review clock even starts.
  • Resends stop eating the next window: with technical rejection down from 14% to 0.8% of batches, next month does not begin by fixing last month.
  • Forecasting sits on data, not memory: protocol number, amount submitted and the payer's review deadline share one line, so you can say what you expect to receive and when.
  • Closing stops being an all-hands push: the three days transmission used to consume come off the calendar, and the effort still worth spending is on appeals, which is where the money is actually lost.

Recovering value itself — denials classified, appeals filed with evidence, contractual deadlines that do not lapse — is the subject of the page next door.

Professional reviewing financial indicators on a screen.

What this page does not promise

We do not promise higher revenue. Transmitting on time does not make a payer pay more, does not advance a receivable, does not replace contract negotiation and does not turn a denial on the merits into a payment.

What the agent delivers is earlier and with less rework: the batch goes out sooner, goes out correct and goes out tracked.

Transparency

What stays human

The agent audits the batch and handles the transport. Deciding what gets billed, to whom and with what argument stays with people — and it should.

Deciding what goes into the batch when clinical documentation is missing

The supporting attachment is missing, the clinical note was never closed, the procedure needs an authorization that has not come through. Hold the claim and wait, or send the batch without it and bill later? That is a coordination decision, with consequences for contractual deadlines and for the relationship with the payer. The agent shows the impact of each path; a person chooses.

Negotiating with the payer

A submission rule that changed without notice, an attachment demanded that is not in the contract, a processing deadline that blew past. None of that is settled inside an XML. The agent documents what happened — when it sent, what came back, how many times it tried — and hands the material to whoever sits at the table.

Answering a payer audit

When a payer audits, it asks for technical and clinical justification. Most of what it will raise was already audited on this side before the batch went out, and the agent arrives with the batch history, the protocol number, the dates and the attached documents gathered; the answer itself is written by someone who carries professional responsibility for it.

And what the agent never does on its own

It does not alter claim content to get a batch through validation, does not swap a procedure code, does not decide what is left out of the period and does not speak to a payer on the hospital's behalf outside the contracted transmission channels.

  • Tools declared one by one — whatever was not handed over does not exist for the agent
  • Every run on an audit trail: what it queried, what it decided, what it wrote
  • Human takeover at any moment, with the full batch history in view

Access controls, credentials and logging are covered in detail on integrations and security.

Questions

What billing teams usually ask

What about the payer that only accepts uploads through its own portal, with no automated service?

That payer keeps being served through its portal, and we say so without hedging: where no automated path exists, someone uploads the file by hand. What changes is everything around it. That payer's batch is assembled and validated the same way, appears on the same board and gets the same tracking — and the protocol number, once it is recorded, sits on the same line as the rest.

In practice, the exception stops contaminating the whole process: instead of fourteen manual submissions, you are left with the handful the payer still insists on.

When the ANS publishes a new version of TISS, what happens?

A version change is a platform event, not a project for your hospital. The structural rules of the standard are updated on the Hal-AI side and the agent starts validating against the version in force. What does need a conversation is the calendar: payers migrate at different speeds, and during the transition two versions coexist in the same month.

That is why the version is a property of each payer in the registry, not a global setting. The board shows which version each batch went out under.

If the payer's service goes down on closing day, is there a fallback?

The agent retries in the following windows, with spacing, and logs each attempt with the time and the response received. If the deadline gets tight, the case goes up to the human queue with the history ready — including for submission through whatever alternative route that payer accepts.

The batch is not treated as delivered until the protocol number comes back, and the agent never fills in a number it did not receive. We would rather show an empty field than a false record.

Can the agent adjust a claim so the batch passes validation?

No. Correcting claim content is a billing act, with contractual and sometimes clinical consequences. The agent points at the line and the reason, names who resolves it and hands it back to the team. No claim change is ever written by the agent.

What it can do is rebuild the batch once a person has made the correction, revalidate as many times as needed and transmit again — without duplicating the earlier submission.

Who holds the access credentials for the payers?

They live in the platform's credential store, held securely and used by the agent at the moment of submission. They are not displayed back on screen, do not travel by message and do not sit in a file on anyone's machine. Each payer is a declared tool of the agent: whatever was not declared, it cannot reach.

Certificate expiries and password renewals become alerts before closing. The detail is on integrations and security.

Bring your payer list and your closing calendar

We will map out with you how transmission for your billing period would work: what gets validated before it leaves, what goes out on its own, what still passes through a person's hands and what happens to the submission window.