Back to Blog
Product Launch 12 min read Nov 4, 2025

Launch: The Payroll Agent - Building India's Most Compliant Payroll Engine

Every line of code we write carries responsibility.

When you're processing payroll for thousands of employees across organizations, you're not just moving numbers. You're ensuring families can pay rent, children can go to school, and statutory obligations are met with precision.

Get it wrong, and the consequences are immediate and personal.

This is the story of building the Payroll Agent - a system that handles Indian statutory compliance with unprecedented accuracy. Not because compliance is interesting, but because compliance failures hurt real people.

The Problem We Inherited

Every payroll system we examined had the same fundamental flaw: they treated compliance as an afterthought. Calculate the gross pay, then figure out the deductions. Handle the edge cases in post-processing. Fix the errors after the fact.

The result? A patchwork of exceptions, overrides, and manual adjustments that nobody fully understood.

We asked a different question: What if compliance was the architecture, not a feature?

Hard Truths We Learned

1. PF Has a Wage Ceiling That Everyone Ignores

Provident Fund contribution is 12% of basic pay. Simple, right?

Wrong. There's a wage ceiling of Rs. 15,000. If basic exceeds this, the employee contribution is still 12% of basic, but the employer contribution is capped at Rs. 1,800 (12% of Rs. 15,000).

Every payroll system we reviewed got this wrong. Not sometimes. Always.

The fix isn't complicated. But you have to know the rule exists. You have to have read the EPF Act. You have to have tested with employees earning above the ceiling.

Most teams don't do any of these things.

2. ESI Eligibility Changes Mid-Month

ESI applies when gross salary is below Rs. 21,000. Clear rule. Hidden complexity.

What happens when an employee's salary is Rs. 20,000 in January and Rs. 22,000 in February due to a raise? ESI eligibility changes. But what about the contribution already collected? What about the employer's matching contribution?

The regulations specify exactly how to handle this. The regulations are 47 pages long.

3. Professional Tax is State-Specific Chaos

Different states. Different slabs. Different annual limits. Different calculation methods.

Maharashtra has 3 slabs with a Rs. 2,500 annual maximum. Tamil Nadu has 5 slabs. Karnataka caps at Rs. 200/month for most employees. Andhra Pradesh changed their slabs three times in the last decade.

A payroll system that works for employees in Mumbai will miscalculate for employees in Chennai. And nobody notices until the audit.

4. Gratuity Has a Cap Nobody Documents

The Gratuity formula is: (Basic + DA) x 15/26 x Years

Clean. Mathematical. And subject to a Rs. 20 lakh maximum that most systems don't enforce.

An employee with 30 years of service and Rs. 1 lakh basic would calculate to Rs. 17.31 lakh - under the cap. An employee with the same tenure and Rs. 1.5 lakh basic calculates to Rs. 26 lakh - but must be capped at Rs. 20 lakh.

Overpaying gratuity isn't generosity. It's a compliance violation.

5. Rounding Rules Differ by Deduction Type

PF rounds to the nearest rupee. ESI rounds down. TDS rounds to the nearest 10. Professional Tax depends on the state.

These differences seem trivial. They compound across thousands of employees and twelve months. At scale, rounding errors become audit findings.

The Architecture

We built the Payroll Agent with a simple principle: make the right thing easy and the wrong thing hard.

  • Rule engine first: Every statutory rule is encoded explicitly. PF wage ceiling. ESI eligibility threshold. State-specific PT slabs. Gratuity maximum. These aren't configuration options - they're constraints.
  • Validation before calculation: The system won't calculate a payroll that violates constraints. Not "will warn" - won't calculate. If the data is wrong, fix the data. Don't patch around it.
  • Immutable audit trail: Every calculation. Every rule applied. Every exception raised. Logged permanently. Reviewable always.
  • Test data from production patterns: Our test suite includes 115 synthetic employees across every edge case we've encountered. ESI eligible and ineligible. PF above and below ceiling. PT across multiple states. Gratuity at and above cap.

The Results

After eight months of development and testing:

  • 31 test scenarios covering every statutory calculation
  • 100% pass rate maintained for 60+ consecutive days
  • Zero compliance errors in production payroll runs
  • Automated filing for PF, ESI, and PT returns

These numbers matter because they represent payroll runs that completed correctly. Employees who got paid accurately. Statutory obligations that were met on time.

What We're Not Building

The Payroll Agent is not a replacement for human judgment. It doesn't decide whether someone deserves a raise. It doesn't evaluate performance. It doesn't handle the messy, human parts of compensation.

What it does is remove the cognitive burden of compliance. The HR team shouldn't have to remember the PF wage ceiling or look up PT slabs. The system should know these things so humans can focus on human problems.


Every line of code we write carries responsibility. The Payroll Agent is production-ready because we took that responsibility seriously.

Not because compliance is interesting. Because getting it wrong hurts people.

Want to see how the Payroll Agent handles your compliance requirements? Let's talk.