Fairhaul Freight Bill Audit

v0.1.1
io.github.fpavia111-creator/fairhaul-freight-bill-audit Checked 1 day ago Published 4 days ago

Fairhaul Freight Bill Audit: audits truckload and LTL freight bills (CSV, Excel or X12 210) against…

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

fairhaul_info

Show this pack: pinned model, mode, caps, Auto opt-ins, and the allow/ask/block decision for every tool.

fairhaul_inspect_input

Show how a CSV, TSV, Excel, JSON or JSONL file under the root would be read: its format, which export it looks like, which of its columns map to this pack's columns, and what each column holds. Returns column names and shapes only, never cell values. Use it before a tool when a file comes straight from another system.

ParameterTypeDescription
path *stringA CSV, TSV, Excel .xlsx, JSON or JSONL file under the root
asstringSource kind to read it as (default: every kind this agent declares, best match first)
sheetstring | integerExcel sheet name or 0-based index (default: first visible sheet)

bills_audit Audit freight bills

[ALLOW] Check every invoice against the contract and flag duplicates, paid-before bills, linehaul over contract, fuel over table, accessorials not allowed, unpriced or not ordered, math errors and weights over the BOL. Returns the disputable amount per invoice.

ParameterTypeDescription
contract *stringFreight contract JSON (lanes, fuel table, accessorials, fuel_index); validated against the freight_contract schema
invoices *stringCarrier invoices under --root: CSV, Excel, JSON or an X12 210 file (.edi/.x12). One row per invoice or per charge line.
paidstringOptional paid-invoice history (invoice number, carrier, PRO) to catch bills paid before
shipmentsstringOptional shipment or BOL export: weights, quoted amounts, accessorials ordered, arrival and departure times
tolerancenumberDifference ignored per check, in currency units (default: the contract tolerance, else 1.00)

bills_explain Explain one invoice

[ALLOW] Show one invoice's charge lines, the contract amounts they were checked against, and every finding with its reason.

ParameterTypeDescription
contract *stringFreight contract JSON (lanes, fuel table, accessorials, fuel_index); validated against the freight_contract schema
invoice_number *stringInvoice number to explain, as it appears in the audit
invoices *stringCarrier invoices under --root: CSV, Excel, JSON or an X12 210 file (.edi/.x12). One row per invoice or per charge line.
paidstringOptional paid-invoice history (invoice number, carrier, PRO) to catch bills paid before
shipmentsstringOptional shipment or BOL export: weights, quoted amounts, accessorials ordered, arrival and departure times
tolerancenumberDifference ignored per check, in currency units (default: the contract tolerance, else 1.00)

bills_write_report Write the audit worklist

[ALLOW] Write bills-audit.csv (one row per invoice with blank decision columns) and bills-audit.html (totals by carrier and finding) into out_dir (default fairhaul-out/bills).

ParameterTypeDescription
contract *stringFreight contract JSON (lanes, fuel table, accessorials, fuel_index); validated against the freight_contract schema
invoices *stringCarrier invoices under --root: CSV, Excel, JSON or an X12 210 file (.edi/.x12). One row per invoice or per charge line.
out_dirstringFolder under --root for the files this writes (default fairhaul-out/bills).
paidstringOptional paid-invoice history (invoice number, carrier, PRO) to catch bills paid before
shipmentsstringOptional shipment or BOL export: weights, quoted amounts, accessorials ordered, arrival and departure times
tolerancenumberDifference ignored per check, in currency units (default: the contract tolerance, else 1.00)

bills_draft_dispute Draft a dispute

[ASK] Write drafts/dispute-<carrier>.md: one dispute letter to one carrier listing every disputed invoice with the amount and the contract reason. Marked DRAFT; open items are [TO CONFIRM]. Sending goes through bills_request_send (one click).

ParameterTypeDescription
carrier *stringCarrier name or SCAC as it appears on the invoices
contract *stringFreight contract JSON (lanes, fuel table, accessorials, fuel_index); validated against the freight_contract schema
invoices *stringCarrier invoices under --root: CSV, Excel, JSON or an X12 210 file (.edi/.x12). One row per invoice or per charge line.
contactstringCarrier billing contact (email or name)
fromstringYour name and company for the letter
out_dirstringFolder under --root for the files this writes (default fairhaul-out/bills).
paidstringOptional paid-invoice history (invoice number, carrier, PRO) to catch bills paid before
referencestringYour account number with the carrier
shipmentsstringOptional shipment or BOL export: weights, quoted amounts, accessorials ordered, arrival and departure times
tolerancenumberDifference ignored per check, in currency units (default: the contract tolerance, else 1.00)

bills_request_send Approve the dispute (one click)

[ASK · binding_send] After one named human click (even in Auto), record that the reviewed dispute draft is approved in dispute-requests.csv. Tied to draft_sha256; refuses while open markers remain unless accept_open_issues is true with a note. A person on your team acts on it; the agent never does.

ParameterTypeDescription
draft *stringDraft path returned by the draft tool
draft_sha256 *stringsha256 returned by the draft tool
accept_open_issuesbooleanSet true, together with a note, to go ahead while open markers or issues remain. Default false (refused while any remain).
notestringWhy it is fine to go ahead with open issues; required when accept_open_issues is true. Kept in the audit log.
out_dirstringFolder under --root for the files this writes (default fairhaul-out/bills).
tostringWho it goes to; must match the draft when the draft names someone

bills_request_pay Approve an amount to pay (one click)

[ASK · move_money] After one named human click (even in Auto), record in pay-approvals.csv the amount AP may pay on one invoice (usually the undisputed balance). Fairhaul Freight Bill Audit never pays.

ParameterTypeDescription
amount *numberAmount to approve for payment, in invoice currency; at most the invoice total
contract *stringFreight contract JSON (lanes, fuel table, accessorials, fuel_index); validated against the freight_contract schema
invoice_number *stringInvoice number to explain, as it appears in the audit
invoices *stringCarrier invoices under --root: CSV, Excel, JSON or an X12 210 file (.edi/.x12). One row per invoice or per charge line.
notestringA short note kept with the record.
out_dirstringFolder under --root for the files this writes (default fairhaul-out/bills).
paidstringOptional paid-invoice history (invoice number, carrier, PRO) to catch bills paid before
shipmentsstringOptional shipment or BOL export: weights, quoted amounts, accessorials ordered, arrival and departure times
tolerancenumberDifference ignored per check, in currency units (default: the contract tolerance, else 1.00)

bills_recall Recall what this agent has learned

[ALLOW] Search this agent's own memory of the customer's setup: accepted facts (in use) and facts waiting for a person. Kinds: note (none (shown by recall only)); charge_alias (reads that charge wording as that code in every audit, so it is checked against the contract terms for the code (the contract's own charge_aliases win)); carrier_alias (audits invoices billed under that name against the named carrier's contract block (a name the contract already gives to a carrier keeps that carrier)). Checks the memory file's hash chain; when it does not verify, no accepted fact is used.

ParameterTypeDescription
kindstringOnly facts of this kind (default all kinds)
limitintegerMost facts to return
querystringText to look for
statusstringcurrent (default) = accepted, waiting, and accepted-but-unverified

bills_learn Propose a fact to remember

[ALLOW] Propose one fact about the customer's setup for this agent to remember. It is stored as waiting and changes nothing until a named person accepts it with bills_accept_learning. Kinds: note (none (shown by recall only)); charge_alias (reads that charge wording as that code in every audit, so it is checked against the contract terms for the code (the contract's own charge_aliases win)); carrier_alias (audits invoices billed under that name against the named carrier's contract block (a name the contract already gives to a carrier keeps that carrier)). Refuses credentials, personal identifi…

ParameterTypeDescription
kind *stringWhat sort of fact this is (see recall for the kinds and what each changes)
value *objectThe fact, in the shape of its kind (see recall for the kinds)
notestringWhy, for the person who accepts it
source_filesarrayFiles under --root this came from (their hashes are recorded)

bills_accept_learning Accept or reject a learned fact

[ASK · accept_learning] A named person accepts or rejects a fact waiting in this agent's memory. Accepting makes it apply from the next run (see each kind's effect). Always needs a person's approval, even in Auto; the approver's name is recorded with the fact.

ParameterTypeDescription
decision *stringaccept puts the fact in use; reject keeps it out
id *stringFact id from recall or learn, e.g. MEM-1a2b3c4d5e6f
reasonstringWhy, in a sentence. Kept in the memory file and the audit log

bills_retire_memory Retire a learned fact

[ASK · accept_learning] A named person stops an accepted fact from applying. The history stays in the file. Always needs a person's approval, even in Auto.

ParameterTypeDescription
id *stringFact id from recall or learn, e.g. MEM-1a2b3c4d5e6f
reason *stringWhy the fact no longer holds. Kept in the memory file and the audit log

ap_pay_invoice Ap pay invoice

[BLOCK · move_money] Listed so agents can see it is refused. Fairhaul Freight Bill Audit never pays carriers; your AP team pays the approved amount.

email_send Email send

[BLOCK · binding_send] Listed so agents can see it is refused. Fairhaul Freight Bill Audit never sends email; a person sends the approved dispute.

carrier_portal_submit Carrier portal submit

[BLOCK · binding_send] Listed so agents can see it is refused. Fairhaul Freight Bill Audit never logs in to carrier portals.