Gen-AI Developer Classroom notes 18/Jun/2025

CRM – Agent

Notification Agent

  • Send Emails to the students
  • Send Telegram notifications (optional)
  • What is required ?
    • database
    • for sending emails:
      • smtp (gmail)
      • sendgrid (api’s)

Infra Setup steps (Laptop)

  • Lets use a mysql database in docker container
  • This requires docker desktop to be installed on your system
  • Lets create a mysql container
  • bash
docker container run \
    --name studentdb \
    -e MYSQL_ROOT_PASSWORD=rootroot \
    -e MYSQL_USER=ltgenai \
    -e MYSQL_PASSWORD=rootroot \
    -e MYSQL_DATABASE=genaideveloper \
    -p 3306:3306 \
    -d `
    mysql:lts
  • powershell
docker container run `
    --name studentdb `
    -e MYSQL_ROOT_PASSWORD=rootroot `
    -e MYSQL_USER=ltgenai `
    -e MYSQL_PASSWORD=rootroot `
    -e MYSQL_DATABASE=genaideveloper `
    -p 3306:3306 `
    -d `
    mysql:lts
  • Lets create a table called as students with some information
id
qtid
name
mobile
email
batchno
  • the query to create database table is
CREATE TABLE students (
    id INT NOT NULL AUTO_INCREMENT,
    qtid VARCHAR(100),
    name VARCHAR(100) NOT NULL,
    mobile VARCHAR(15),
    email VARCHAR(100),
    batchno VARCHAR(20),
    PRIMARY KEY (id)
);

  • to insert some records
INSERT INTO students (qtid, name, mobile, email, batchno)
VALUES
    ('QT001', 'test', '9963799240', 'qtkhajacloud@gmail.com', '1'),
    ('QT002', 'test', '9515151992', 'qtgenaikhaja@gmail.com', '1');

#cd into infra folder
docker compose up -d


Experimenting with an agent to send notifications to students

  • At this point we need two tools
    • get email ids from students database
    • send emails
  • Refer Here for naive implementation of database tool
  • Exercise: Create a graph with this tool and try getting all emailids based on llm invoke.

By continuous learner

enthusiastic technology learner

Leave a Reply

Discover more from Direct AI Powered By Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading