Skip to content

Anuja888/Bank_Agent

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

Project: Tata Capital Personal Loan Chatbot

This repository contains a small Next.js app (App Router) that implements a simple chatbot backed by a MySQL database.

Quick setup

  1. Copy .env.local.example to .env.local and fill your MySQL credentials:
MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=bfsi_chat
  1. Create the database and messages table. A database.sql file is included with the schema:
CREATE TABLE IF NOT EXISTS messages (
	id INT AUTO_INCREMENT PRIMARY KEY,
	username VARCHAR(255) NOT NULL,
	content TEXT NOT NULL,
	timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
  1. Install dependencies and run the dev server:
npm install
npm run dev
  1. Open http://localhost:3000 and try the chat UI.

Notes

  • The API route is located at src/app/api/chat/route.ts and saves messages to MySQL.
  • Database helper is src/lib/db.ts which uses mysql2/promise and expects env variables from .env.local.
  • If you need a different DB config (SSL, socket, etc.), update src/lib/db.ts accordingly.

If you run into errors, share the terminal output and I can help debug further.

About

An Agentic AI chatbot with a Master Agent orchestrating specialized Workers using a Smart Rulebook for personalized, persuasive loan processing. It handles user verification, sales negotiation, underwriting, edge cases, and generates sanction letters with transparent, rule-based logic.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages