Skip to content

orbaps/complain-agent-fintech

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AegisAI: Autonomous FinTech Support System

AegisAI is an advanced, autonomous customer support agent designed for the FinTech sector. It goes beyond simple chatbots by implementing a Hybrid Decision Engine that combines deterministic banking rules with LLM-powered communication.

Core Capabilities

1. Hybrid Decision Engine

AegisAI uses a dual-layer approach to ensure 100% compliance while maintaining a natural user experience:

  • Layer 1 (The Judge): A deterministic logic layer that classifies issues based on a strict taxonomy (16 Categories, 30+ Subcategories). It enforces hard rules for Risk, SLA, and Priority.
  • Layer 2 (The Diplomat): An LLM layer (Gemini) that polishes the output into empathetic, professional responses, without hallucinating policies or fees.

2. Intelligent Routing & Scoring

The system doesn't just "ticket" issues; it intelligently routes them:

  • Priority Upgrade: Automatically elevates queries containing regulatory triggers (e.g., "Ombudsman", "RBI", "Court", "Fraud > 50k") to P0 (Critical).
  • Agent Match Scoring: Assigns the ticket to the best available human agent based on:
    • Skills Match: +10 Score (e.g., "Fraud Analysis").
    • Seniority Bonus: +20 Score for High Priority tickets (Senior Agents only).
    • Load Balancing: Penalizes agents with high workloads.

3. Comprehensive Knowledge Base

The system is built on a massive, rule-based taxonomy including:

  • Transaction Failures: Auto-reversal logic and compensation rules.
  • Fraud Management: Immediate block and freeze protocols.
  • International Usage: Forex markup transparency and enablement steps.
  • Regulatory Complaints: Immediate Legal/Compliance escalation.

4. Interactive Session Flow

  • Linear State Machine: Input -> Validation -> Decision -> Follow-up -> Feedback.
  • Feedback Loop: Collects CSAT ratings (1-5) at the end of every session.

Project Structure

AegisAI/
├── data/
│   ├── knowledge_base.json   # 500+ line taxonomy of rules, SLAs, and risks
│   └── agents.json           # Database of agents, skills, and loads
├── src/
│   ├── main.py               # Orchestrator & Session State Machine
│   ├── decision_engine.py    # Deterministic Logic (Priority, Routing, Risk)
│   ├── assignment_engine.py  # Agent Scoring Algorithm
│   ├── llm_gateway.py        # Safe Interface for Gemini API
│   └── state_machine.py      # Session State definitions
├── tools/
│   └── build_kb.py           # Generator script for the Knowledge Base
└── run_demo.py               # Interactive CLI Simulator

How to Run

  1. Install Dependencies:

    pip install google-generativeai python-dotenv
  2. Environment Setup: Create a .env file with your Gemini API keys:

    GEMINI_API_KEY_1=your_key_here
  3. Run the Simulation:

    python run_demo.py

Cloud Deployment (Vercel)

AegisAI includes a serverless API wrapper (api/index.py) ready for Vercel.

  1. Install Vercel CLI:

    npm install -g vercel
  2. Deploy:

    vercel
  3. API Usage: Post a JSON payload to /process-ticket:

    {
      "name": "Test User",
      "description": "Unauthorized transaction of INR 5000"
    }

Logic Examples

User Input Classification Priority Action
"Money deducted but not credited" TXN_FAILURE P1 (High) Check CBS, Auto-reverse T+1
"I filed a complaint with Ombudsman" REGULATORY P0 (Critical) Escalate to Compliance Head
"Help with international charges" CARD_ISSUE P3 (Normal) Explain Forex Markup (3.5%)

Built for the Future of FinTech Support.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages