|
|
Payroll Anomaly Agent
Author: Venkata Sudhakar
Payroll errors cost Indian companies millions of rupees annually through duplicate payments, miscalculated overtime, and unauthorised salary changes. For ShopMax India's 2,000-person payroll, manual auditing is impractical. An anomaly detection agent can scan every payroll run and surface exceptions before payment is released.
This tutorial builds a Gemini ADK agent that compares the current payroll run against the previous month's baseline, flags salary changes above a threshold, identifies duplicate employee entries, and highlights overtime claims that exceed policy limits.
The below example shows a payroll anomaly detection agent for ShopMax India in a business context.
It gives the following output,
Payroll Audit Report - April 2026 | ShopMax India
Total Entries : 5 | Anomalies Found: 3
Status : HOLD FOR REVIEW
[DUPLICATE] EMP-302 - Meena Pillai
Duplicate payroll entry detected.
Action: Remove one entry before payment. Investigate data entry error.
[SALARY_CHANGE] EMP-302 - Meena Pillai
Salary changed by 20.8% (Rs 48,000 -> Rs 58,000)
Action: Verify HR-approved increment letter before processing.
[OVERTIME_EXCESS] EMP-303 - Vikram Das
Overtime 38 hrs exceeds policy limit of 20 hrs.
Action: Obtain manager and HR approval for excess overtime.
Payroll is on HOLD. Resolve all 3 anomalies before releasing payment.
ShopMax India can run this agent automatically each month when the payroll file is uploaded to the HR system. Anomalies are routed to the payroll manager and the relevant department head for sign-off before the payment batch is released, preventing overpayments and duplicate transactions from reaching employee bank accounts.
|
|