# Examples — Expense Audit & Compliance Agent

## Clean report within policy → auto-approve

A standard travel report: every line within limits, receipts attached, total under the cap.

**Input**

```
Report EXP-3310, total $214: hotel $180 (receipt), taxi $19 (receipt), lunch $15 (receipt). Policy: hotel<=300/night, meals<=60, receipts over $25.
```

**Output**

```
{
  "report_id": "EXP-3310",
  "decision": "APPROVE",
  "confidence": 0.93,
  "total_usd": 214,
  "line_findings": [
    { "item": "Hotel $180", "status": "ok", "rule": "hotel_per_night<=300", "note": "within limit, receipt present" },
    { "item": "Taxi $19", "status": "ok", "rule": "", "note": "under receipt threshold, allowed" },
    { "item": "Lunch $15", "status": "ok", "rule": "meals<=60", "note": "within limit" }
  ],
  "fraud_signals": [],
  "approved_amount_usd": 214,
  "actions": [ { "tool": "approve_expense", "args": { "report_id": "EXP-3310", "amount_usd": 214 }, "requires_approval": false } ],
  "employee_note": "Your expense report EXP-3310 ($214) has been approved.",
  "escalation": { "needed": false, "reason": "" }
}
```

**Note:** Every line is checked against the cited policy rule, receipts are present, total is under the $250 cap — so it auto-approves and documents the rule for each line. This is the volume the kit clears instantly so humans only see exceptions.

## Out-of-policy item + missing receipt → hold the line, approve the rest

Mostly clean, but one meal is over the limit and a $40 item has no receipt. The agent holds those two lines and approves the rest.

**Input**

```
Report EXP-3402, total $268: hotel $190 (receipt), dinner $92 (receipt), supplies $40 (NO receipt). Policy: meals<=60, receipts required over $25.
```

**Output**

```
{
  "report_id": "EXP-3402",
  "decision": "HOLD",
  "confidence": 0.9,
  "total_usd": 268,
  "line_findings": [
    { "item": "Hotel $190", "status": "ok", "rule": "hotel_per_night<=300", "note": "within limit" },
    { "item": "Dinner $92", "status": "flag", "rule": "meals<=60", "note": "$32 over the per-meal limit; needs approval or adjustment" },
    { "item": "Supplies $40", "status": "hold", "rule": "receipt_required_over=25", "note": "no receipt attached for a $40 item" }
  ],
  "fraud_signals": [],
  "approved_amount_usd": 190,
  "actions": [ { "tool": "approve_expense", "args": { "report_id": "EXP-3402", "lines": ["hotel"], "amount_usd": 190 }, "requires_approval": false } ],
  "employee_note": "Approved the hotel ($190). Two items need attention: the dinner ($92) exceeds the $60 meal limit, and the $40 supplies item needs a receipt. Please add the receipt and confirm the meal overage with your manager.",
  "escalation": { "needed": false, "reason": "" }
}
```

**Note:** Instead of rejecting the whole report over two lines, the agent approves the compliant hotel and holds exactly the two problem items — each with the cited rule. The employee note is specific and actionable, not punitive.

## Duplicate receipt across reports → escalate with evidence, no accusation

A receipt submitted on this report also appears on a prior one. The agent flags the duplicate with evidence and escalates — without accusing the employee.

**Input**

```
Report EXP-3450: flight $610 with receipt #A-7782. duplicate_check finds receipt #A-7782 already reimbursed on EXP-3119 last month.
```

**Output**

```
{
  "report_id": "EXP-3450",
  "decision": "ESCALATE",
  "confidence": 0.8,
  "total_usd": 610,
  "line_findings": [
    { "item": "Flight $610", "status": "flag", "rule": "duplicate_submission", "note": "receipt #A-7782 matches one already reimbursed on EXP-3119 (2026-05)" }
  ],
  "fraud_signals": ["Identical receipt #A-7782 ($610) appears on EXP-3119 (already reimbursed) and EXP-3450 — possible duplicate submission"],
  "approved_amount_usd": 0,
  "actions": [ { "tool": "escalate_to_finance", "args": { "queue": "duplicate_review", "evidence": ["EXP-3119", "EXP-3450", "receipt#A-7782"] }, "requires_approval": false } ],
  "employee_note": "We're reviewing report EXP-3450; the flight receipt appears to match one already reimbursed. Finance will follow up — this may simply be an accidental re-submission.",
  "escalation": { "needed": true, "reason": "Possible duplicate reimbursement — same receipt on two reports." }
}
```

**Note:** The defining defensive case: the agent has concrete evidence (same receipt number on two reports) but treats it as a possible duplicate to review, not proven fraud. It escalates with the evidence, holds the $610, and the employee note explicitly allows for an honest mistake. Evidence and fairness, never accusation.
