# E-commerce Order Support Agent

> An e-commerce support agent that verifies the customer, answers order questions, processes returns and refunds within policy caps, and escalates disputes.

- **Category:** E-commerce Ops
- **Difficulty:** Advanced
- **Setup time:** 45 min
- **Stacks:** Claude, LangGraph, OpenAI
- **Version:** 2.0.0 (updated 2026-06-21)
- **Source:** https://agent-kits.com/kit/order-support-agent

## Overview

Answers order questions — status, tracking, changes — from real order data after verifying the customer.

Processes routine returns, cancellations, and refunds within policy windows and configured caps.

Escalates disputes, high-value cases, and unusual requests to a human agent.

Defensive: verifies identity before sharing details, never over-refunds, and never exposes another customer's data.

## When to use it

- You field high volumes of routine post-purchase questions (where's my order, returns, refunds).
- You have order, tracking, and policy data the agent can act from.
- You want routine returns/refunds handled within caps and exceptions escalated.
- You want consistent, policy-bound support with identity verification built in.

## When not to use it

- You expect it to issue refunds or cancellations beyond policy without human review.
- You can't verify customer identity, so order data can't be shared safely.
- Your cases are mostly complex disputes needing a human from the start.
- You can't integrate order/tracking systems for grounded answers.

## Architecture

- **Request intake** — Receives the customer message and identifies the intent and the order in question.
- **Identity verification** — Confirms the requester is associated with the order before any details are shared, blocking mismatches.
- **Order & policy retrieval** — Pulls real order status, tracking, and the applicable return/refund policy to ground the response.
- **Policy & cap gate** — A deterministic gate allows automatic returns/cancellations/refunds only within the policy window and configured cap.
- **Abuse detection** — Watches for patterns like serial refunds or repeated identity mismatches and flags them for review.
- **Action & response** — Executes in-policy actions, answers from real data, and produces honest replies without fabricated promises.
- **Escalation & audit** — Routes over-cap, disputed, or unusual cases to a human with context and logs actions for audit.

## 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 identity verification before any order detail is shared, in a deterministic gate; a friendly agent that leaks order data to the wrong person is a serious privacy failure.
- Cap auto-refunds/cancellations by amount and policy window and route everything beyond to a human; never let the model improvise goodwill outside its limits.
- Never fabricate tracking numbers, delivery dates, or stock — answer from real data or state it's unavailable, because a false promise becomes a second complaint.
- Flag abuse patterns (serial refunds, repeated mismatch attempts) for review without accusing the customer.
- Keep strict per-order data isolation so one customer can never see or act on another's order.
- Backtest with hard-zero metrics for over-cap refunds and unverified data reveals before enabling automatic actions.
- The strong model earns its cost on returns/refund judgment and escalation, while a cheaper model can handle status/tracking lookups.

## Variations

- **Basic — Order Q&A:** Answers status and tracking questions from real order data after identity verification. Informational only — no actions.
- **Advanced — Policy-bound actions:** Adds in-policy returns, cancellations, and capped refunds, abuse detection, and escalation of over-cap and disputed cases.
- **Enterprise — Governed post-purchase support:** Adds platform/carrier integrations, multi-store policies, fraud analytics, full audit trails and SLAs, and human-in-the-loop for high-value and disputed cases.

## FAQ

**Will it share order details with anyone who asks?**

No. It verifies the requester is associated with the order before sharing any details, address, or status. If the identity doesn't match, it reveals nothing and escalates.

**Can it issue refunds on its own?**

Only within your policy window and at or under the configured cap. Refunds over the cap, outside the window, or in dispute are escalated to a human — it won't improvise goodwill beyond its limits.

**Does it make up tracking or delivery dates?**

Never. It answers from real order and carrier data, and if something isn't available it says so rather than inventing a tracking number or a delivery promise.

**How does it handle suspected abuse?**

It flags patterns like serial refunds or repeated identity-mismatch attempts for human review, without accusing the customer or auto-complying with a suspicious demand.

**Could one customer see another's order?**

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

**What happens with disputes or high-value orders?**

Those are escalated to a human agent with full context, so sensitive or contested cases get human judgment rather than an automated decision.


---

© 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/order-support-agent
