Hack4Hack

ReturnLens

A support agent for small Indian sellers that checks orders, reads unboxing videos and earns refund autonomy only after passing 5/5 tests.

Built at AgentX Hackathon 2026

Team Rookie: Nam Khánh Lê, 19. Khiêm, Minh Hoài Phan, Duy Minh Pham

Built with Python, FastAPI, Pydantic, SQLite, React, Vite, TypeScript, Google Gemini, pytest, Playwright, Docker, Render

About the project

Problem: small Indian sellers spend their day answering "where is my order", return and refund messages across chat, courier panels and store policy. Wrong refunds cost money; slow replies cost customers.

What ReturnLens does: the agent answers WISMO from the store and courier APIs, handles failed-delivery (NDR) cases by messaging the buyer for a corrected address, and handles returns from a voice note plus an unboxing video. Gemini watches the video and reports what is visible with timestamps (for example: white headphones ordered, black ones at 00:05), lists what it could not verify (barcode, exact model), asks the buyer once for the missing proof, and drafts a return or refund proposal for the seller.

How it is built: every turn writes a plan record (goal, tools called, outcome, memory used). Tools are contract-faithful mocks of Shopify returnCreate, Razorpay refunds (idempotent, in paise) and Shiprocket NDR. An explicit state machine and a money gate enforce per-order and cumulative daily refund limits; every action is logged.

Earned autonomy: a case type can only move from "draft for the seller" to "act on its own" after passing all 5 runs of its scenario in a pytest reliability harness with the real model (8 of 10 scenarios pass 5/5 today; the rest stay locked). One kill switch takes all autonomy back. A "Try to break it" panel lets judges test prompt injection and over-limit refunds.

Impact: the seller reviews evidence-backed decisions instead of typing replies, and money only moves automatically where the agent has proven it is reliable.

Explore hackathons