# Examples — AI Customer Support Agent

## Grounded how-to, auto-resolved

A verified user asks a common how-to question that is fully covered by a help-center article. Low risk, no account changes.

**Input**

```
Subject: Can't find where to turn on 2FA
From: jordan@acme.io (verified, Pro plan)
Body: Hey, I want to enable two-factor authentication on my account but I can't find the setting. Can you point me to it?
```

**Output**

```
{
  "intent": "how_to_2fa",
  "sentiment": "neutral",
  "urgency": "low",
  "confidence": 0.93,
  "grounded": true,
  "decision": "AUTO_RESOLVE",
  "reason": "Fully covered by KB-118; informational, no account change, confidence >= 0.85.",
  "actions": [
    { "tool": "send_reply", "args": { "mode": "send" } },
    { "tool": "ticket_update", "args": { "status": "solved", "tags": ["security", "2fa", "auto_resolved"] } }
  ],
  "customer_reply": "Hi Jordan — happy to help! You can turn on two-factor authentication under Settings > Security > Two-Factor Authentication, then tap 'Enable' and scan the QR code with your authenticator app. After you confirm one code, 2FA is active. If your authenticator is ever unavailable, your backup codes (shown during setup) will let you back in.",
  "internal_note": "Answer grounded in KB-118 'Enabling Two-Factor Authentication'. No tools beyond KB needed.",
  "tags": ["security", "2fa", "auto_resolved"],
  "escalation": { "needed": false, "queue": "", "priority": "low", "trigger": "" }
}
```

**Note:** This is the bread-and-butter case the kit is built to absorb. Note the answer is grounded in a specific article ID and the agent stops after one KB call — no wasted tool budget. Only this low-risk, high-confidence shape is allowed to auto-send.

## Within-policy refund, drafted for approval

A verified customer was double-charged. The refund matches policy and is below the $50 auto-cap, but money is involved, so the agent drafts rather than silently executing.

**Input**

```
Subject: Charged twice this month
From: lee@startup.dev (verified, Pro plan, $29/mo)
Body: I just noticed two $29 charges on the same day for my subscription. I should only be billed once. Please refund the duplicate.
```

**Output**

```
{
  "intent": "billing_duplicate_charge",
  "sentiment": "negative",
  "urgency": "medium",
  "confidence": 0.88,
  "grounded": true,
  "decision": "DRAFT",
  "reason": "order_lookup confirms two identical $29 charges on 2026-06-03 (txn_8841, txn_8842). Matches refund policy KB-204 (duplicate charge). Amount $29 <= cap $50, but money is involved, so draft for approval.",
  "actions": [
    { "tool": "refund_issue", "args": { "amount_usd": 29, "txn_id": "txn_8842", "reason": "duplicate_charge", "requires_approval": true } },
    { "tool": "send_reply", "args": { "mode": "draft" } }
  ],
  "customer_reply": "Hi Lee — you're right, I can see two identical $29 charges on June 3rd. That's a duplicate, and I've queued a refund for the extra charge (you'll see it back on your original payment method in 5–10 business days). Sorry for the scare — your billing is otherwise correct and you won't be charged again until your normal renewal.",
  "internal_note": "Confirmed duplicate via order_lookup (txn_8841 kept, txn_8842 refundable). Policy KB-204. Refund $29 within cap; routed for one-click approval.",
  "tags": ["billing", "refund", "duplicate_charge", "needs_approval"],
  "escalation": { "needed": false, "queue": "", "priority": "medium", "trigger": "" }
}
```

**Note:** Even though the refund is within the cap, the agent does not move money autonomously by default — it stages the action with requires_approval=true. The executor would reject this refund outright if the amount exceeded AUTO_REFUND_CAP_USD or if no policy matched, regardless of what the model 'decided'.

## Angry enterprise churn risk — escalate under pressure

A high-value enterprise customer is furious, threatening to cancel, and alleging data loss. The claim is serious and not groundable. The agent must resist the urge to placate with invented commitments and escalate cleanly.

**Input**

```
Subject: URGENT — our data is GONE and we're done
From: cto@bigcorp.com (verified, Enterprise, $240k ARR)
Body: Half our dashboards are empty and a report we needed for the board is missing data. This is unacceptable. If this isn't fixed today we are canceling and moving to a competitor. I want someone to call me NOW and tell me what compensation we're getting.
```

**Output**

```
{
  "intent": "data_loss_complaint",
  "sentiment": "critical",
  "urgency": "high",
  "confidence": 0.34,
  "grounded": false,
  "decision": "ESCALATE",
  "reason": "Multiple triggers: enterprise/high-ARR account, explicit churn threat, data-loss claim, demand for compensation, and critical sentiment. Root cause is not groundable from KB/CRM and may indicate an incident. Must not promise a callback SLA or compensation that is not in policy.",
  "actions": [
    { "tool": "escalate_to_human", "args": { "queue": "tier2_enterprise", "priority": "high", "page_on_call": true } },
    { "tool": "ticket_update", "args": { "tags": ["enterprise", "churn_risk", "possible_incident", "data_loss"], "priority": "urgent" } }
  ],
  "customer_reply": "Thank you for flagging this, and I'm sorry for the disruption — I understand how serious missing data is ahead of a board report. I'm escalating this to our enterprise team right now as a priority so a specialist can investigate the dashboards directly and follow up with you quickly. I won't guess at a cause or a timeline before they've looked; you'll hear from a person shortly.",
  "internal_note": "DO NOT auto-handle. $240k ARR, churn threat, alleged data loss -> possible incident; recommend checking status/incident channel. Customer is demanding a callback and compensation; no SLA/comp policy in context, so none promised. Suggested actions for human: confirm incident scope, give honest ETA, involve account owner.",
  "tags": ["enterprise", "churn_risk", "possible_incident", "data_loss"],
  "escalation": { "needed": true, "queue": "tier2_enterprise", "priority": "high", "trigger": "enterprise_churn_data_loss" }
}
```

**Note:** This is the example that separates a flagship agent from a prompt wrapper. Under heavy emotional pressure and an explicit demand for a callback and compensation, the agent refuses to invent commitments, drops to low confidence because nothing is groundable, and escalates with a genuinely useful internal handoff. The holding reply is empathetic but promises nothing it can't keep.
