Gen-AI Developer Classroom notes 19/Jul/2026

Project-Idea: Customer Churn Signalling Agent

Problem statement

  • You know your best customers, The one who ordered 12 times last year, left 5 star-reviews, referreed their friends

  • Then one day – they just stopped

  • No complaints, They simply opened a competitors app instead,

  • You never saw it coming. But the data did.

What we want to build

  • An AI Agent that watches every customer, every day and tells your retention team exactly who to save and how (debatable).

step-1: Setting up synthetic data

  • Lets setup the project
mkdir customer_churn_alert_agent
cd customer_churn_alert_agent
uv init .
uv add deepagents langchain-google-genai 
# optional
#uv add langchain-anthropic
  • We need largely two types of data
    • login and logout audit tables with customer info
    • Customer Support Tickets
    • Reviews
  • Figure out how to make seed.py create the above tables with synthetic data represnting any quick commerce platform
  • Schema creation Prompt
You are db expert, create me the schema for the database which
represents the user info, audit log for login and logout events of the user, customer support tickets and reviews by customer. 

The above tables will be used to simulate quick commerce platforms like blink it, zepto etc

Also generate some sample records
  • Seed.py prompt
For the above schema, give me code to create entries in sqlite db path local

I need to 
    * create initial entries 
    * simulate live data generation

Ensure we atleast have 100 days of data
  * We need to have some customers not using platform in last few weeks

Step-2: Figure out a way to get most active and most inactive users in a time period

  • Approach:

    • Deterministic: Create a tool
    • LLM Based agent: use create_agent with SQLDatabaseToolkit to get the above responses
  • This should be our sub-agent who fetches inactive users in last n days

Design

3 subagents

used by deep agent with planning, skills (optional)

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