Ask the payer's agent. Verify before money moves.
LedgerlineCI success · main · 13 Nov 2026
When a payment arrives that matches no invoice, Ledgerline's agent asks the payer's own agent what it was for, checks the signed answer, and only then changes its plan — before any money moves.
Status Live demo on Google Cloud, running on the Airwallex sandbox with test money only. CI runs 651 backend tests on every push.
- Python
- FastAPI
- React
- TypeScript
- SQLite
- PostgreSQL
- MCP
- Claude API
- Google Cloud
A.01 — Problem and contribution
The problem, and my part in it.
Problem
A payment arrives that doesn't match an invoice. Someone emails the payer, waits, guesses — and sometimes refunds money that was really an advance.
Approach
Rules in code settle what is clear. For the rest, Ledgerline's agent asks the payer's own agent over MCP what the payment was for. The answer comes back signed and is treated as a claim: it must pass three checks before the plan changes, and every money decision is still made by rules that a replay reproduces exactly.
My contribution
Built for the Airwallex Agentic Banking Hackathon 2026 (HackerEarth): the MCP agent that asks the payer's agent, the three checks on its signed answer, the rules that decide every money movement, and the multi-company React app around them.
Who it helps
When a payment arrives that matches no invoice, Ledgerline's agent asks the payer's own agent what it was for, checks the signed answer, and only then changes its plan — before any money moves.
A.02 — Architecture
How it is put together.
- Payment arrives
- First plan from rules
- Ask payer's agent
- Signed answer
- Three checks
- New plan
- Two-person approval
- Ledger
- An MCP agent that asks the payer's agent about an unclear payment and verifies its signed answer before acting.
- Matched an independent reference model on all 2,127 synthetic payments and refused all 25 scripted attacks.
- Ran deposits, refunds and bill payments on the Airwallex sandbox (test money only); CI runs 651 backend tests.
A.03 — Technical decisions
Decisions, and why.
- 01
An agent's answer is a claim, not a fact.
Three checks on every signed answer: who signed it, that it is about this payment and still fresh, and that Ledgerline's own records agree. A correctly signed but false claim is rejected and goes to a person with the reason.
- 02
A language model must never move money.
Claude reads remittance emails and PDFs through typed tools, as advice only: no tool has an amount or account field. Money decisions come from rules that a replay reproduces.
- 03
One person should not be able to send money alone.
Approvals are bound to the exact amount and destination; the proposer cannot approve, and whoever approves an agent-proposed refund cannot also send it.
- 04
A sent transfer is not a finished one.
Refunds and bill payments go out as one transfer under a duplicate lock; SENT is not final, only PAID closes it.
- 05
Every decision must be checkable later.
A tamper-evident log records each decision with its inputs, and any plan the rules made can be replayed to the same answer.
A.04 — Reliability and evaluation
What was verified, and how.
- 651
- backend tests in CI
- 2,127
- synthetic payments, all matching an independent reference model
- 25/25
- scripted attacks refused
- 4 of 6
- reference-company payments decided with no person
Test counts are the documented results in the project README. Latest CI on the default branch: CI success · main · 13 Nov 2026
Reproduced on real pull requestsAn apparent duplicate first gets a refund plan. The payer's agent answers, signed, that it was an advance; all three checks pass and the plan changes to a credit — no wrong refund leaves.
A.05 — Trade-offs, limitations and status
What it doesn’t solve, stated plainly.
- Airwallex sandbox only: no live money.
- The built-in payer agents are simulations; no outside company runs its own agent yet.
- Balance requests open as an email draft; the server does not send email.
Current status Live demo on Google Cloud, running on the Airwallex sandbox with test money only. CI runs 651 backend tests on every push.
Next case study
Code Forge AIAsk a question about a GitHub repository and follow the answer back to the exact file and line, at the commit that was scanned.