Inspiration

Businesses often discover customer churn only after revenue has already been lost. Traditional KPIs such as revenue, ticket volume, or account status are reactive indicators that surface problems too late.

Wanted to answer a simple question:

What if an AI system could detect customer decay before humans even notice it?

DecayRader was built to identify subtle behavioral signals such as declining engagement, longer purchase intervals, and reduced activity, then proactively recommend retention actions before revenue loss occurs.


What it does

DecayRader is an AI-powered customer decay intelligence platform.

It continuously analyzes customer behavior and:

  • Detects early warning signs of churn
  • Generates customer-level intelligence reports
  • Produces portfolio-wide risk assessments
  • Creates tier-based business insights
  • Recommends retention interventions
  • Tracks intervention outcomes through a human-in-the-loop workflow

Using MongoDB MCP, Gemini can dynamically retrieve customer context directly from MongoDB Atlas rather than relying on static prompt data.


How I built it

DecayRader combines machine learning, agentic AI, and real-time database intelligence.

Core architecture:

  • Streamlit frontend dashboard
  • MongoDB Atlas database
  • MongoDB MCP Server
  • Gemini 3.1 Flash Lite
  • Gemini 3.5 Flash
  • Isolation Forest anomaly detection
  • Python data pipelines
  • Human-in-the-loop intervention system

The system calculates behavioral decay signals, stores them in MongoDB, and allows Gemini to query live customer data through MongoDB MCP to generate intelligence reports and recommendations.


Challenges I ran into

The biggest challenge was integrating the MongoDB MCP Server into an existing application architecture.

We had to:

  • Refactor static prompt workflows into MCP-powered workflows
  • Handle tool-calling between Gemini and MongoDB
  • Deploy MCP on Streamlit Cloud
  • Manage Node.js dependencies in a Python-first environment
  • Optimize performance while preserving a smooth user experience

Balancing reliability, speed, and explainability was a major engineering challenge.


Accomplishments that I am proud of

  • Built as a solo project
  • Successfully integrated MongoDB MCP with Gemini
  • Implemented agentic intelligence workflows
  • Created an end-to-end open-source SaaS demo
  • Built customer, tier, and portfolio intelligence agents
  • Added a human approval layer before interventions are executed
  • Successfully deployed the application publicly

What I have learned

This project taught us that agentic AI becomes significantly more powerful when it can access live business context through MCP instead of relying solely on prompt-engineered inputs.

We also learned how to design AI systems that balance automation with human oversight, which is essential for real-world business applications.


What's next for DecayRader

Future plans include:

  • Multi-tenant architecture
  • Real-time event ingestion
  • CRM integrations
  • Predictive revenue forecasting
  • Autonomous retention workflows
  • Advanced customer segmentation
  • Enterprise deployment support

Our long-term vision is to build an AI-powered operating system for customer retention and revenue protection.

Built With

Share this project:

Updates