PHPackages                             gtstudio/module-ai-widgets - 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. gtstudio/module-ai-widgets

ActiveMagento2-module

gtstudio/module-ai-widgets
==========================

AI-powered admin widgets for Magento 2. Provides the floating chat assistant and PageBuilder content generation backed by Gtstudio\_AiAgents.

1.0.3(1mo ago)05↓100%BUSL-1.1JavaScriptPHP &gt;=8.1

Since Mar 9Pushed 1mo agoCompare

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

READMEChangelog (1)Dependencies (3)Versions (4)Used By (0)

Gtstudio\_AiWidgets
===================

[](#gtstudio_aiwidgets)

AI-powered admin widgets for Magento 2. Provides a floating chat assistant on every admin page and an AI content generator inside PageBuilder HTML blocks.

Preview
-------

[](#preview)

[![AiWidgets — floating chat assistant and PageBuilder AI content generation](docs/images/aiwidgets-preview.gif)](docs/images/aiwidgets-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***(this module)*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**[module-ai-dashboard](https://github.com/gabrielgts/module-ai-dashboard)AI-powered KPI dashboard with ML insightsWhat It Does
------------

[](#what-it-does)

- **Floating Chat Widget** — a persistent chat panel in the Magento admin, powered by the `admin_assistant` agent
- **PageBuilder AI Generator** — an *AI Generate* button inside PageBuilder HTML blocks to create or rewrite content via the `page_builder_generator` agent
- Token and cost estimation displayed in real time for every message

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

[](#requirements)

- Magento 2.4.4+
- PHP 8.1+
- `Gtstudio_AiConnector` enabled and configured
- `Gtstudio_AiAgents` enabled
- `Magento_PageBuilder` (bundled with Adobe Commerce; available as OSS extension for Community)

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

[](#installation)

```
composer require gtstudio/module-ai-widgets
php bin/magento module:enable Gtstudio_AiWidgets
php bin/magento setup:upgrade
```

Setup
-----

[](#setup)

### Admin Chat Assistant

[](#admin-chat-assistant)

1. Go to *AI Studio → Agents → Add New*
2. Set **Code** to `admin_assistant`
3. Fill in Background, Steps, and Output Instructions to define the assistant's persona
4. Save — the widget appears automatically for users with the `Gtstudio_AiWidgets::management` ACL resource

### PageBuilder Generator

[](#pagebuilder-generator)

1. Create an agent with code `page_builder_generator`
2. In PageBuilder, open any HTML block — an **AI Generate** button appears in the toolbar
3. Type a prompt and click Generate; the result is inserted into the block

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

[](#extensibility)

### Swapping the agent used by the chat widget

[](#swapping-the-agent-used-by-the-chat-widget)

The agent code is hardcoded as `admin_assistant` in `AdminChatService`. Override the service via DI preference to change this or add additional logic:

```

```

### Customising the chat widget template

[](#customising-the-chat-widget-template)

Override via standard Magento layout XML:

```

                    Vendor_Module::chat/custom-widget.phtml

```

The default templates are in:

```
view/adminhtml/templates/chat/widget.phtml
view/adminhtml/web/js/admin-chat.js

```

### Adding token pricing for a custom model

[](#adding-token-pricing-for-a-custom-model)

Extend `TokenCostService` via `di.xml` — see the `Gtstudio_AiConnector` README for the full pattern.

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

[](#acl-resources)

ResourceControls`Gtstudio_AiWidgets::management`Access to all widget features and the chat API endpoint

###  Health Score

40

—

FairBetter than 87% of packages

Maintenance96

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

3

Last Release

59d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[fastly/magento2

Fastly CDN Module for Magento 2.4.x

1564.2M1](/packages/fastly-magento2)[mage-os/module-automatic-translation

Automatic AI content translation for Mage-OS.

277.1k](/packages/mage-os-module-automatic-translation)[zepgram/module-rest

Technical module to industrialize API REST call with dependency injection pattern using Guzzle library

1326.2k](/packages/zepgram-module-rest)[graycore/magento2-graphql-introspection-cache

1015.2k](/packages/graycore-magento2-graphql-introspection-cache)[mage-os/mageos-common-async-events

Send REST requests to external endpoints asynchronously. This module implements the most common events like order creation and customer change.

147.7k2](/packages/mage-os-mageos-common-async-events)[mage-os/module-inventory-reservations-grid

Add a grid with the list of inventory reservations.

126.8k](/packages/mage-os-module-inventory-reservations-grid)

PHPackages © 2026

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