Skip to main content
Apragya AI
Docs · AI & Automation

Build an Invoice Reviewer agent in 5 minutes

End-to-end walkthrough from create-agent to bound-to-app-event.

This is the hands-on companion to the Quick Start. Same five-minute time-budget; this version walks you through the UI rather than the SDK, and ends with the agent actually bound to a live invoice.received event in the Invoice & AP app.

1. Open the Agent Builder

Sidebar > Suites > Solution > Agent Builder > New Agent. You land on a blank canvas with the five-field configuration panel on the right.

2. Configure the agent

  • Name: Invoice Reviewer
  • Model: pick one of the platform's supported LLMs from the dropdown - the picker shows the AI Credits impact of each
  • System prompt: "You review invoices. Match each invoice to its PO and GRN, flag mismatches, and either post to ERP or pause for human review depending on the approval-amount guardrail."

3. Grant the tools

On the Tools tab, grant the four built-in tools the agent needs:

  • invoice.read - parses the inbound invoice document
  • po.lookup - finds the matching PO in the platform's procurement records
  • grn.lookup - finds the matching goods-received note for three-way match
  • erp.post - posts the validated invoice to the connected ERP
Each tool grant sandboxes the call - the agent can only invoke the tools you granted, and every call writes a RunNode row with cost + latency + result. Anything outside the grant list is blocked at the runtime layer.

4. Set guardrails

  • max_approval_amount: 10000 (currency follows the tenant default)
  • require_human_review: true (when amount exceeds max_approval_amount)
  • max_tool_calls: 8 (cap on the agent's tool-use budget per run)

5. Test it

Tests tab > Run Test. Drop a sample invoice payload and hit run - the agent fires, calls the tools, and shows the trace. Iterate the prompt until the trace looks right.

{
  "invoice_id": "inv_test_001",
  "vendor": "Acme Corp",
  "amount": 4250.00,
  "po_number": "PO-2026-091",
  "line_items": [
    { "description": "Widget Kit", "qty": 50, "unit_price": 85.00 }
  ]
}

6. Bind to the invoice.received event

Open the Invoice & AP app > Automations > Add Binding. Pick event=invoice.received, agent=Invoice Reviewer, set input_mapping to pass the inbound record straight through, and Publish.

Once bound, every new invoice that lands in the app fires the agent automatically. Under-threshold invoices get posted to ERP; over-threshold invoices pause for human review at the HITL Reviews queue. You can watch the runs land in real time on the Agent > Runs tab.

Need help building this? Talk to a real engineer

← All docs
Ask Vippy anything