PHPackages                             gtstudio/module-ai-dashboard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. gtstudio/module-ai-dashboard

ActiveMagento2-module[Admin Panels](/categories/admin)

gtstudio/module-ai-dashboard
============================

AI-powered admin dashboard for Magento 2 — replaces the stock dashboard with charts, KPI cards, stock alerts, and an embedded store assistant agent.

1.0.2(2mo ago)1023BUSL-1.1PHP

Since Mar 24Pushed 2mo agoCompare

[ Source](https://github.com/gabrielgts/module-ai-dashboard)[ Packagist](https://packagist.org/packages/gtstudio/module-ai-dashboard)[ RSS](/packages/gtstudio-module-ai-dashboard/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (2)Dependencies (8)Versions (4)Used By (0)

Gtstudio\_AiDashboard
=====================

[](#gtstudio_aidashboard)

AI-powered analytics dashboard for Magento 2. Replaces the stock admin dashboard with KPI cards, charts, and an embedded store assistant — all built from data computed on cron and served from cache.

Preview
-------

[](#preview)

[![AiDashboard — KPI cards, revenue trend chart, and AI insights panel](docs/images/preview.gif)](docs/images/preview.gif)

AI Studio Ecosystem
-------------------

[](#ai-studio-ecosystem)

Part of the **AI Studio** suite for Magento 2. See all modules:

ModuleRepositoryDescription**Gtstudio\_AiConnector**[module-aiconnector](https://github.com/gabrielgts/module-aiconnector)Core AI provider abstraction**Gtstudio\_AiAgents**[module-ai-agents](https://github.com/gabrielgts/module-ai-agents)Agent &amp; tool orchestration, cron scheduling, execution log**Gtstudio\_AiWidgets**[module-ai-widgets](https://github.com/gabrielgts/module-ai-widgets)Floating admin chat widget + PageBuilder AI generator**Gtstudio\_AiDataQuery**[module-ai-data-query](https://github.com/gabrielgts/module-ai-data-query)Natural-language store analytics (privacy-first)**Gtstudio\_AiKnowledgeBase**[module-ai-knowledge-base](https://github.com/gabrielgts/module-ai-knowledge-base)Document upload &amp; RAG retrieval for agents**Gtstudio\_AiDashboard***(this module)*AI-powered KPI dashboard with ML insightsWhat It Does
------------

[](#what-it-does)

- Replaces the default Magento admin dashboard with a richer analytics view
- Metrics are collected on a background cron job and served from a dedicated cache type — no real-time DB load on page load
- KPI cards: today/week/month revenue, orders, new customers, average order value, pending orders
- Charts: 30-day revenue trend (line), orders by status (donut)
- Tables: top 10 products by quantity sold, top 5 customers by LTV, last 10 orders
- Alerts: low-stock product list (threshold configurable)
- AI Insights: one-click AI summary of store performance via the `store_assistant` agent
- Chat drawer: conversational interface backed by the same agent and the Data Query tool set
- ML features (via `php-ml`): k-Means customer segmentation (VIP / Active / At-Risk), OLS trend arrows on KPI cards, ±2σ stock depletion anomaly detection

Requirements
------------

[](#requirements)

- Magento 2.4.4+
- PHP 8.1+
- `Gtstudio_AiConnector` enabled and configured
- `Gtstudio_AiAgents` enabled
- `Gtstudio_AiDataQuery` enabled
- `php-ml/php-ml` (ML features — pulled automatically by Composer)

Installation
------------

[](#installation)

```
composer require gtstudio/module-ai-dashboard
php bin/magento module:enable Gtstudio_AiDashboard
php bin/magento setup:upgrade
```

A `store_assistant` agent record is created automatically via a data patch on `setup:upgrade`.

Configuration
-------------

[](#configuration)

*Stores → Configuration → AI Studio → AI Dashboard*

FieldDescriptionFull Rebuild ScheduleCron expression for the complete metrics rebuild (default: `5 0 * * *`)Today Refresh ScheduleCron expression for the incremental today-only refresh (default: `0 * * * *`)Low Stock ThresholdProducts with quantity below this value appear in the alerts list (default: `10`)Trend Window (days)Number of days used for revenue and customer trend charts (default: `30`)How It Works
------------

[](#how-it-works)

### Data Collection

[](#data-collection)

Heavy queries run in the background on two cron jobs:

JobDefault SchedulePurpose`BuildDashboardData``5 0 * * *`Full rebuild — all collectors, all time ranges`RefreshTodayData``0 * * * *`Incremental — today's metrics onlyResults are written to a dedicated cache type (`dashboard_cache_tag`) and served as JSON to the frontend.

### Cache Keys

[](#cache-keys)

KeyTTLRebuilt by`dashboard_snapshot_v1`3600 s`BuildDashboardData``dashboard_today_v1`1800 s`RefreshTodayData``dashboard_ai_insights_v1`7200 sOn-demand via *Get AI Insights* buttonTo force a rebuild manually:

```
php bin/magento cache:clean dashboard_cache_tag
php bin/magento cron:run --group=gtstudio_aidashboard
```

### AI Insights &amp; Chat

[](#ai-insights--chat)

The **Get AI Insights** button calls the `store_assistant` agent with a summary of current metrics and returns a markdown analysis. The chat drawer allows follow-up questions; it has access to all Data Query tools (`order_analytics`, `customer_lifetime_value`, `product_performance`, `query_entity`).

Extensibility
-------------

[](#extensibility)

### Adding a custom metric collector

[](#adding-a-custom-metric-collector)

Implement a collector and inject it into `DashboardDataService` via `di.xml`:

```

                Vendor\Module\Model\Collector\MyMetricCollector

```

### Replacing an ML analyzer

[](#replacing-an-ml-analyzer)

Override via DI preference — for example, to replace the customer segmentation algorithm:

```

```

### Swapping the insights agent

[](#swapping-the-insights-agent)

Override the block method that resolves the agent code:

```

```

Then override `getAgentCode()` in your subclass to return a different agent code.

ACL Resources
-------------

[](#acl-resources)

ResourceControls`Gtstudio_AiDashboard::management`Access to the AI Dashboard page and its AJAX endpoints

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance87

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~15 days

Total

3

Last Release

63d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ab1f0030c21bebf4e87187df361e770ffaa2c0d3cdcd0cd45c77a79db5836156?d=identicon)[gtstudio](/maintainers/gtstudio)

---

Top Contributors

[![derekBaldwinGG](https://avatars.githubusercontent.com/u/163020545?v=4)](https://github.com/derekBaldwinGG "derekBaldwinGG (1 commits)")[![gabrielgts](https://avatars.githubusercontent.com/u/22245724?v=4)](https://github.com/gabrielgts "gabrielgts (1 commits)")

### Embed Badge

![Health badge](/badges/gtstudio-module-ai-dashboard/health.svg)

```
[![Health](https://phpackages.com/badges/gtstudio-module-ai-dashboard/health.svg)](https://phpackages.com/packages/gtstudio-module-ai-dashboard)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1121.8M12](/packages/mollie-magento2)[mage-os/module-inventory-reservations-grid

Add a grid with the list of inventory reservations.

1512.6k](/packages/mage-os-module-inventory-reservations-grid)[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50390.4k20](/packages/dotdigital-dotdigital-magento2-extension)[buckaroo/magento2

Buckaroo Magento 2 extension

32414.8k7](/packages/buckaroo-magento2)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68353.9k](/packages/run-as-root-magento2-prometheus-exporter)[amzn/amazon-pay-magento-2-module

Official Magento2 Plugin to integrate with Amazon Pay

108521.2k1](/packages/amzn-amazon-pay-magento-2-module)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
