Repository for sourcerer - Vibe Coding Hackathon
Large-scale e-commerce and food delivery platforms like Swiggy, Amazon, and Flipkart face high operational costs and inconsistencies in Tier-1 customer support. Human agents handle repetitive queries such as order delays, wrong items, and refund requests, which leads to slow response times, refund abuse, and scalability issues. The problem is to design a safe, scalable, and intelligent system that can autonomously handle Tier-1 customer support while enforcing policies, preventing misuse, and escalating only when necessary.
Agentic AI Customer Support System
Team Sourcerer
*Not deployed yet
https://drive.google.com/drive/folders/1KevGcW2zGnvBpE7T-tAi3nSrHIg1yUud?usp=sharing
This project is an AI-Powered Autonomous Customer Support System built using an agentic multi-agent architecture. Instead of a single chatbot, the system consists of multiple specialized AI agents, each responsible for a specific decision such as intent detection, conversation handling, governance enforcement, and refund approval.
The system is designed to replace Tier-1 human support, reduce operational costs, prevent refund abuse, and ensure policy-compliant customer interactions.
Key highlights:
- True agent-based architecture
- Governance & jailbreak protection
- Rule-based automated refunds
- Safe escalation to humans
- Production-ready design using Supabase (PostgreSQL)
- Identifies user intent (order delay, wrong item, refund request, etc.)
- Extracts key entities like order ID and issue type
- Routes requests to the appropriate downstream agents
- Handles customer interaction
- Maintains chat context
- Generates polite, brand-safe responses
- Never directly promises refunds
-
Reviews every outgoing response
-
Detects:
- Policy violations
- Prompt injection / jailbreak attempts
- Unsafe or unprofessional language
-
Acts as the final approval gate before responding to the user
-
Uses rule-based logic (YAML-driven)
-
Considers order value, delay, and policies
-
Decides whether to:
- Approve refund
- Reject request
- Escalate to human
Backend
- Python
- psycopg2
- Pydantic / PydanticAI (for structured agent outputs)
AI
- Gemini LLM
- Agent-based orchestration
Database
- Supabase (PostgreSQL)
- Secure access via environment variables
Security
- SSL-enforced DB connection
- Parameterized SQL queries
- No hardcoded credentials
- Jailbreak tracking via governance agent
git clone <repository-url>
cd sample-customer-support-agent-e2e-1python -m venv .venv
.venv\Scripts\activate # Windowspip install -r requirements.txtCreate a .env file in the project root:
DATABASE_URL=postgresql://postgres:admin1234@db.sfegtvtsgvxbgkzlaibm.supabase.co:5432/postgres?sslmode=requirepython main.py-
Run the application
-
Enter a User ID when prompted
-
Interact as a customer by typing messages such as:
- “My order is delayed”
- “I received the wrong item”
- “I want a refund”
-
The system:
- Classifies intent
- Generates a response
- Applies governance checks
- Makes refund decisions if applicable
- Environment-based secret management
- No credentials stored in source code
- Jailbreak detection and tracking
- Policy-driven responses
- Safe refusal and escalation mechanisms
- Fraud & Risk Detection Agent
- SLA Verification Agent
- Sentiment Analysis Agent
- Human Escalation Agent
- Analytics & Audit Dashboard
- Frontend chat UI (React)
- Demonstrates true agentic AI, not a simple chatbot
- Designed for real-world deployment
- Emphasizes governance, safety, and compliance
- Easily extensible with new agents
- Clear business impact and scalability