Agentic AI for Financial Governance & Compliance
Multi-agent reasoning with real-time regulatory intelligence for financial institutions
FinRegent is an enterprise-grade AI compliance platform that transforms how financial institutions manage regulatory requirements. Built on an Agentic RAG Framework, it provides autonomous reasoning capabilities to help compliance teams navigate complex regulations from RBI, SEBI, and other regulatory bodies with confidence and transparency.
FinRegent is an enterprise-grade AI compliance platform that transforms how financial institutions manage regulatory requirements. Built on an Agentic RAG Framework, it provides autonomous reasoning capabilities to help compliance teams navigate complex regulations from RBI, SEBI, and other regulatory bodies with confidence and transparency.
Financial compliance is complex, time-consuming, and constantly evolving. FinRegent simplifies this challenge by:
- Understanding Context: Ask questions in natural language and receive precise, contextual answers backed by regulatory sources
- Autonomous Reasoning: Multi-agent system that can analyze, cross-reference, and provide explainable compliance guidance
- Real-time Intelligence: Automatic monitoring and integration of regulatory updates from multiple sources
- Unified Knowledge: Seamlessly combines RBI guidelines, SEBI requirements, and internal policies in one intelligent system
Natural language chat interface powered by Lyzr AI agents trained on financial regulations. Get instant answers to compliance questions with:
- Contextual Understanding: Multi-turn conversations that maintain context across sessions
- Source Attribution: Every response includes citations and confidence scores
- Voice Interaction: Hands-free compliance queries with voice input/output
- Streaming Responses: Real-time answer generation with rich markdown formatting
Centralized knowledge base for all regulatory documents:
- Auto-Classification: Automatic categorization by source (RBI, SEBI, Internal) and category
- Smart Search: Tag-based filtering and full-text search across all documents
- AI Processing: Automated summarization and key point extraction
- Version Control: Track document changes and maintain compliance history
Stay current with evolving regulations:
- Scheduled Monitoring: Automated bi-weekly checks for regulatory updates
- Link Extraction: AI agent extracts relevant links from regulatory websites
- Knowledge Base Training: Automatically trains RAG system with new information
- Email Notifications: Get notified when your knowledge base is updated
Built with security and compliance in mind:
- Clerk Authentication: Enterprise-grade SSO and user management
- API Signature Verification: Cryptographic signatures for all API requests
- Webhook Integration: Real-time user synchronization with audit trails
- Role-Based Access: Granular permission controls (coming soon)
Beautiful, responsive interface that works everywhere:
- Dark Mode Support: Full theme customization with persistent preferences
- Responsive Design: Optimized for desktop, tablet, and mobile
- Accessibility First: WCAG 2.1 compliant UI components
- Real-time Updates: Live activity tracking with visual timeline
- Node.js 18.x or higher
- MongoDB database (local or MongoDB Atlas)
- Clerk account for authentication
- Lyzr AI account and API credentials
- Clone the repository:
git clone https://github.com/AJAmit17/NH-SJC25HACK-GenAI-026-Team-UDAAN.git
cd NH-SJC25HACK-GenAI-026-Team-UDAAN- Install dependencies:
npm install- Configure environment variables:
Create a .env file in the root directory:
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
CLERK_WEBHOOK_SECRET=whsec_...
# Database
DATABASE_URL="mongodb+srv://..."
# Lyzr AI
LYZR_API_KEY=sk-default-...
LYZR_AGENT_ID=...
LYZR_RAG_ID=...
LYZR_UPDATES_AGENT_ID=...
LYZR_LINK_EXTRACTION_AGENT_ID=...
LYZR_AUTO_RAG_ID=...
# Security
API_SIGNATURE_SECRET=your_random_secret_min_32_chars
# Inngest (for scheduled jobs)
INNGEST_SIGNING_KEY=...
INNGEST_EVENT_KEY=...
# Email Notifications
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_SECURE=false
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-app-password- Initialize the database:
npx prisma generate
npx prisma db push- Start the development server:
npm run devVisit http://localhost:3000 to see your application.
- Client Layer: Next.js UI with Clerk-secured access.
- Services Layer: Lyzr agents, Prisma API, and signature verification.
- Data & Jobs: MongoDB storage plus Inngest-driven regulatory updates.
| Category | Technologies |
|---|---|
| Framework | Next.js 15 (App Router), React 19 |
| Language | TypeScript |
| Database | MongoDB + Prisma ORM |
| Authentication | Clerk |
| AI/ML | Lyzr AI Agents |
| Styling | Tailwind CSS, Shadcn UI |
| State Management | TanStack Query (React Query) |
| Background Jobs | Inngest |
| Nodemailer | |
| Real-time | Server-Sent Events (SSE) |
FinRegent uses a specialized multi-agent architecture:
- Chat Agent: Main conversational interface for compliance queries
- Link Extraction Agent: Automatically discovers relevant regulatory documents
- Updates Agent: Monitors and processes regulatory changes
- RAG Agent: Retrieves and augments responses with knowledge base context
All API requests use cryptographic signature verification:
// Client generates signature
const signature = await generateSignatureAction(JSON.stringify(payload));
// Server verifies signature
const isValid = verifyApiSignature(payload, signature);This ensures request integrity and prevents unauthorized API access.
User Enables Cron Job
↓
Inngest Scheduled Function (Every 2 weeks)
↓
Link Extraction Agent → Discovers new regulatory documents
↓
RAG Agent → Trains knowledge base with new content
↓
Email Notification → User receives update summary
finregent/
├── prisma/
│ └── schema.prisma # Database schema (User, Document, Chat, etc.)
├── src/
│ ├── actions/
│ │ ├── api-key.ts # Server action to fetch API keys
│ │ └── generate-signature.ts # Cryptographic signature generation
│ ├── app/
│ │ ├── (auth)/ # Public authentication routes
│ │ ├── (routes)/ # Protected application routes
│ │ │ ├── workspace/ # Main chat workspace
│ │ │ ├── documents/ # Document management
│ │ │ ├── settings/ # User preferences
│ │ │ └── updates/ # Regulatory updates feed
│ │ └── api/
│ │ ├── lyzr/chat/ # Chat API with signature verification
│ │ ├── users/webhook/ # Clerk user synchronization
│ │ └── inngest/ # Background job endpoints
│ ├── components/
│ │ ├── chat.tsx # Main chat interface
│ │ ├── sidebar/ # Navigation components
│ │ ├── shared/ # Reusable components (Timeline, VoiceChat)
│ │ └── ui/ # Shadcn UI library (50+ components)
│ ├── lib/
│ │ ├── lyzrService.ts # Lyzr AI integration
│ │ ├── security.ts # Signature & webhook verification
│ │ ├── prisma.ts # Database client
│ │ ├── email.ts # Email service
│ │ └── inngest/ # Background job definitions
│ └── middleware.ts # Auth & route protection
└── package.json
- Create an application at clerk.com
- Configure sign-in options (Email, Google, etc.)
- Copy API keys to
.env - Add webhook endpoint:
- URL:
https://your-domain.com/api/users/webhook - Events:
user.created,user.updated,user.deleted
- URL:
- Sign up at lyzr.ai
- Create AI agents for:
- Main Chat Agent: Compliance Q&A
- Link Extraction Agent: Document discovery
- Updates Agent: Regulatory monitoring
- RAG Agent: Knowledge base management
- Train agents with your regulatory documents
- Copy agent IDs to
.env
Note
The automated training pipeline requires Inngest for scheduled jobs.
- Create account at inngest.com
- Create a new app and copy keys to
.env - Users can enable/disable automated updates in Settings
- System runs bi-weekly (configurable in
src/lib/inngest/functions.ts)
| Command | Description |
|---|---|
npm run dev |
Start development server with Turbopack |
npm run build |
Build production bundle |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npx prisma studio |
Open database GUI |
npx prisma db push |
Push schema changes to DB |
Send a message to the AI compliance assistant.
Request:
{
"message": "What are the KYC requirements for banks?",
"sessionId": "optional-session-id",
"agentId": "your-agent-id",
"userId": "user-id",
"signature": "generated-signature",
"assets": ["optional-file-ids"]
}Response:
{
"response": "AI response content...",
"session_id": "session-id",
"user_id": "user-id"
}Clerk webhook endpoint for user synchronization.
Events handled:
user.created- Creates user in MongoDBuser.updated- Updates user informationuser.deleted- Removes user and associated data
Upload documents to Lyzr AI for processing.
Request: Multipart form data with files
Response:
{
"assets": [
{
"asset_id": "...",
"filename": "document.pdf"
}
]
}- Push your code to GitHub
- Import repository in Vercel
- Add environment variables
- Deploy
Important
Update Clerk webhook URL to your production domain after deployment.
Ensure all variables are set:
- ✅ Clerk credentials (publishable key, secret, webhook secret)
- ✅ MongoDB connection string
- ✅ All Lyzr AI agent IDs and API key
- ✅ API signature secret (min 32 characters)
- ✅ Inngest keys (for automated updates)
- ✅ Email configuration (for notifications)
Database Connection Issues
- Verify MongoDB connection string format
- Check IP whitelist in MongoDB Atlas
- Ensure database user has read/write permissions
- Run
npx prisma generateto regenerate client
Authentication Errors
- Verify Clerk API keys in
.env - Check that redirect URLs match your domain
- Ensure webhook endpoint is accessible
- Clear browser cookies and localStorage
AI Not Responding
- Verify Lyzr API key and agent IDs
- Check that agents are properly trained
- Review browser network tab for API errors
- Ensure signature generation is working (check console)
Build Errors
- Delete
.nextfolder andnode_modules - Run
npm installfresh - Check for TypeScript errors with
npm run lint - Ensure all environment variables are set
- Next.js Documentation
- Clerk Documentation
- Lyzr AI Documentation
- Prisma Documentation
- Shadcn UI Components
- RBI Regulatory Guidelines
- SEBI Regulations
Built with ❤️ by Team UDAAN
