Inspiration

In corporate finance, the month-end close is an exhausting, high-stakes ordeal. Financial controllers and accounting teams spend hundreds of hours manually cross-checking bank disbursement statements against ERP general ledgers, hunting down missing purchase orders, and investigating invoice anomalies.

While generative AI agents have promised to automate enterprise operations, CFOs and corporate controllers do not trust generative AI with their general ledger. A single hallucinated account classification or an unverified journal entry can trigger catastrophic SOX compliance failures, statutory restatements, and audit penalties.

Most existing "AI accounting" prototypes suffer from a fatal architectural flaw: the reasoning agent that formulates the proposed accounting entry is also the agent that approves and auto-executes it.

We founded LedgerProof on a non-negotiable financial safety invariant:

Resolution agents must never approve their own work.

We set out to build the first Autonomous Finance Control Layer (Track 2 — Autonomous Office of the CFO) where AI reasons over multi-source forensic evidence, deterministic code calculates arithmetic and materiality gates, an Independent Adversarial Verifier audits every proposal against statutory corporate policies, and human controllers retain cryptographic sign-off on material transactions.


What it does

LedgerProof automates the financial close, reconciliation, exception investigation, independent verification, and audit evidence generation with cryptographic proof behind every decision:

  1. Smart Multi-Format Ingestion & Schema Normalization:

    • Ingests bank statements, invoice archives, and ERP subledgers across CSV, Excel (.xlsx, .xls), and structured JSON.
    • Eliminates floating-point calculation errors by normalizing all balances into exact integer minor units (cents/paise): $$\text{amount}_{\text{minor}} = \text{round}(A \times 10^{\text{precision}})$$
    • Dynamically formats localized numerals for both International notation ((1,250,000.00)) and Indian numbering ((12,50,000.00)) with explicit ISO 4217 tags (USD, EUR, GBP, INR).
  2. Deterministic 3-Way Reconciliation Core:

    • Performs deterministic arithmetic matching across Purchase Orders ((A_{\text{po}})), Vendor Invoices ((A_{\text{inv}})), and Bank Disbursements ((A_{\text{bank}})).
    • Evaluates variance percentage without rounding drift: $$V = \frac{|A_{\text{inv}} - A_{\text{po}}|}{A_{\text{po}}} \times 100\%$$
    • Flags anomalies if (V > \tau_{\text{policy}}) (where statutory policy threshold (\tau_{\text{policy}} = 2.0\%)).
  3. Multi-Signal Duplicate Detection Engine:

    • Computes duplicate fraud confidence using a weighted multi-dimensional vector: $$S_{\text{dup}} = w_1 \cdot \mathbb{I}_{\text{inv}} + w_2 \cdot \text{Levenshtein}(V_1, V_2) + w_3 \cdot e^{-\lambda \Delta t} + w_4 \cdot \left(1 - \frac{|\Delta A|}{A_1}\right)$$
    • When (S_{\text{dup}} \ge 0.85), the engine enforces an immediate Tier D Hard Block, permanently preventing unexecuted disbursement.
  4. Forensic Investigation & Resolution Formulation:

    • Reconstructs multi-source evidence packets by scanning 48 months of historical GL postings, Master Vendor Agreements, and OCR receipts.
    • Formulates draft journal entries (e.g., GL reclassifications, variance accruals) inside an execution-isolated sandbox with zero write access to the live ledger.
  5. Independent Adversarial Verifier (Dual-Agent Separation):

    • Audits every proposed resolution against corporate accounting rules before execution.
    • The Wow Moment: When the resolution agent proposes booking an AWS invoice to Office Supplies (GL 6400) due to naive keyword matching, the Independent Verifier vetoes the resolution, cross-references Master Service Agreement contract terms, and corrects it to Cloud Infrastructure (GL 6010).
  6. Deterministic Autonomy Gate (Tiers A–D):

    • Tier A (Autonomous Post): Immaterial, clean 3-way match ((<\$1,000)).
    • Tier B (Autonomous Policy Correction): Verified standard rule reclassification ((<\$10,000)).
    • Tier C (Human Controller Review Required): Material variances or transactions (\ge \$10,000) ((\ge \text{\rupee}10,00,000)).
    • Tier D (Hard Block): High duplicate confidence ((\ge 85\%)) or verifier disagreement.
  7. Immutable SHA-256 Audit Vault:

    • Cryptographically binds each decision trace, evidence packet, tool call, and controller signature into an append-only audit chain: $$H_n = \text{SHA-256}(H_{n-1} \parallel T_n \parallel \text{Trace}_n \parallel D_n)$$
  8. Zero Fabricated Data Workspace:

    • Offers a live toggle between the pre-loaded 4,128-transaction Northstar Labs benchmark and a clean Real Data Workspace with zero fake numbers.

How we built it

LedgerProof was built and hardened under the Agent Orchestrator (AO) multi-worker development lifecycle:

  • Frontend & Visual Architecture:

    • Next.js 14 App Router (React 18, TypeScript strict mode, Tailwind CSS).
    • Clean separation of routes: / serves the editorial marketing landing page, /dashboard serves the full enterprise control center, and not-found.tsx provides instant 404 recovery.
    • 100% Light Mode Financial Aesthetic: Warm neutral backdrop (#F9F8F6), crisp borders (#E5E3DD), tabular numerals (font-variant-numeric: tabular-nums), and zero generic AI clichés (no sparkles or floating robot heads).
    • Interactive n8n-Style Workflow Canvas: Real-time SVG execution graph. On the dashboard, agents remain in Standby (All 8 Nodes Ready · 0.0ms) until triggered by "Run Close" or custom data ingestion.
    • Docked Spotlight Tutorial: Step-by-step element tour with viewport clamping, scrollable content, and keyboard shortcuts.
  • Financial Safety & Arithmetic Engines:

    • money.ts & financeEngine.ts: Decimal-safe minor unit converters with zero IEEE 754 floating-point rounding errors.
    • Full client-side spreadsheet engine (xlsx) for drag-and-drop parsing of multi-sheet workbooks.
  • Backend & Autonomous Evaluation Engine:

    • Python 3.12 & FastAPI: Deterministic matching core, policy rule checkers, and autonomy gates.
    • Local Intelligence: Functions with 100% fidelity offline without requiring paid third-party API keys.
    • Continuous Evaluation Suite: Evaluated across 80 ground-truth enterprise close benchmarks, validated by 15 automated Pytest test suites.

Challenges we ran into

  1. Preventing Floating-Point Drift in Financial Balances: Standard JavaScript and Python floating-point math causes disastrous financial drift (e.g., (0.1 + 0.2 = 0.30000000000000004)). We resolved this by building a dedicated minor-unit arithmetic layer that stores all monetary values as exact integer units (cents/paise) with explicit ISO 4217 tags.

  2. Enforcing Dual-Agent Architectural Separation: In standard multi-agent systems, agents easily share context windows and rubber-stamp each other's outputs. We enforced strict physical and logical separation: the Resolution Agent runs in an isolated sandbox with zero write permissions, while the Independent Verifier operates on an adversarial prompt with direct access to statutory policies.

  3. In-Browser Multi-Sheet Excel Parsing Without Latency: Real-world enterprise accounting files are messy—containing merged cells, localized currency symbols ((\$), (\text{\euro}), (\text{\pounds}), (\text{\rupee})), and inconsistent date strings. We built an in-browser parsing pipeline using binary array buffers and SheetJS to detect headers, normalize values, and infer column mappings in under (50\text{ms}).

  4. Preserving Browser History Across Dashboard States: Controllers expect the browser Back button to return to the landing page rather than exiting the application. We restructured the application into dedicated Next.js App Router routes (/ and /dashboard), allowing natural browser navigation and deep URL tab addressing (/dashboard?tab=exceptions).


Accomplishments that we're proud of

  • Zero False Autonomous Approvals ((0.00\%)): Across 80 ground-truth evaluation benchmark cases, LedgerProof achieved 96.25% decision accuracy, 99.10% policy compliance, and 0 false autonomous approvals.
  • 100% Offline-First Local Intelligence: The entire multi-agent system runs locally with 14.2ms average decision latency and zero cloud API spend required.
  • Genuine Data Parsing (Zero Fabricated Records): Ingesting custom CSV or Excel files parses actual user rows into live local storage with dynamic autonomy tier assignment.
  • The Dual-Agent Veto Mechanism: Successfully demonstrating how the Independent Verifier vetoes and corrects naive LLM misclassifications before any journal entry can touch the general ledger.
  • 15/15 Passing Automated Tests & 0 Build Errors: Clean Next.js 14 production build and 100% Pytest test pass rate.

What we learned

  • Separation of Concerns is Financial Safety: In autonomous finance, separation of duties is not just an accounting best practice—it is a mandatory software architecture invariant. Hypothesizing resolutions and verifying compliance must never occur in the same agent step.
  • Controllers Value Determinism Over Generative AI: Financial teams do not want a creative LLM calculating account balances; they want deterministic math for arithmetic, combined with LLMs strictly for qualitative document synthesis and forensic reasoning.
  • Explainability Over Black Boxes: Auditors will reject black-box AI recommendations. Every automated accounting action must be accompanied by multi-source evidence chips, statutory rule citations, and cryptographic proof of work.

What's next for LedgerProof

  • Direct ERP Write-Back Connectors: Two-way OAuth2 synchronization adapters for NetSuite, SAP S/4HANA, QuickBooks Online, and Workday Financial Management.
  • Real-Time ISO 20022 FedNow & SEPA Feeds: Continuous, streaming payment reconciliation for instant treasury disbursements.
  • SOC 1 / SOC 2 Type II Automated Evidence Packets: Single-click compilation of auditor-ready cryptographic evidence binders for external audit teams (PwC, EY, Deloitte, KPMG).
  • Decoupled Enterprise Storage: Transitioning from client-side IndexedDB/LocalStorage to self-hosted PostgreSQL/Snowflake instances for Fortune 500 high-frequency transaction volumes.

Built With

  • accounting
  • ai-agents
  • autonomous-agents
  • cryptography
  • csv
  • double-entry
  • enterprise-software
  • fastapi
  • financial-technology
  • fintech
  • multi-agent
  • n8n
  • nextjs
  • offline-first
  • pydantic
  • pytest
  • python
  • react
  • reconciliation
  • sha256
  • sox-compliance
  • tailwind-css
  • typescript
  • xlsx
Share this project:

Updates