Walk-through · fictional company, sample data

One payment, from SAP to a signed-off outcome

How Trishaksha Nexus, TruthLayer and TruthBrain work together so that AI can help with payments without ever writing into SAP on its own.

The situation

Meridian Foods (a made-up company) pays about 1,200 vendors a month from SAP. The bank statement is the proof that money really left, and every month some payments arrive short, late or twice.

Today the finance team matches payments to the statement in spreadsheets. A payment that looks wrong is fixed with a phone call or a manual entry in SAP that nobody can trace later.

The wish: let AI do the checking and the thinking, but keep a person in charge of anything that changes a record, and keep a log that nobody can quietly edit.

Who does what

Trishaksha Nexus

Does the work and keeps the record.

  • Takes payments in from SAP and the bank
  • Runs each one through fixed states
  • Asks people to approve, previews, then acts once
  • Writes every step to a hash-chained audit log

TruthLayer

Checks the facts.

  • Compares the books with the bank
  • Returns a verdict: match or mismatch
  • Read-only. It cannot change anything

TruthBrain

Suggests what to do.

  • Proposes an action and a risk level
  • Can be wrong or unavailable, so Nexus treats it as advice
  • Never acts

Kong gateway

The single door between Nexus and the other two. Checks keys, swaps in the real credential, limits rate and size.

Operator

Olga

Starts and runs payments, asks for an undo.

Approvers

Asha, Ravi

Decide. Never on their own request.

Admin

Dev

Kill switch, audit check, dead letters.

Auditor

Meera

Reads everything, changes nothing.

The flow, step by step

Pick a scenario, then press Play, or click any step. The coloured dot is the message in flight: blue goes to TruthLayer, violet to TruthBrain, coral is a person.

SAP / Bankbooked payments,bank statements Peopleoperator, approvers,admin, auditor Nexusdoes the work intake and mappingworkflow statesapprovalsdry-run, execute oncekill switchaudit chain KONG GATEWAY TruthLayerchecks: does the bank agree with the books?returns a verdict, changes nothing TruthBrainsuggests: what should be done?proposes an action and a risk, never acts ×
1 · How it started
2 · What was sent
3 · What came back
4 · Goes next to
to TruthLayer to TruthBrain a person SAP or the bank failure

Safeguard

      

When something goes wrong

The design assumes each part can fail or be wrong. These are the cases that matter and what Nexus does in each.

SituationWhat happensWhy this is safe
TruthBrain is downThe run waits in a manual-review queue.Nexus never invents a recommendation.
The model sounds too relaxed about riskNexus can raise the risk level, never lower it.More approvals can be required, never fewer.
The requester tries to approveRefused. Someone else must approve.Maker and checker are different people.
An approver says noThe run closes as Rejected with a written reason.Nothing was sent to SAP.
Kill switch on, or writing disabledExecute is refused. Preview still works.An admin can stop all changes at once.
Crash or double click during executeThe action runs once, using an idempotency key.If it is unclear what happened, an admin settles it as sent or not sent.
The check after the action still shows a gapThe run ends as Escalated for a person.Nexus does not claim success it has not verified.
Someone edits or cuts the audit logThe hash chain and signed anchors show it.Past entries cannot change without leaving proof.
A person leaves the companyTheir session ends at the next check, within 10 minutes.Nexus asks the identity provider, it does not just trust the cookie.

What has been tried, and what has not

Tried and working

  • The whole path above against a real Kong gateway and the real TruthBrain service (with a stand-in model)
  • Sign-in, refresh and logout against a real Keycloak
  • Storage, isolation between organisations and restarts on PostgreSQL 16
  • The approval and undo screens in a real browser
  • 242 automated tests pass

Not yet tried

  • A real SAP S/4HANA or ECC system. SAP is simulated from sample files
  • SAP's own write and reversal interfaces. The customer must choose them
  • A real language model behind TruthBrain
  • Azure AD or Okta sign-in