Finance & Procurement

Finance & Procurement Templates

Two templates for the money side of the business: accounts payable / receivable / close, and procure-to-pay.

create-leafmesh my-project --template finance-ops # or: create-leafmesh my-project --template procurement-ops

finance-ops — AP / AR / Close (+ Banking)

17 agents · 3 crons

AgentTypeRole
invoice_intake_agentLLMIntake owner — any source (email, portal, ERP webhook, mobile photo) → canonical invoice event, with structured field extraction and routing flags in one role
matching_agentProgrammaticMatching clerk — ERP PO lookup + line-item match, then the 3-way match (invoice ↔ PO ↔ goods receipt) when required
payment_risk_agentLLMPayment-risk officer — duplicate-ledger pre-flight + fraud/anomaly judgment via vendor history and the fraud playbook
gl_coding_agentLLMCost centre / GL account / tax code per chart of accounts
approval_router_agentProgrammaticDeterministic dollar tiers: AP clerk → Controller → CFO
payment_scheduler_agentProgrammaticOptimal pay date — net terms + early-payment discount capture
erp_poster_agentProgrammaticPosts to NetSuite / SAP / QuickBooks
vendor_comms_agentLLMVendor communications — drafts exception queries to vendors and requestors, and answers payment-status and dispute inquiries
vendor_compliance_agentLLMCompliance officer — banking-grade KYC (sanctions + PEP + beneficial owners) plus new-vendor onboarding (tax form + OFAC + bank verification) before first payment; fails closed
loan_origination_agentProgrammaticCredit policy matrix with auto-approve floor and tiered human review
loan_servicing_agentProgrammaticDaily cron — payments, payoff quotes, delinquency buckets
regulatory_monitor_agentLLMDaily cron — SEC / FinCEN / IRS / EU feeds mapped to finance process areas
close_cycle_orchestrator_agentProgrammaticMonth-end cron — reconciliation gaps, unposted entries
ap_clerk / controller / cfoHumanDollar-tiered sign-off; controller owns close and compliance
audit_logger_agentExternalImmutable terminus of every flow

How it works. Invoices flow intake (normalise + extract) → parallel PO/3-way matching and payment-risk screening → GL coding → the deterministic dollar router → human sign-off → ERP post. Exceptions don't die in inboxes — vendor comms drafts the query. The banking sub-flows (the compliance officer's KYC + onboarding gate, origination → servicing) ride the same human chain. At month-end the close orchestrator sweeps for anything unreconciled.

Value. AP is the canonical high-volume, high-rules, regulator-visible function — and the first place auditors look. Here every invoice gets the same fraud check, the same 3-way match, the same audit trail, at machine throughput — and the close cycle stops being a heroic monthly scramble.


procurement-ops — Procure-to-Pay

11 agents · 1 cron — ships with realistic seed data (20 SKUs, 22 suppliers, 12 open POs), demo-able on first run.

AgentTypeRole
order_intake_agentLLMParses orders + rule-based compliance screening (high-value flags, SKU validation)
operations_managerHumanApproves every order (timeout → auto-approve fallback)
inventory_agentProgrammaticStock status per SKU; honours explicit order quantities; in-transit dedup
supplier_agentProgrammaticComposite scoring: reliability 40% / lead time 35% / price 25%
logistics_agentLLMProcurement plan: immediate (critical stock) / reorder (low stock) / explicit order lines
po_approval_agentHumanFinance sign-off above threshold before PO issuance
purchase_order_agentProgrammaticGenerates real PDF purchase orders + open-PO ledger registration
grn_agentProgrammaticGoods receipt vs open PO; updates on-hand stock; quality incidents → ops review
supply_report_agentProgrammaticDaily cron — KPI report, then a full auto-replenishment pass
trade_compliance_agentLLMOFAC / BIS / ITAR / EU / UK / UN sanctions screening + conflict-minerals + modern-slavery; fails closed
tariff_classifier_agentLLMHTS codes + FTA duty rates + landed cost; low confidence → customs broker

How it works. Order → human approval → inventory check → supplier ranking → logistics plan → PO approval → PDF purchase orders issued and ledgered. Goods arriving close the loop through goods-receipt back into inventory. The daily cron runs the whole chain unattended for replenishment. International suppliers pass sanctions screening — a failed screen blocks, never silently clears — and line items get real landed-cost math.

Value. Procurement errors are expensive in both directions — stockouts halt production, over-ordering ties up cash, and a sanctioned supplier is a federal problem. This mesh gives a small ops team big-company controls: composite supplier scoring, dual human gates on money, fail-closed compliance, and purchase orders that reconcile themselves on receipt.


Next: Manufacturing & Supply Chain · Templates Overview

Last updated: 11/10/2026