# Expense Audit & Compliance Agent

> An expense-audit agent that checks each line against policy, flags out-of-policy items, duplicates, and fraud signals, then approves, holds, or escalates.

- **Category:** Finance & Accounting
- **Difficulty:** Advanced
- **Setup time:** 45 min
- **Stacks:** Claude, LangGraph, OpenAI
- **Version:** 2.0.0 (updated 2026-06-21)
- **Source:** https://agent-kits.com/kit/expense-report-auditor

## Overview

Line-by-line audit against your actual policy: limits, categories, receipt rules, and per-diems — each flag cites the rule it breaks.

Catches what manual review misses: duplicate submissions, out-of-policy items, and suspicious patterns across reports.

Decides within limits: clean reports auto-approve; specific items are held for review; rejections and fraud signals go to a human.

Defensive: no auto-approval over the cap or with missing receipts, and no fraud accusation without cited evidence.

## When to use it

- Finance/AP reviews a high volume of expense reports and most of the work is policy-checking and receipt-matching.
- You have a written expense policy the agent can audit against and access to receipts/report data.
- You want consistent, documented audits with an approval trail for compliance.
- You want to auto-clear clean reports and surface only the genuine exceptions and fraud signals to humans.

## When not to use it

- You have no written, structured policy for the agent to audit against.
- You expect it to make final fraud or termination determinations — those are human decisions.
- You can't give it receipt/report access to actually verify line items.
- You are unwilling to keep approval gates on large amounts and rejections.

## Architecture

- **Report intake** — Receives the submitted expense report (line items, amounts, categories, dates, attached receipts) and the submitting employee/cost-center context.
- **Policy grounding** — Loads the applicable written policy — limits, allowed categories, receipt thresholds, per-diems — the benchmark every line is audited against.
- **Receipt verification** — Checks that required receipts are present and readable and that amounts/merchants match the claimed line, without approving items that lack required proof.
- **Duplicate & anomaly engine** — Detects duplicate submissions (same receipt/amount/date) and anomalous patterns (overlapping travel, weekend/personal spend) as evidence for human review.
- **Line audit & decision gate** — The model audits each line and a deterministic gate enforces the approval cap and receipt rules; over-cap totals and exceptions route to human approval.
- **Approval & routing** — Approves compliant reports within limits, holds specific items, and routes rejections/fraud signals to finance with the cited evidence.
- **Audit trail & learning** — Logs every decision with the cited rule and outcome for compliance, and feeds reviewer overrides back to refine checks.

## Files in this bundle

- `system-prompt.md` — the agent's system prompt
- `tools.json` — tool/function definitions the agent expects
- `workflow.md` — step-by-step run loop
- `.env.example` — environment variables to fill in
- `kit.json` — full structured metadata
- `starters/` — minimal starter snippets
- `LICENSE` — Apache-2.0 (code, configuration, and schema)
- `LICENSE-CONTENT` — CC BY 4.0 (specification text and documentation)
- `NOTICE` — attribution and trademark notice
- `run.py` — **runnable demo**: real agent loop with mock tools (`pip install anthropic`, set `ANTHROPIC_API_KEY`, `python run.py`)
- `agentaz.json` / `agentaz.schema.json` — AgentAz™ governance spec + schema

## Implementation notes

- Enforce the auto-approval cap and receipt requirements in a deterministic gate; the model audits, the gate controls what can be approved without a human.
- Cite the specific policy rule on every flag. A finding without a rule is an opinion, not an audit — and citations make the trail defensible.
- Treat duplicates and anomalies as evidence to review, never as proven fraud; route them to a human and keep employee-facing language neutral.
- Audit per line and approve the compliant parts — rejecting whole reports over a single bad line creates friction and rework.
- Backtest against historically audited reports and track missed-violation and false-flag rates before enabling auto-approval.
- Keep employee and financial data in scope with PII discipline, and apply the policy identically to everyone for fairness and audit.
- Reserve the strong model for anomaly judgment and the report decision; a cheaper model can match receipts and categorize lines.

## Variations

- **Basic — Audit & flag assistant:** Audits each line against policy, verifies receipts, and returns flagged items with the cited rule and a recommendation for a reviewer. No auto-approval.
- **Advanced — Guarded auto-approval:** Auto-approves clean reports within the cap, holds specific non-compliant lines, runs duplicate/anomaly detection, and escalates fraud signals and over-cap totals.
- **Enterprise — Governed spend audit:** Adds multi-policy support, ERP/AP integration, full audit trails and SLAs, fraud-pattern analytics across employees, and check tuning from reviewer outcomes.

## FAQ

**Will it approve expenses automatically?**

Only when every line is within policy, required receipts are present, and the total is within your configured cap. Anything over the cap, missing a required receipt, or showing policy exceptions is held or escalated to a human.

**How does it decide what violates policy?**

It audits each line against your structured written policy and cites the specific rule on every flag. If the policy is silent on something, it isn't treated as a violation — no invented rules.

**Does it accuse employees of fraud?**

No. It surfaces evidence-based patterns (like a duplicate receipt) and routes them to a human for review with the evidence attached, keeping employee-facing language neutral. It never asserts intent or wrongdoing.

**What happens to a report with one bad line?**

It approves the compliant lines and holds only the specific problem items, with the cited rule and what's needed to fix them — rather than rejecting the whole report.

**How does it catch duplicates?**

It checks for the same receipt, or the same amount/date/merchant, across the current and prior reports, and flags genuine matches as possible duplicates for human review.

**How do we roll it out safely?**

Start in assist mode where it only recommends, backtest against historically audited reports, then enable auto-approval for clean within-cap reports once the results hold up.


---

© 2026 AgentKits · www.agent-kits.com

**Open source.** Code, configuration, and the AgentAz™ schema are licensed under
**Apache-2.0**; specification text and documentation under **CC BY 4.0** (with
attribution to AgentKits, link to https://www.agent-kits.com). See LICENSE, LICENSE-CONTENT,
and NOTICE in this bundle. "AgentAz" and "AgentKits" are trademarks of AgentKits.

**Flagship reference blueprint.** View the source, AgentAz™ spec, and frozen v1.0 schema
in the public registry: https://github.com/agent-kits/agentaz
Original: https://agent-kits.com/kit/expense-report-auditor
