Architecture and integration guide

AI ReconcilerTechnical guide

A suite of modules on the Phoenix platform. Models read and challenge; fixed rules decide; only the connector writes to the ERP.

Modular suitePrivate or approved modelsRules enforced by testsBack-tested learning
Architecture

Modules, boundaries and the only two ways out

SOURCESMailboxesGraph or IMAPUploadsPDFs, check scansBank feedDeposits, addendaCard batchesProcessor reportsReviewersERP add-on, webPeopleAI RECONCILER ยท PLUGIN SUITEModules split by how often they changeIngestionIntake, dedupeExtractionRead cascade, OCRMatchingPayer, invoicesAgentsCritic, linterWorkflowGate, line workPostingIdempotent writesPersistenceOwn schema, logNotificationsAlerts, digestsUIInbox, settingsAbstractions: contracts only ยท nothing depends on the UI ยท no floating-point moneyMODEL INFERENCESelf-hostedPrivate gatewayCloud modelIf you approveSYSTEM OF RECORDERP connectorSAP Business OneERP ledgerPayments, invoices
Data flow AI Reconciler modules External systems and people Only inference components call models; only the connector writes to the ERP (both enforced by tests)
Rule 1

Feature-flagged

Behaviour changes ship behind settings that default to off.

Rule 2

Idempotent writes

Every external write can be retried without a second posting.

Rule 3

Fully logged

Each agent step is recorded with its evidence and provenance.

Rule 4

No direct egress

Bank and ERP are reached only through existing connectors.

Example dataAgent settings. Gate thresholds, tolerance and hold-anomalies, with configuration keys.

AI Reconciler ยท Technical guide, fullClarity VenturesPage 1 of 12
Architecture deep dive

Ten modules, split by how often they change

The UI and notifications change often; posting, the only module that writes to the ERP, almost never.

ModuleResponsibilityDepends on
AbstractionsContracts and data types only; no behaviour, no I/Onothing
PersistenceReconciler entities in a schema of its ownAbstractions
IngestionMailbox intake, upload, scanner intake, dedupe, pairingAbstractions
ExtractionCalls the OCR and vision endpoints; per-field confidenceAbstractions
MatchingPayer resolution, invoice match, allocation, toleranceAbstractions
AgentsCritic (may only lower), linter (hard rules), auditorAbstractions
WorkflowComplexity, line engine, gate, learning, reportsMatching, Agents
PostingIncoming payments, allocations, journals; idempotentAbstractions, connector
NotificationsLow-confidence alerts, daily digest, deep linksAbstractions
UIInbox, board, line work, learning, settingsAbstractions
Enforced by tests

Six architecture rules

  1. No suite type may reference a bank or ERP host directly.
  2. HTTP only inside the model and OCR client implementations.
  3. A data type declared in Abstractions is declared nowhere else.
  4. Abstractions holds no persistence, file I/O, HTTP or logging.
  5. Nothing depends on the UI; Posting depends only on Abstractions and the connector.
  6. No floating-point type in anything that carries money.

Example dataUI module. An embedded panel reconciling credits against open invoices.

Change control. Posting is the only module that writes to the ERP and is released with the most care. Everything it writes is an instruction that passes one policy check, whichever screen, batch or API asked for it.
AI Reconciler ยท Technical guide, fullClarity VenturesPage 2 of 12
Data flow

What is stored, and how it moves

DataContentsHandling
Remittance documentsE-mail parts, PDFs, images, sheetsContent hash per document; re-reads never overwrite a person's work
Extracted linesPayer, invoice, amount, notesPer-field confidence; label lines removed before scoring
ERP mirrorOpen invoices, customers, creditsRead for matching; the ERP stays the system of record
Proposals, run stepsAllocations, scores, evidenceSnapshot per version; who produced each step
FeedbackReasons, correctionsStored against the exact proposal version
Posting instructionsPayments, allocations, journalsPolicy-checked, idempotent, confirmed or refused by the ERP

Input. A synthetic demo check image.

Example dataOutput. Fields read from it, compared with what was expected.

What a model sees: page images and text of the remittance, and the payer's own open invoices as candidates. Bank numbers are masked where the task does not need them and are parsed by fixed rules. Card numbers never enter the system.
Duplicates and re-reads. Messages are de-duplicated by message ID before anything is read, and documents by content hash. A newer reader may re-read a document, but never over a posting or over a person's decision.

Stored once

Documents keep a content hash; a duplicate is recognised before it is read.

Protected at rest

In Clarity-hosted deployments, records and document images are encrypted at rest.

Access logged

Document images are visible to reviewer roles, and each access is recorded.

AI Reconciler ยท Technical guide, fullClarity VenturesPage 3 of 12
Integrations and APIs

Interfaces, settings and endpoints

E-mailMicrosoft 365 (Graph) or IMAP; poll interval (default 5 min), accepted recipients, allowed sender domains, Off or Quarantine enforcement, 25 MB attachment cap
DocumentsPDF text layer, scans and photos (PNG, JPEG, TIFF, WebP and more), CSV and Excel, HTML, Word packs, ZIP
BankBank connector supplies deposits, ACH addenda (CCD+, EDI 820) and check images
CardICardBatchReader per processor batch-report format
ERPSAP Business One: Service Layer connector and B1 add-on (embedded screens, posting queue, data push). Other ERPs via Phoenix connectors: proposed configuration
ModelsOpenAI-compatible gateway (vision and text), Ollama, Gemini or the offline mock
REST APIEndpoints behind the UI and add-on: intake and heal pass, reconciliation and escalation runs, posting runs, reports, learning and settings

Example dataE-mail intake. A forwarded bundle split into inner e-mails, each scored and classified.

Intake health. The recurring heal pass: verified, healing, needs a person, duplicates, quarantined.

Reconciliation

Today, match board, line decisions, search and options for the embedded screens.

Posting runs

Plan, queue and confirm postings; daily and posting reports.

Learning

Feedback, synonyms, proposals, versions, back-tests and activation.

AI Reconciler ยท Technical guide, fullClarity VenturesPage 4 of 12
Security, privacy and compliance

Built to be reviewed

Private inference

Models can run on privately hosted GPUs; public AI endpoints can be denied at the firewall, so residency does not rest on a setting alone.

Signed launches

The ERP add-on holds no key. Each window is signed by the server, single-use and short-lived; a replay is refused.

Least privilege

A dedicated ERP service account with only the rights it needs; the database role owns only its own schema.

Data minimisation

Bank details masked in lists; customer identity kept out of URLs and notification subjects.

Audit trail

Every decision recorded: proposal, review stage, model and version, and what a person did.

Kill switch

Pause all posting from the screen or cap the level per environment, without a deployment.

Compliance wording. Card data has no place to live: card handling is not part of the reconciler. AI Reconciler supports your audit and separation-of-duties controls; it does not claim a certification on its own.

Resilience example. If the service cannot be reached, the ERP window says so, the ERP is unaffected and nothing posts.

Posting allow-list. Posting can be limited to the customers you choose.

Example dataEvidence on screen. Every extracted field shown beside what was expected, for a person to verify.

AI Reconciler ยท Technical guide, fullClarity VenturesPage 5 of 12
Automation and AI

Models read and challenge; rules decide

Guard, triageDedupe, sender,remittance or notFixed rulesRead cascadeText layer, textmodel, visionAI modelRead checksTotals, fields,consistencyFixed rulesResolve, matchPayer, invoices,tolerance, claimsFixed rulesCriticChallenges; mayonly lower scoreAI modelLinter, auditorHard checksblock any postFixed rulesConfidence gateOne threshold,hold-anomaliesFixed rulesPost by policyLevel, pilot list, capsReview queueLeast certain firstEscalation agentsRank options for review
Fixed rules: deterministic code AI model: reads and challenges, never decides to post

Read cascade

Text layer first, then a text model, then vision; the first read that passes consistency checks wins.

Critic

Challenges each proposal: payee versus remitter, credit memo paid as invoice, duplicate. May only lower confidence.

Escalation agents

Payer investigator, re-reader, invoice hunter and options strategist, on held items only, within a model budget.

Gate defaults

Auto-post at or above 98%, review at or above 90%; hold-anomalies always wait for a person.

Feedback. Structured reasons stored against the exact proposal version; the learner and back-tests read them.

Learning governance

How a lesson becomes a rule

FeedbackReasons, correctionsDraftproposed rule or promptBack-testedreplayed on golden setActiveone version in useArchivedkept for rollbackA version activates only with no false auto-post on the golden set; rollback copies an archived version forward.

Feedback at phone width.

AI Reconciler ยท Technical guide, fullClarity VenturesPage 6 of 12
Admin and configuration

Settings an administrator controls

Posting levels. Capped by an environment ceiling; changed with a reason; impact previewed over the last seven days.

Display options. Per-reviewer density, start screen and list filters.

  • Thresholds, tolerance and GL mappings in Reconciler settings, with the effect shown before saving.
  • Posting administration needs its own role; others see it read-only.
  • Mailboxes, sender domains and enforcement per mailbox.

Go-live stages at phone width.

Intake health. Run a health pass on demand, or let the scheduled pass do it.

AI Reconciler ยท Technical guide, fullClarity VenturesPage 7 of 12
Deployment, hosting and environments

From a test company to production, one step at a time

Hosting

Clarity-hosted: application, database and model inference on Clarity infrastructure, reachable over a private connection.

Environments

Each environment has a posting ceiling set by the deployment; test companies are used first.

Scaling

Bounded background work: mailbox polling, heal passes and escalation queues each take a batch per run.

Data store

A PostgreSQL schema of its own; the ERP remains the system of record.

Go-live stages. One payment and one invoice, then complex payments, then automatic posting.

Payment Run. Batch posting through a guided wizard, plan-only until the level allows posting.

ERP add-on. Installed per user in the ERP client, test company first, assigned only to the people who reconcile. It can be turned off for everyone, for one PC, or from the service side within minutes, without touching ERP data.
Rollback

Every step can be undone

Stop everything

Pause all posting now, with a reason.

Step back

Choose a lower level, with a reason.

Remove a customer

Take it off the pilot list.

Undo a posting

Reverse the payment; the invoice reopens.

AI Reconciler ยท Technical guide, fullClarity VenturesPage 8 of 12
Feature matrix

Capabilities by module: 56 in total

FeatureWhat it doesCategory / module
Capture and intake
Remittance mailbox intake
Polls Microsoft 365 (Graph) or IMAP mailboxes on a schedule (default 5 min)Email.Receiver
Sender and attachment guard
Sender domains, recipient routing, size and type limits; quarantine modeEmail.Receiver
Forwarded bundles split
Inline-forward reader; each inner e-mail classified with its own payer hintEmail.Parser
Remittance classification
Scores amounts, invoice patterns and vocabulary; bank-export classifierEmail.Parser
Every common format
PDF text layer, images by signature, spreadsheet reader, ZIP expansionExtraction
Check image reading
Vision OCR prompt: courtesy and legal amounts read separately, MICR parsedExtraction
ACH addenda and EDI 820
CCD+ RMR and EDI 820 REF/RMR/BPR/TRN parsing; candidates checked vs ERPExtraction
Card deposit breakdown
ICardBatchReader plug-in per processor's batch report formatAbstractions
Duplicate recognition
Message-ID dedupe plus remittance content hash before any readExtraction
Intake health and self-healing
Heal pass every 15 min: retries, re-reads by newer readers, verdictsEmail.Receiver
AI reading
Read cascade
Text layer, then text model, then vision; first read passing checks winsWorkflow
Vision extraction
Vision parser on an OpenAI-compatible or Ollama model, JSON outputExtraction
Per-field confidence
Per-field scores; extracted vs expected comparison for check fieldsExtraction
Payment channel inference
Channel read from the document's own wordingExtraction
Joined invoice lines
Split only when every number resolves to one ERP invoiceWorkflow
Matching
Payer identification
Resolver over invoice refs, sender, signature, ACH IDs and name wordsMatching
Customer synonyms
Payer fingerprints and aliases; confirmed beats learned; conflicts flaggedWorkflow
Payer groups
Group roll-up resolved from the customer-code map, not new schemaMatching
Open-invoice matching
Deterministic allocator with tolerance; candidate sets, nearest due firstMatching
Short-pay reasons
Classifier over the line's own annotation and the varianceMatching
Credit memos and on-account
Credit-memo netting; on-account reconciled to invoice when advice arrivesWorkflow
Contested invoices
Live claim ledger across advice lines and bank allocationsMatching
Advice-to-deposit pairing
One-fit pairing; advice combinations that sum to a credit; late advicesWorkflow
Deposit tie-out
Deposit integrity check; decimal money types only, never floating pointWorkflow
Partial-clue suggestions
Partial invoice numbers, amount-only advices, older invoicesMatching
Agents and confidence
Multi-agent review
Deterministic reconciler; critic may only lower confidence; linter, auditorAgents
Confidence gate
Single deterministic gate; thresholds (default 98% / 90%); hold-anomaliesWorkflow
Escalation agents
Payer investigator, re-reader, invoice hunter, options strategistWorkflow
Explainable trace
Run steps with evidence, timing and who produced themPersistence

Posting allow-list. Restrict posting to chosen customers and named approvers.

AI Reconciler ยท Technical guide, fullClarity VenturesPage 9 of 12
Feature matrix, continued

Review, control, learning, measurement and platform

FeatureWhat it doesCategory / module
Review and work
Reconcile Inbox and Today
Inbox ordered by confidence; Today digest of one business dayUi
Match and Reconcile board
Each payment in exactly one state; search, saved views, layoutsWorkflow
Line-by-line workbench
Apply, partial, on account, credit memo; re-map, split, re-classifyWorkflow
Short-pay investigation
Investigation tasks; journal write-off only when preconditions are metWorkflow
Alerts and daily digest
Notification log rows; delivered by the platform notification serviceNotifications
Works inside the ERP
B1 add-on with server-signed, single-use launch; or the web consoleUi
Posting and control
Five posting levels
Level capped by an environment ceiling; reason required; pause all postingPosting
Pilot lists and approvals
Allow-lists, per-payment caps, second-approver threshold, role-gated adminPosting
Earned autonomy
Per-kind record of confirmed vs contradicted; one miss keeps reviewWorkflow
ERP posting
Idempotent instructions via the connector or add-on queue; journal entriesPosting
Payment Run and daily run
Wizard: dates, deposits, customers, report, execute; daily run at level 5Workflow
Reversal
Reopens the invoice, un-applies cash, posts the reversing entryWorkflow
Already-paid detection
Reads ERP payments and balances before any posting is queuedPosting
Learning
One-click feedback
Structured reason codes stored against the exact proposal versionWorkflow
Learns from corrections
Payer alias learner, rule and prompt drafts, learning from ERP historyWorkflow
Versioned prompts and rules
Draft, Backtested, Active, Archived; diff, rollback, return to shippedPersistence
Back-test before go-live
Golden set replay; only a version with no false auto-post can activateWorkflow
Measurement
Day back-test
Answer key from ERP journal or balance report; wrong postings headlineWorkflow
Shadow mode and scorecard
Shadow postings, determinism check, live shadow scorer per bank dayWorkflow
Daily bank and balance reports
Daily bank, balance and posting reports; .xlsx export with totalsWorkflow
Agent performance
Learning views: proposals, corrections, active versions, performanceWorkflow
Platform
Pluggable AI models
OpenAI-compatible gateway, Ollama or Gemini; deterministic mock offlineAgents
Private inference option
Self-hosted models; outbound egress default-deny in hosted deploymentsHosting
Architecture rules in tests
No direct bank/ERP egress; HTTP only in inference; no float moneyArchitectureTests
Settings with impact preview
Feature flags default off; impact preview; posting admin roleUi
Full decision log
Agent runs, model and prompt version, posting-level changes, approvalsPersistence
Diagnostics
Diagnostics screen; add-on health report and log uploadUi

Intake health. Verified, healing, needs a person, duplicates and quarantined.

AI Reconciler ยท Technical guide, fullClarity VenturesPage 10 of 12
Implementation, testing and monitoring

How a rollout is proven

Implement

Four phases

  1. Connect: mailboxes, the bank feed and the ERP connector; install the add-on in a test company.
  2. Mirror: send open invoices and customers across; load customer synonyms.
  3. Measure: day back-tests against the ERP's own postings, then live shadow mode with a scorecard.
  4. Pilot: manual posting for a few customers, then batches, then automatic for proven kinds.
Test

Before anything posts

  • Automated unit and regression tests for the suite, including the architecture rules.
  • A golden set of known-answer cases; a rule version activates only with no false auto-post.
  • Shadow postings with a determinism check between rounds.
Monitor

Every day

  • Intake health pass every 15 minutes, with retries and re-reads.
  • Diagnostics for intake, the ERP link and the add-on.
  • Daily bank, balance and posting reports, exportable to Excel.
  • Low-confidence alerts and a daily digest.

Learning. Proposals, corrections, active versions, agent performance and back-test by day.

Version history. Compare any two versions, roll back, or return to shipped defaults.

AI Reconciler ยท Technical guide, fullClarity VenturesPage 11 of 12
In summary

A reconciler your architects can reason about

Deterministic core

Matching and allocation are code.

Rule-based gate

One gate; hard errors always block.

Connector-only

No direct bank or ERP egress.

Private models

Self-hosted or approved providers.

Governed learning

Versioned, back-tested, reversible.

Example dataConfiguration you can read. Every value the agents decided under, with its key.

Feedback at phone width.

Next steps

What a technical review covers

Architecture review

Modules, rules enforced by tests, and the two ways out.

Security review

Hosting, access, data handling and the posting controls.

Proof on your data

Day back-tests and shadow scores on your own past days.

Talk to Clarity Ventures about a guided demo

Review the architecture, security controls and deployment options with Clarity's engineers.

Request a guided demo
AI Reconciler ยท Technical guide, fullClarity VenturesPage 12 of 12