AI Customer Support · E-commerce Refunds

Refund Decisions
in Seconds.

An autonomous LangGraph agent that verifies customers, validates orders, applies your refund policy, and resolves support cases end-to-end — without a human in the loop.

Real-time streamingPolicy-groundedFull audit trail
01Why

The Support Problem Worth Solving

Traditional e-commerce support is slow, manual, and inconsistent. The cost is measured in churned customers and agent burnout — not just ticket volume.

Hours, Not Seconds

Customers wait 24–48 hours for refund decisions that a policy-aware agent can make in under 10 seconds. Every hour of delay is a loyalty risk.

Manual Policy Hunting

Support agents spend more time digging through policy documents than helping customers. Queues pile up while the answer is buried in a PDF.

Inconsistent Rulings

Identical refund cases get different outcomes depending on which agent handles them. Inconsistency erodes trust and opens legal risk.

02How

An Agent Loop That Thinks Before It Acts

Built on LangGraph, the agent iterates through a tool-calling loop — each step grounded in real data — until it reaches a policy-backed decision.

1
Natural Language Intakeconversation

The customer describes their situation in plain language — no forms, no ticket IDs required to start.

2
Identity Verificationlookup_customer

The agent calls lookup_customer to verify the account, tier, and history before any decision is made.

3
Order Validationlookup_order

Order ownership is confirmed. The agent checks delivery date, product category, and sale status.

4
Policy Evaluationcheck_refund_policy

Every applicable rule is evaluated — no hallucination, no shortcuts. The policy document is the ground truth.

5
Decision & Resolutionprocess_refund / deny_refund

The agent approves or denies with a refund ID or a rule-cited reason, completing the case end-to-end.

Architecture: FastAPI (SSE) → LangGraph StateGraph → ChatOpenAI (gpt-4o-mini) tool-calling loop → tool execution → state update → next iteration or END node → WebSocket broadcast to Admin.

03What

What's Built Inside

Every layer — from the agent loop to the admin dashboard to the Docker production setup — is built for real-world use, not just demos.

Real-Time Streaming

Token-by-token SSE streaming keeps the UI responsive. No loading spinners — you see the agent think.

Policy-Grounded Decisions

Rules live in a Markdown document. The agent reads and cites them. Zero hallucination on eligibility.

Full Audit Trail

Every tool call, input, and output is logged per session and visible live in the Admin dashboard.

Voice I/O

ElevenLabs STT transcribes speech to text (with smart ID normalization) and TTS reads responses aloud.

Live Admin Monitoring

WebSocket-powered dashboard shows sessions, reasoning steps, and refund decisions as they happen.

Production-Ready Stack

Multi-stage Docker builds, nginx reverse proxy, non-root containers, health checks, SSE + WS support.

Tech Stack

Python 3.12FastAPILangGraphGPT-4o-miniNext.js 15TypeScriptTailwind CSSDockernginxElevenLabs

Live Demo

See It Decide in Real Time

Tell the agent your Customer ID and Order ID. Watch it look up your account, check the order, apply the policy, and issue a decision — all in a single conversation.

Try: Customer ID CUST001 · Order ID ORD1017

AI Customer Support Agent · LangGraph + GPT-4o-mini