SKIP TO CONTENT
AI AGENTS5 minAgents in Production / Ep. 1 · Stage 1-2

How Does an AI Bank Reconciliation Agent Work?

Say a payment of 7,200 USD fits two open invoices from the same vendor. A careful agent doesn’t guess which one it settles.

XIN
Pixel-art illustration of a lamp-lit desk buried under stacks of mismatched ledgers, with a glowing thread pulling two matching documents together.

IN 30 SECONDS

A reconciliation agent is an AI program that finds the evidence for each bank line and proposes a match. This one searches one store of documents, cites its source, checks the amounts to the cent, and hands the line to a person when it can’t prove the match.

KEY TAKEAWAYS · 3

  • The agent starts with retrieval: every proposed match has a source document behind it, linked by a citation.
  • A numeric check stands before any match. The amounts must agree to the cent.
  • When two invoices fit and the evidence can’t pick one, the agent stops and a person decides.
On this page

How the agent works, step by step

IN SHORT The agent’s job is to find the evidence, propose a match, and say plainly what it couldn’t prove.

WORDS TO KNOW

Retrieval
Searching a store of documents and pulling out the few that answer one question, here one bank line.
Citation
A link from a proposed answer to the exact source document behind it, so a person can open it and check.
Escalation
Handing a case to a person, together with what the agent found and why it stopped.

I didn’t build a “reconciliation AI,” but an agent that starts with Retrieval Searching a store of documents and pulling out the few that answer one question, here one bank line. See the glossary. Every proposal has a document behind it, linked by a Citation A link from a proposed answer to the exact source document behind it, so a person can open it and check. See the glossary. A hard numeric check stands before any match.

IN PLAIN WORDS

Retrieval works like a search box over every file the fund had: give it one bank line, get back the few documents that could explain it.

STEP BY STEP

Flow diagram: 5 stepsFlow diagram: 5 steps. Unify the files, then Retrieve the evidence. Retrieve the evidence, then Propose a match with a citation. Propose a match with a citation, then Check the numbers. Check the numbers, then Decide. Decide branches into 2: If evidence holds and numbers agree, then Mark as matched, source attached. If evidence thin, or numbers off, then Stop, hand to a person.EVIDENCE HOLDS AND NUMBERSAGREEEVIDENCE THIN, OR NUMBERSOFF1Unify the filesAbout 2 TB and 1.4M files inone searchable database.2Retrieve the evidencePull the documents that couldexplain one bank line.3Propose a match with acitationPair the line with itsevidence and link the source.4Check the numbersAmounts must agree exactly,to the cent.5DecideThe agent does not guess.Mark as matched, sourceattachedStop, hand to a person

Step 1. Unify the files. All the files go into one searchable store. Finding the invoice for a line becomes a query, not a dig.

Pick a step to see it move
  1. Unify the files All the files go into one searchable store. Finding the invoice for a line becomes a query, not a dig.
  2. Retrieve the evidence For each bank line, the agent pulls the documents that could explain it.
  3. Propose with a citation It pairs the line with its evidence and attaches the citation, so a reviewer can open the source.
  4. Check the numbers Numeric checks confirm the amounts agree exactly, to the cent. A match that only reads well is not enough.
  5. Marked as matched Evidence holds and numbers agree: the line is marked matched, with its source attached, ready for review in one click.
  6. Stop and hand over Evidence thin, or numbers off: the intended path is to stop and hand the line to a person, with what it found and why it stopped.
One bank line through five stages. Stage 5 forks, so the walk-through has six steps: a match with its source, or an abstention a person reviews. Who may post to the books (record the entry in the ledger) is a separate decision.

A bank line with no document behind it gets no proposal from this agent.

Coming up next: So what happens when two invoices fit the same payment?

A worked example: one match, one escalation

IN SHORT Same agent, two bank lines: one matches to the cent, the other fits two invoices, so the agent stops.

The values below are invented. The shape is the everyday one: an amount, a date and a reference that may or may not say enough.

A WORKED EXAMPLE

Illustrative numbers

PASSLine 1: one invoice fits

INPUT

Date
14 Mar 2026
Amount
18,450.00 USD paid out
Reference
ACME PLUMBING INV-2041

WHAT HAPPENS

  1. Retrieval finds invoice INV-2041 from Acme Plumbing.
  2. The invoice total is 18,450.00 USD, the same to the cent.
  3. The agent proposes the match and cites the invoice.

OUTPUT

Result
matched, invoice cited
Reviewer
opens the invoice in one click

ESCALATEDLine 2: two invoices fit

INPUT

Date
21 Mar 2026
Amount
7,200.00 USD paid out
Reference
MAINT Q1

WHAT HAPPENS

  1. Retrieval finds two open invoices from the same vendor, each for 7,200.00 USD.
  2. The reference doesn’t say which one this payment settles.
  3. The numbers match for both, so the evidence can’t pick one. The agent abstains.

OUTPUT

Result
not matched
Next
a person gets both invoices

Line 2 ends in an Escalation Handing a case to a person, together with what the agent found and why it stopped. See the glossary. Picking the older invoice would be a guess, not evidence. Nothing in the bank line says which invoice it settles.

ITEM GET

No evidence, no match

When the agent can’t back a line with evidence, it hands it to a person instead of guessing.

FAQ

Retrieval over one database (Postgres with pgvector) ties each claim to a source document, numeric checks hold amounts to the cent, and doubtful cases go to a person. It was evaluated and red-teamed (attacked on purpose to find flaws) before go-live. Passing is no guarantee for every answer in production, and means little without case count, coverage and after-launch monitoring.

STAGE CLEAR

What you now know

  • How the agent works: one searchable store, evidence first, a citation on every proposal, a numeric check before any match.
  • Why a line that fits two invoices goes to a person instead of being guessed.

Check yourself

Tap or click a question to see the answer.

Illustrative case: the agent finds the invoice for a bank line, but the invoice says 4,180.00 USD and the bank line says 4,108.00 USD. What happens?

The numeric check fails, so the match should be blocked before any posting step and referred to a person. A matching document is not enough on its own.

Next stage:Why does the agent refuse to guess, and what made it trustworthy enough for a fund to keep?6 min
Adam Boudjemaa
Adam Boudjemaa

Former CTO of Integra. Named author (1 of 5) of ERC-3643, first author of ERC-6960, co-author of ERC-7410, and co-author of ERC-8203, which is still a draft. Building production AI and regulated Web3 systems.

Have a project to ship or a role to fill?

Discuss your project or role
Follow the engineering notes

Get new articles on production AI and smart contracts by email.