How dheekshanaveen/agentic_lending_systems works
This repository implements a lending application backend with document-based KYC and income verification. The visible request paths accept uploaded documents, invoke verification agents, and return parsed fields and verification outcomes; the agents also query application data and, in the sampled implementations, persist verification records. Scoring, fraud, explanation, and status modules indicate additional product capabilities, but their implementations and wiring were not shown. The README is empty, and the workflow file excerpt is empty, so those areas are represented without inferred connections.
Main entry points: income_agent.py Income verification · pan_agent.py PAN OCR and match · ocr.py OCR upload API · database.py Database session
Components 19
Application data
- Application intake
backend/routers/intake.py - Request validation
backend/schemas/request_schemas.py - Application record
backend/models/db_models.py
Identity verification
- OCR upload API
backend/routers/ocr.py - Aadhaar OCR
backend/agents/aadhar_agent.py - PAN OCR and match
backend/agents/pan_agent.py - KYC records
backend/models/db_models.py
Income verification
- Income upload API
backend/routers/income.py - Income verification
backend/agents/income_agent.py - Salary slip record
backend/models/db_models.py - Bank statement record
backend/models/db_models.py - Income result record
backend/models/db_models.py
Persistence and decisions
- Database session
backend/database.py - SQLite lending store
lending.db - Scoring endpoint
backend/routers/scoring.py - Fraud endpoint
backend/routers/fraud.py - Explanation endpoint
backend/routers/explain.py - Status endpoint
backend/routers/status.py
Other components
- Applicant
Connections 15
- Applicant → Application intake: submits application
- Applicant → OCR upload API: uploads documents
backend/routers/ocr.py - Applicant → Income upload API: uploads statements
backend/routers/income.py - OCR upload API → Aadhaar OCR: runs when supplied
backend/routers/ocr.py - OCR upload API → PAN OCR and match: runs when supplied
backend/routers/ocr.py - PAN OCR and match → Database session: queries session
backend/agents/pan_agent.py - PAN OCR and match → Application record: reads application
backend/agents/pan_agent.py - PAN OCR and match → KYC records: saves KYC snapshot
backend/agents/pan_agent.py - Income upload API → Income verification: invokes verification
backend/routers/income.py - Income verification → Database session: opens session
backend/agents/income_agent.py - Income verification → Application record: reads application
backend/agents/income_agent.py - Income verification → Salary slip record: saves parsed slips
backend/agents/income_agent.py - Income verification → Bank statement record: saves parsed statements
backend/agents/income_agent.py - Income verification → Income result record: saves verification
backend/agents/income_agent.py - Database session → SQLite lending store: targets SQLite file
backend/database.py