← Selected engineering

Case study / Enterprise automation / Testnet prototype

Automate the checks.
Keep the judgment.

A procurement agent that validates an invoice against business rules before preparing a plan for human approval.

ProjectEnterprise Procure Agent
FocusERP validation & approval controls
StackTypeScript · Hedera Agent Kit · Zod
Try the walkthrough ↓

01 / The problem

An invoice is more than an amount.

Before proposing an action, the workflow needs to know whether the vendor is allowed, verified, and within risk policy; whether the purchase order matches; and whether its balance and the approval limit cover the invoice.

The project puts those checks in a custom ERP validation plugin. A failed rule returns a reason an operator can act on.

02 / The workflow

Business rules before tool actions.

  1. 01

    Load the invoice

    Look up the vendor and purchase order from the ERP-style dataset.

  2. 02

    Evaluate the policy

    Check the allowlist, KYC status, risk tier, PO ownership, balance, and configured approval limit.

  3. 03

    Explain the decision

    Block invalid requests with specific reasons. Passing invoices can proceed to an approval plan.

  4. 04

    Prepare human review

    The project uses return-bytes mode and testnet-only configuration. The operator remains part of the action path.

03 / Interactive walkthrough

Three invoices.
Different decisions.

Select an invoice, then change the approval limit. Watch which checks pass and what still needs attention.

Choose an invoice

Adjust the limit to see which invoices qualify.

INV-1001 / Sample data

Acme Facilities GmbH

$325
  • Passed
    Vendor allowlist

    Vendor is on the approved list.

  • Passed
    Vendor verification

    KYC status is verified.

  • Passed
    Vendor risk

    Vendor risk is within policy.

  • Passed
    Purchase order match

    Purchase order belongs to this vendor.

  • Passed
    Purchase order balance

    Invoice: $325. Remaining balance: $500.

  • Passed
    Approval limit

    Invoice: $325. Configured limit: $750.

Ready for human review

All checks passed. The next step is a person reviewing the approval plan.

Interactive illustration using the public project's sample invoices and policy rules. Runs in your browser with sample data; no transactions are submitted.

04 / What this demonstrates

Useful automation has explicit constraints.

The valid fixture passes at the default $750 limit. The blocked vendor fails several controls. The $900 invoice exceeds the default limit, but qualifies when the limit is raised to cover it.

The underlying repository includes a TypeScript CLI, the custom ERP plugin, three invoice fixtures, and policy tests. The browser walkthrough illustrates the same checks; the Hedera integration lives in the source project.

Explore the implementation and tests ↗