# Refund & Returns Resolution Agent

> A refund and returns agent that checks eligibility against policy, approves within caps, detects abuse, and escalates out-of-policy and disputed cases to humans.

- **Category:** Support & Triage
- **Difficulty:** Advanced
- **Setup time:** 45 min
- **Stacks:** Claude, LangGraph, OpenAI
- **Version:** 2.0.0 (updated 2026-06-21)
- **Source:** https://agent-kits.com/kit/refund-returns-resolver

## Overview

Resolves refund and return requests by checking eligibility against your policy.

Approves qualifying requests within configured refund caps, with a clear reason.

Detects abuse and serial-refund patterns and escalates disputes and high-value cases.

Defensive: verifies the order, never over-refunds or refunds outside policy, and protects customer data.

## When to use it

- You handle a high volume of refund/return requests against a clear policy.
- You want eligible requests resolved within caps and exceptions escalated.
- You want abuse and fraud patterns flagged automatically.
- You want consistent, policy-bound decisions with reasons.

## When not to use it

- You want refunds approved beyond policy or cap without review — it won't.
- You can't verify order ownership, so refunds can't be issued safely.
- You have no refund/return policy to apply.
- Your cases are mostly complex disputes needing a human from the start.

## Architecture

- **Request intake** — Receives the refund/return request and identifies the order in question.
- **Ownership verification** — Confirms the requester owns the order before any detail is shared or action taken.
- **Policy & eligibility engine** — Checks return window, item condition, proof, and refund method against the policy.
- **Cap gate** — A deterministic gate auto-approves only within the policy and the configured refund cap.
- **Abuse detection** — Watches for serial refunds, identity mismatch, and chargeback pressure, flagging them for review.
- **Decision & reply** — Approves, denies with a policy reason and alternative, or escalates, with an honest customer reply.
- **Escalation & audit** — Routes over-cap, out-of-policy, disputed, or abusive cases to a human and logs every decision.

## 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

- Verify order ownership before any refund action or detail disclosure; an unverified refund is both a fraud and a data-leak risk.
- Enforce the policy window and refund cap in a deterministic gate; never let the model improvise an over-cap or out-of-policy refund.
- Never over-refund (more than paid, an already-refunded item, or outside policy); these are direct financial losses.
- Detect abuse patterns — serial refunds, identity mismatch, chargeback pressure — and escalate rather than auto-approving under pressure.
- Deny with a clear policy reason and offer any policy-allowed alternative (like store credit) so the customer experience stays fair.
- Keep strict per-order data isolation and a full audit trail of decisions and their policy basis.
- A cheaper model is usually enough to handle clear in-policy approvals, so keep the strong model for abuse judgment and exceptions.

## Variations

- **Basic — Eligibility checker:** Checks a refund/return request against policy and approves clear in-cap cases. Verification required.
- **Advanced — Policy-bound resolution:** Adds ownership verification, cap gating, abuse detection, denial-with-alternative, and escalation of exceptions.
- **Enterprise — Returns operations:** Adds platform/payment integration, multi-policy support, fraud analytics, audit trails, and human-in-the-loop for disputes and high-value cases.

## FAQ

**Will it refund more than policy allows?**

No. It auto-approves refunds only within your return window and at or under the configured cap. Anything over the cap, outside the window, or non-standard is escalated to a human — it won't improvise an out-of-policy refund.

**How does it prevent fraud?**

It verifies the requester owns the order before acting, and flags abuse patterns like serial refunds, identity mismatches, and 'refund or I'll chargeback' pressure, escalating them instead of auto-approving under pressure.

**What happens with an out-of-window request?**

It explains the policy honestly, declines the automatic refund, and offers any policy-allowed alternative (such as store credit) or escalates to a specialist who can consider an exception — rather than quietly bending the rules.

**Could it expose another customer's order?**

No. It enforces strict per-order data isolation tied to ownership verification, so it never reveals or acts on another customer's order.

**Does it explain its decisions?**

Yes. Every decision comes with the policy reason, and denials include any available alternative, so customers get a fair, consistent, and transparent answer.

**Is there an audit trail?**

Yes. Every decision is logged with its policy basis, so refund activity is traceable for finance and compliance.


---

© 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/refund-returns-resolver
