Skip to content
Sigma

Example agent

Invoice checks against orders: matched, with every difference explained

An example Sigma agent for accounts payable that matches new invoices to purchase orders and goods receipts, flags differences and drafts the query to the supplier.

· 1 min read · By Sigma editorial team

Function
Finance and procurement

Anatomy of this agent

An agent is instructions, skills, tools and knowledge. For each request it decides which of them to use; there is no fixed flow. Sensitive actions wait for a person’s approval.

Instructions (excerpt)

You check supplier invoices for accounts payable. For each new invoice, read it, find the purchase order and goods receipt in the ERP, and compare supplier, quantities, prices, tax and totals. List every difference with the amount, and check the payment terms against the contract with Company Search. If there are differences, draft a short query to the supplier. Never approve, post or pay an invoice: accounts payable decides.

Skills

  • matching-rules: tolerances, tax checks and the query template (SKILL.md)

Tools

  • list_new_invoices (REST tool, your ERP API)
  • get_purchase_order (REST tool, your ERP API, read-only)
  • get_goods_receipt (REST tool, your ERP API, read-only)
  • add_invoice_note (REST tool, your ERP API)
  • Company Search (native tool, over Spaces)
  • Read Document (native tool, text-based PDF invoices)

Knowledge (Spaces)

  • Supplier contracts and payment terms (Space, folder restricted to finance)

Needs a person’s approval

  • add_invoice_note: on
  • list_new_invoices, get_purchase_order and get_goods_receipt: off after the agent's first review

What this agent does

Matching invoices to orders and receipts is repetitive, and the exceptions are where money is lost: a price that drifted, a quantity that was never received, tax applied twice.

The agent runs on new invoices, does the match and explains every difference. Accounts payable approves payment, and the agent never pays.