# customer segmentation dashboard

> A Flask and React dashboard for automated K-Means customer segmentation, KPI tracking, and PDF/Excel reporting.

customer segmentation dashboard is a free AI agent skill on Agensi by Naveen S, in Frontend & Web Apps. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Naveen S](https://www.agensi.io/creators/naveen-s)
- Category: [Frontend & Web Apps](https://www.agensi.io/skills/frontend-web-apps)
- Version: 1.0
- Last updated: 2026-11-18
- Security: scan passed (2026-11-18); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/customer-segmentation-dashboard
- Tags: ai-agents, scikit-learn, flask, react, data-science, tailwind-css

## About this skill

Manual customer segmentation is a bottleneck for marketing teams and developers alike. This skill provides a specialized environment for maintaining and extending a full-stack Customer Segmentation Dashboard, bridging the gap between raw scikit-learn clustering and a functional React UI. It eliminates the need to manually wire up data pipelines, standardise messy CSV headers, or build complex Recharts visualizations from scratch.

### What it does
- **Data Ingestion** handles CSV, Excel, JSON, and Pickle files with automatic column normalization and cleaning.
- **K-Means Clustering** executes automated customer segmentation using scikit-learn, featuring automatic feature selection and segment labeling.
- **KPI Generation** calculates core metrics including CLV, purchase frequency, and revenue distributions.
- **Interactive Visualization** renders dynamic scatter plots, growth charts, and demographic breakdowns using Recharts.
- **Export Engine** generates professional Excel and PDF reports using openpyxl and reportlab.
- **Deployment Readiness** includes pre-configured Render blueprints and GitHub Actions for CI/CD.

### How it works
1. **Upload** a customer dataset through the React frontend to trigger the Flask `/upload` endpoint.
2. **Process** the data via the backend pipeline which detects columns, standardizes features, and runs the K-Means algorithm.
3. **Analyze** the resulting segments, KPIs, and AI-generated insights within the dashboard views.
4. **Extend** the system by adding new API routes in `app.py` or custom chart components in the React `components/` directory.

### Frameworks & tools
Built with Python 3.10+, Flask 3, scikit-learn, and pandas on the backend. The frontend utilizes React 19, Vite, Tailwind CSS 4, and Recharts. Deployment is configured for Render and GitHub Actions.

### Why this beats prompting it yourself
Generic prompts often fail to maintain the state between a Flask session and a React context. This skill understands the specific data flow between scikit-learn's standardized outputs and the frontend's expected JSON shape, ensuring new features don't break the existing clustering logic or export formatting.

### Use cases
- Add custom business logic to the automated segment labeling system.
- Implement new visualization types for specific metrics like churn risk or loyalty.
- Extend file support to include proprietary database exports or specific CRM formats.
- Deploy a private analytics internal tool for marketing teams to bypass manual Excel work.

### Known limitations
Uses in-memory session storage which requires a single-worker deployment. Datasets are limited to 50MB and the K-Means implementation defaults to 4 clusters unless modified in `clustering.py`.

## Requires

- Python
- Node.js
- Git

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the customer segmentation dashboard skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What exactly is included in the purchase of this dashboard skill?

The skill includes the complete source code for both the Flask backend and React frontend, pre-configured deployment blueprints for Render, GitHub Actions workflows for CI/CD, and a sample dataset to get you started immediately.

### Do I need to format my customer data in a specific way before uploading it?

The system automatically handles CSV, Excel, JSON, and Pickle files. It features a normalization engine that maps various header names to standard fields, meaning you don't need to manually reformat your CRM exports before uploading.

### Can I change the number of customer segments the K-Means algorithm generates?

While the skill defaults to 4 clusters to ensure optimal performance, you can easily adjust the cluster count or the feature selection logic by modifying the 'clustering.py' configuration file included in the package.

### What are the technical requirements to run and deploy this segmentation tool?

The dashboard is designed for Python 3.10+ environments and integrates seamlessly with any AI agent capable of managing full-stack web applications. It uses standard REST APIs, making it compatible with most modern orchestration frameworks.

### How does this skill differ from simply asking an LLM to write a clustering script?

Unlike generic code snippets, this skill manages the complex state between scikit-learn's data outputs and React's visualization requirements. It ensures that any extensions you add won't break the existing data pipeline or reporting engine.

### Are there any limitations on the size of the dataset I can process?

Currently, the dashboard uses in-memory storage optimized for single-worker deployments and supports datasets up to 50MB. This makes it ideal for department-level tools or processing monthly marketing exports.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
