An intelligent multi-agent AI system revolutionizing personal loan sales through conversational banking
Built for EY Techathon 6.0 - BFSI Challenge
π Click the thumbnail image to watch video on youtube

- Overview
- Problem Statement
- Solution Architecture
- Agentic AI Workflow
- Key Features
- Tech Stack
- Installation & Setup
- User Journey
- Underwriting Logic
- Test Scenarios
- Project Structure
- Team
- Contact
TIARA (Tata Intelligent Agent for Real-world Agents) is a next-generation conversational AI system that transforms the personal loan sales process. Built on a multi-agent architecture, TIARA orchestrates specialized AI agents to deliver a seamless, human-like loan application experience from initial conversation to sanction letter generation.
EY Techathon 6.0 - BFSI Track: Tata Capital
Tata Capital, a leading NBFC, aims to increase personal loan sales through an AI-driven web chatbot. The challenge requires building an agentic AI solution where a Master Agent coordinates multiple Worker Agents to handle the complete loan journey - from discovery to approval.
Improve personal loan sales success rate through an AI-driven conversational approach that:
- Engages customers landing via digital ads/marketing emails
- Understands customer needs and convinces them to take personal loans
- Completes end-to-end process: verification β underwriting β sanction letter generation
- Master Agent: Orchestrates conversation flow and coordinates worker agents
- Worker Agents:
- Sales Agent: Negotiates terms, discusses amount/tenure/rates
- Verification Agent: Confirms KYC details and document uploads
- Underwriting Agent: Validates eligibility based on credit rules
- Sanction Generator: Creates automated PDF approval letters
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TIARA System β
β (Master Agent Controller) β
β Powered by Google Gemini 2.5 Flash β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββΌβββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β Discovery β β Sales Agent β β Verification β
β & Welcome β β (Negotiation)β β Agent (KYC) β
β (Master) β β β β β
βββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β β β
ββββββββββββββββββΌβββββββββββββββββ
βΌ
ββββββββββββββββββββββββββββββββββ
β Underwriting Agent β
β (Credit Evaluation) β
ββββββββββββββββββ¬ββββββββββββββββ
βΌ
ββββββββββββββββββββββββββββββββββ
β Sanction Letter Generator β
β (PDF Generation - pdf-lib) β
ββββββββββββββββββββββββββββββββββ
- Master Agent greets the customer
- Phone number collection & OTP verification
- Customer profile retrieval from mock CRM
- Master Agent understands loan requirements
- Extracts: Purpose, Amount, Preferred Tenure
- Natural language understanding for amount detection (βΉ3 lakhs, 300000, etc.)
- Sales Agent presents personalized loan offer
- Shows EMI calculations with tenure options (36/48/60 months)
- Handles negotiation and customer objections
- Displays credit score and affordability ratios
- Verification Agent requests KYC documents
- Document upload interface: Aadhaar, PAN, Salary Slip (conditional)
- Real-time upload validation
- Underwriting Agent evaluates eligibility
- Credit score verification (min 700/900)
- Pre-approved limit checks
- EMI-to-salary ratio validation (max 50%)
- Sanction Generator creates PDF offer letter
- Instant download with loan details
- Unique Loan ID generation
- Master Agent seamlessly coordinates 4 specialized worker agents
- Intelligent stage transitions based on conversation context
- Agent handoff notifications for transparency
- Natural language understanding using Google Gemini 2.5 Flash
- Context-aware responses with conversation memory
- Smart amount/tenure extraction from free-form text
Approval Rules:
β Amount β€ Pre-approved Limit β Instant Approval
β Amount β€ 2Γ Limit + Salary Slip β Conditional Approval
β Amount > 2Γ Limit β Rejection
β Credit Score < 700 β Rejection
β EMI > 50% Salary β Rejection- English, Hindi, Odia, Tamil, Malayalam, Marathi, Kannada, Bengali
- Language switcher in chat interface
- PDF generation with loan details
- Downloadable offer letters
- Professional formatting with Tata Capital branding
- Next.js 16 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- Lucide Icons - Modern icon library
- Next.js API Routes - Serverless functions
- OpenRouter API - AI model orchestration
- Google Gemini 2.5 Flash Lite - Conversational AI
- PDFKit - PDF creation library
- Canvas-based rendering for professional documents
- React Hooks (useState, useEffect, useRef)
- localStorage - Session persistence
- Server-side memory store for conversation history
Node.js 18.x or higher
npm or yarn package managergit clone https://github.com/sujit-prog/EY.git
cd EYnpm install
# or
yarn installCreate a .env.local file:
OPENROUTER_API_KEY=your_openrouter_api_key_herenpm run dev
# or
yarn devOpen http://localhost:3000 in your browser.
npm run build
npm start-
Landing
- Customer arrives via marketing campaign
- TIARA welcomes with friendly greeting
-
Authentication
- Phone number input:
9337236782 - OTP verification (any 4-digit code accepted in demo)
- Phone number input:
-
Conversation
User: "I need a loan for education" TIARA: "Great! How much are you looking to borrow?" User: "3 lakhs" TIARA: "Based on your profile, we can offer βΉ3 lakhs at 10.5% p.a..." -
Negotiation
- EMI calculations shown
- Tenure options presented
- Customer can adjust terms
-
Document Upload
- Aadhaar Card β
- PAN Card β
- Salary Slip (if amount > pre-approved limit) β
-
Instant Decision
- Underwriting completes in seconds
- Approval/rejection notification
-
Sanction Letter
- PDF download with full loan details
- Unique Loan ID for reference
| Scenario | Amount | Credit Score | Salary Slip | EMI Ratio | Decision |
|---|---|---|---|---|---|
| Instant | β€ Pre-approved | β₯ 700 | Not Required | β€ 50% | β APPROVED |
| Conditional | β€ 2Γ Limit | β₯ 700 | Required | β€ 50% | β APPROVED |
| High Amount | > 2Γ Limit | Any | Any | Any | β REJECTED |
| Low Credit | Any | < 700 | Any | Any | β REJECTED |
| High EMI | Any | β₯ 700 | Yes | > 50% | β REJECTED |
Customer: Dharmendra Mahanta
Salary: βΉ60,000/month
Pre-approved: βΉ4.5 lakhs
Credit Score: 780/900
Scenario 1: βΉ3 lakhs request
β Within limit β Instant Approval β
Scenario 2: βΉ7 lakhs request
β < 2Γ limit (βΉ9L) β Needs salary slip
β EMI: βΉ16,500 (27.5% of salary) β Approved β
Scenario 3: βΉ10 lakhs request
β > 2Γ limit β Rejected β
| Phone | Name | Salary | Credit | Pre-approved | Scenario |
|---|---|---|---|---|---|
9876543210 |
Rahul Sharma | βΉ75K | 820 | βΉ6L | Instant Approval |
9337236782 |
Dharmendra Mahanta | βΉ60K | 780 | βΉ4.5L | Conditional |
9876543214 |
Vikram Singh | βΉ55K | 650 | βΉ2L | Low Credit Score |
9876543212 |
Amit Patel | βΉ125K | 850 | βΉ10L | Premium Customer |
Flow 1: Instant Approval
Phone: 9876543210
Amount: βΉ4 lakhs
Expected: Approved without salary slip
Flow 2: Salary Slip Required
Phone: 9337236782
Amount: βΉ7 lakhs
Expected: Approved after salary slip upload
Flow 3: Rejection - Amount
Phone: 9876543216
Amount: βΉ10 lakhs
Expected: Rejected (exceeds 2Γ limit)
EY/
βββ app/
β βββ page.tsx # Landing page
β βββ layout.tsx # Root layout
β βββ api/
β β βββ chat/
β β βββ route.ts # Multi-agent orchestration logic
β βββ loan/
β βββ chat/
β βββ page.tsx # Chatbot page route
βββ components/
β βββ chat/
β βββ ChatShell.tsx # Main chat UI component
β βββ MessageBubble.tsx # Individual message rendering
β βββ SuggestionChips.tsx # Message suggestion
β βββ StageIndicator.tsx # Visual stage progress
βββ lib/
β βββ users.ts # Mock CRM data (10 customers)
β βββ prompts.ts # Agent system prompts
β βββ emi.ts # EMI calculation utilities
β βββ pdf.ts # Sanction letter generator
β βββ memory.ts # Session state management
β βββ loanConfig.ts # Interest rates & terms
β βββ openrouter.ts # AI model configuration
βββ public/ # Static assets
βββ .env.local # Environment variables
βββ README.md # This file
Team Name: Veggies
Team Members:
| Avatar | Name | Role | GitHub |
|---|---|---|---|
| Dharmendra Mahanta | Backend Development | @dharmendra-007 | |
| Sujit Kumar Sha | Frontend Development | @sujit-prog | |
| Alpana Mohanty | Agentic AI Backend Development | @Al-Pa-Na | |
| Aditi Panda | Backend,system integration | @aditipanda01 | |
| Prerana Priyadarsini Das | Business Logic & Rule Design | @preranadas03 |
Institution: Veer Surendra Sai University Of Technology, Burla, Sambalpur
Hackathon: EY Techathon 6.0 - BFSI Challenge
- Clear Agent Boundaries: Each agent has a specific, well-defined role
- Master Orchestration: Central controller manages workflow transitions
- Context Preservation: Conversation history maintained across agents
- Error Handling: Graceful degradation when agents fail
- Human-in-the-Loop: User controls pace of conversation
- β Implemented multi-agent orchestration with 4 specialized AIs
- β Built intelligent underwriting with 5+ business rules
- β Created natural language understanding for loan parameters
- β Developed real-time document upload simulation
- β Generated professional PDF sanction letters
- β Achieved sub-2-second response times
| Edge Case | Handling Strategy |
|---|---|
| User uploads wrong document | Re-upload prompt with clear instructions |
| Amount in different formats | Regex patterns for lakhs/L/numbers |
| Tenure not specified | Default to 48 months, allow adjustment |
| Network failure | Error message with retry option |
| Invalid phone number | Validation before OTP generation |
| Borderline credit score | Clear rejection message with reason |
| Multiple loan requests | Session isolation via unique IDs |
- Voice Integration: Speech-to-text for hands-free interaction
- Live Credit Bureau API: Real-time credit score fetching
- Co-applicant Support: Joint loan applications
- EMI Calculator Widget: Interactive affordability tool
- WhatsApp Integration: Loan application via messaging
- Predictive Analytics: ML-based approval likelihood
- Regional Language NLP: Advanced multilingual support
- Video KYC: Live verification for high-value loans
For queries regarding this project:
Email: dev.dharmendra.m@gmail.com
LinkedIn: @dharmendram007
GitHub: @dharmendra-007
Built with β€οΈ for EY Techathon 6.0
Empowering India's Digital Future Through Agentic AI