PHPackages                             mage2kishan/magento2-claude-ai - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mage2kishan/magento2-claude-ai

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

mage2kishan/magento2-claude-ai
==============================

Magento 2 Automation with Claude AI — natural-language store management. Update prices, query catalog, surface insights, all by asking in plain English. Powered by Anthropic's Claude API with tool use.

1.8.0(1mo ago)182MITPHPPHP ~8.1.0||~8.2.0||~8.3.0||~8.4.0

Since Apr 27Pushed 1mo agoCompare

[ Source](https://github.com/mage2sk/magento2-claude-ai)[ Packagist](https://packagist.org/packages/mage2kishan/magento2-claude-ai)[ Docs](https://kishansavaliya.com)[ RSS](/packages/mage2kishan-magento2-claude-ai/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (18)Versions (23)Used By (0)

Magento 2 Claude AI Automation: Manage Your Store in Plain English (Hyva + Luma)
================================================================================

[](#magento-2-claude-ai-automation-manage-your-store-in-plain-english-hyva--luma)

[![Magento 2.4.4 - 2.4.8](https://camo.githubusercontent.com/079c832211eed4f9451ebe264e3865f825b0f9f31b041cbf03676c6e254535d4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6167656e746f2d322e342e342532302d2d253230322e342e382d6f72616e67653f6c6f676f3d6d6167656e746f266c6f676f436f6c6f723d7768697465)](https://magento.com)[![PHP 8.1 - 8.4](https://camo.githubusercontent.com/56b3cce18841623e2cbed2ebf09b06be1be8807e99e6e054a89d304ab4790b8e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532302d2d253230382e342d626c75653f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://php.net)[![Hyva + Luma](https://camo.githubusercontent.com/d4d6a05401973034a5aae392f030440eefa40afc9191ffb06ed897af5d25adb1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5468656d65732d487976612532302532422532304c756d612d313462386136)](https://www.hyva.io)[![Live Demo & Details](https://camo.githubusercontent.com/c69b54da0fc6c6071840e2aca3270e34e73ab08656bc74762b441bb670353bf4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c69766525323044656d6f25323025323625323044657461696c732d6d6167656e746f2d2d322d2d636c617564652d2d61692d3044393438383f7374796c653d666c6174)](https://kishansavaliya.com/magento-2-claude-ai.html)[![Packagist](https://camo.githubusercontent.com/d689691b11f2a3b0972124f055133f24cdf2d675d49c9865bc405981daa7585e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5061636b61676973742d6d616765326b697368616e2532466d6167656e746f322d2d636c617564652d2d61692d6f72616e67653f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/mage2kishan/magento2-claude-ai)[![Upwork Top Rated Plus](https://camo.githubusercontent.com/6f72584179420c41ed90432fd2579a4ed36199d4229e8181d20f353c1c4ee4eb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5570776f726b2d546f702532305261746564253230506c75732d3134613830303f6c6f676f3d7570776f726b266c6f676f436f6c6f723d7768697465)](https://www.upwork.com/freelancers/~016dd1767321100e21)[![Website](https://camo.githubusercontent.com/f1ae86d28e2b505aee60f240d3e5508e390b0a8dc7a9b7ecf1b450fad862053f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f576562736974652d6b697368616e736176616c6979612e636f6d2d304439343838)](https://kishansavaliya.com)

> **Stop clicking through 12 admin screens. Just ask.** Type what you want in plain English - the AI runs the right Magento operation, previews the change, and lets you undo it with one click.

**Product page:** [kishansavaliya.com/magento-2-claude-ai.html](https://kishansavaliya.com/magento-2-claude-ai.html)

---

Quick Answer
------------

[](#quick-answer)

**What is Panth Claude AI Automation?** It is a Magento 2 module that puts an AI chat interface inside the admin. You type a plain-English instruction and the AI runs the correct Magento operations - updating prices, managing products, querying orders, editing CMS content, and more.

**What does it add to my store?**

- An **AI chat panel** in the admin where you type plain-English commands.
- **19 tools** covering products, inventory, prices, categories, CMS pages, CMS blocks, customers, orders, store config, store logo, modules, read-only SQL, cache, reindex, and undo.
- **Dry-run mode** (on by default) so new installs preview every change before touching data.
- **One-click undo** via checkpoints that snapshot state before every bulk write.
- A **storefront Shop Assistant widget** that lets shoppers ask product questions.

**Which themes are supported?** Both **Hyva** (Alpine.js) and **Luma**. The widget ships a template for each, and the admin chat is theme-independent.

**What does it need?** Magento 2.4.4 to 2.4.8, PHP 8.1 to 8.4, `mage2kishan/module-core`, and an Anthropic API key (free $5 credit on new accounts).

**How much does it cost per question?** With prompt caching, a typical question costs about $0.01 on Opus 4.7, $0.003 on Sonnet 4.6, or $0.0006 on Haiku 4.5.

---

Need Custom Magento 2 + AI Development?
---------------------------------------

[](#need-custom-magento-2--ai-development)

> **Get a free quote for your project in 24 hours** for Claude / OpenAI / Gemini integrations, custom modules, Hyva themes, performance work, M1 to M2 migrations, and Adobe Commerce Cloud.

 [ ![Get a Free Quote](https://camo.githubusercontent.com/eac8c45d21cff8b139ddc392325f3bd6c8266a6f3d7b23f15131c958f3d3c8d0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f476574253230612532304672656525323051756f74652532302545322538362539322d5265706c7925323077697468696e2532303234253230686f7572732d4443323632363f7374796c653d666f722d7468652d6261646765) ](https://kishansavaliya.com/get-quote)

### Kishan Savaliya

[](#kishan-savaliya)

**Top Rated Plus on Upwork**

[![Hire on Upwork](https://camo.githubusercontent.com/b69353d3c6e192f4d03cc36bb8883612004e32f54dd2dbcc1e700dd791acd875/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f486972652532306f6e2532305570776f726b2d546f702532305261746564253230506c75732d3134613830303f7374796c653d666f722d7468652d6261646765266c6f676f3d7570776f726b266c6f676f436f6c6f723d7768697465)](https://www.upwork.com/freelancers/~016dd1767321100e21)

100% Job Success - 10+ Years Magento Experience Adobe Certified - Hyva Specialist - AI Integrations

### Panth Infotech Agency

[](#panth-infotech-agency)

**Magento + AI Development Team**

[![Visit Agency](https://camo.githubusercontent.com/bbf04bdd2aff502082508568ec42ace3a7475c98756f596e2013056c89726ed6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f56697369742532304167656e63792d50616e7468253230496e666f746563682d3134613830303f7374796c653d666f722d7468652d6261646765266c6f676f3d7570776f726b266c6f676f436f6c6f723d7768697465)](https://www.upwork.com/agencies/1881421506131960778/)

Custom Modules - AI Tooling - Theme Design Migrations - Performance - Adobe Commerce Cloud

**Visit our website:** [kishansavaliya.com](https://kishansavaliya.com) | **Get a quote:** [kishansavaliya.com/get-quote](https://kishansavaliya.com/get-quote)

---

Table of Contents
-----------------

[](#table-of-contents)

- [Who Is It For](#who-is-it-for)
- [Key Features](#key-features)
- [Screenshots](#screenshots)
- [Compatibility](#compatibility)
- [Installation](#installation)
- [Configuration](#configuration)
- [How It Works](#how-it-works)
- [Tool Catalog](#tool-catalog)
- [Safety and Undo](#safety-and-undo)
- [Training Examples](#training-examples)
- [Conversation History](#conversation-history)
- [Storefront Shop Assistant Widget](#storefront-shop-assistant-widget)
- [FAQ](#faq)
- [Support](#support)
- [About Panth Infotech](#about-panth-infotech)
- [Quick Links](#quick-links)

---

Who Is It For
-------------

[](#who-is-it-for)

- **Merchants who spend hours on repetitive admin tasks** like bulk price changes, disabling out-of-stock items, or writing meta descriptions for dozens of products. Type it once, the AI handles the rest.
- **Store owners who are not technical** and find Magento's admin hard to navigate. Plain English replaces grid filters, mass actions, and config forms.
- **Developers and agencies** who want a fast way to query catalog data, inspect config, or run diagnostics without writing SQL by hand.
- **Hyva storefronts** that want a read-only shop assistant chatbot built with Alpine.js, with no jQuery added back in.
- **Compliance-aware teams** who need a full audit trail of every AI action, including which admin user ran what, when, and with what result.

---

Key Features
------------

[](#key-features)

### Plain-English Admin Chat

[](#plain-english-admin-chat)

- **Type what you want** in plain English - the AI translates it into Magento operations.
- **Multi-turn conversations** that remember context across a session, so follow-up questions work naturally.
- **File attachments** in chat - images, PDFs, spreadsheets - all hardened with extension + MIME + magic-byte checks and a 10 MB cap.
- **Admin Dashboard widget** so you can run quick queries without leaving your home screen.

### 19 Tools, Full Magento Depth

[](#19-tools-full-magento-depth)

- **Products**: search, create, update, bulk price changes, bulk status changes.
- **Inventory**: adjust stock quantities absolutely or by delta, set in-stock flags.
- **Categories**: create, update, show tree with product counts.
- **CMS pages and CMS blocks**: create, update, search-and-replace inside content.
- **Customers**: search by email or name, view spend totals and order counts.
- **Orders**: search, filter by status or date range, hold, cancel, add comment.
- **Store config**: update whitelisted config paths (store name, address, email senders, locale).
- **Store logo**: upload a chat-attached image and apply it as the store header logo.
- **Insights**: order KPIs, average order value, customer counts, sales comparisons.
- **Modules**: list installed third-party modules and their versions.
- **Database queries**: read-only SELECT / SHOW / EXPLAIN - write statements are rejected at parser level.
- **Cache and reindex**: flush specific cache types or run specific indexers.
- **Undo**: restore any prior bulk write by checkpoint ID.

### Dry-Run and Safety Layers

[](#dry-run-and-safety-layers)

- **Dry-run mode is on by default** for new installs. The AI shows what it would change without touching data.
- **Confirmation gate** requires an explicit "yes" before any write that touches more than your threshold (default 5 items).
- **Bulk-write hard cap** (default 500) stops accidental whole-catalog mutations even if confirmation is off.
- **Auto-checkpoint** before every destructive write so one-click or voice undo is always available.
- **Per-tool toggles** let you remove any tool from the AI's catalog entirely - a disabled tool is invisible to the model.

### Checkpoints and Undo

[](#checkpoints-and-undo)

- **Every bulk write snapshots before-state** into `panth_claudeai_checkpoint` before mutating.
- **Restore from the Checkpoints grid** in admin, or just type "undo" in chat.
- **Checkpoint retention** is configurable and auto-pruned by nightly cron.

### Training Examples

[](#training-examples)

- **Teach the AI your store's conventions** with few-shot examples: your slang, pricing rules, refusal patterns.
- **11 starter examples seeded** on install covering pricing, inventory, refusal patterns, sales insights, and category management.
- **Injected as cached system content** so examples never blow out your context window.

### Conversation History and Activity Log

[](#conversation-history-and-activity-log)

- **Full transcript history** with every turn, tool call, token count, and cost per conversation.
- **Activity log** captures every prompt, tool execution, and reply with microsecond timing.
- **Export to CSV** from the Conversations and Activity Log grids for compliance or cost reporting.

### Storefront Shop Assistant Widget

[](#storefront-shop-assistant-widget)

- **Read-only chatbot for shoppers** - answers product and store questions in plain English.
- **Drop in via layout XML or the CMS Widgets tool** - works on any page.
- **Wired to a read-only tool catalog** via DI virtualType, so writes are unreachable from the storefront.
- **Per-IP rate limited** to prevent abuse.

### Prompt Caching Cuts Costs

[](#prompt-caching-cuts-costs)

- **System prompt + tool catalog + training examples** are sent as a single cached block to Anthropic.
- **Cache stays warm for 5 minutes** - repeat questions in the same session cost about 10% of the first one.
- **Token accounting** in the Activity Log shows cache hits vs full-price requests.

### Built to Last

[](#built-to-last)

- **Clean, MEQP-style code** with constructor dependency injection only, no ObjectManager.
- **CLI commands**: `panth_claudeai:status` and `panth_claudeai:test-api`.
- **Nightly cron** prunes old activity rows and expired checkpoints.
- **No outbound traffic except to `api.anthropic.com`** - auditable in your egress firewall.
- **MIT licence** - free for commercial use, full source on GitHub.

---

Screenshots
-----------

[](#screenshots)

### Admin sidebar - one menu, seven workflows

[](#admin-sidebar---one-menu-seven-workflows)

[![Admin sidebar - Claude AI Automation](docs/images/admin-menu.png)](docs/images/admin-menu.png)

### AI Dashboard - KPIs, quick actions, recent activity

[](#ai-dashboard---kpis-quick-actions-recent-activity)

[![AI Dashboard with KPIs and quick prompts](docs/images/admin-dashboard.png)](docs/images/admin-dashboard.png)

### Ask Claude - the chat surface

[](#ask-claude---the-chat-surface)

Empty stateLive conversationCategory tree responseProduct creation with checkpoint[![Ask Claude empty state](docs/images/admin-ask-claude-empty.png)](docs/images/admin-ask-claude-empty.png)[![Chat - low stock query](docs/images/admin-chat-low-stock.png)](docs/images/admin-chat-low-stock.png)[![Chat - category tree](docs/images/admin-chat-category-tree.png)](docs/images/admin-chat-category-tree.png)[![Chat - create product with checkpoint](docs/images/admin-chat-create-product.png)](docs/images/admin-chat-create-product.png)### How to Use - 6-step plain-English onboarding

[](#how-to-use---6-step-plain-english-onboarding)

[![How to Use Claude AI](docs/images/admin-how-to-use.png)](docs/images/admin-how-to-use.png)

### Training Examples - teach Claude your store's conventions

[](#training-examples---teach-claude-your-stores-conventions)

Examples gridEdit form[![Training Examples grid](docs/images/admin-training-examples.png)](docs/images/admin-training-examples.png)[![Edit Training Example](docs/images/admin-training-edit.png)](docs/images/admin-training-edit.png)### Conversations - full transcript history

[](#conversations---full-transcript-history)

Conversations gridSingle conversation transcript[![Conversations grid](docs/images/admin-conversations.png)](docs/images/admin-conversations.png)[![Conversation detail with tool calls](docs/images/admin-conversation-detail.png)](docs/images/admin-conversation-detail.png)### Activity Log - every prompt, tool call, and reply

[](#activity-log---every-prompt-tool-call-and-reply)

[![Activity Log with token accounting](docs/images/admin-activity-log.png)](docs/images/admin-activity-log.png)

### Checkpoints and Restore - one-click undo

[](#checkpoints-and-restore---one-click-undo)

[![Checkpoints & Restore grid](docs/images/admin-checkpoints-restore.png)](docs/images/admin-checkpoints-restore.png)

### Dashboard widget - Store Assistant on the admin landing page

[](#dashboard-widget---store-assistant-on-the-admin-landing-page)

[![Store Assistant widget on admin Dashboard](docs/images/admin-dashboard-store-assistant-widget.png)](docs/images/admin-dashboard-store-assistant-widget.png)

### Configuration - 5 groups, 25+ options

[](#configuration---5-groups-25-options)

API Credentials + GeneralSafety[![API Credentials + General Settings](docs/images/admin-config-api-general.png)](docs/images/admin-config-api-general.png)[![Safety settings](docs/images/admin-config-safety.png)](docs/images/admin-config-safety.png)Tool Capabilities (per-tool toggles)Logging and Retention[![Tool Capabilities](docs/images/admin-config-tool-capabilities.png)](docs/images/admin-config-tool-capabilities.png)[![Logging & Retention](docs/images/admin-config-logging-retention.png)](docs/images/admin-config-logging-retention.png)---

Compatibility
-------------

[](#compatibility)

RequirementVersions SupportedMagento Open Source2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8Adobe Commerce2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8Adobe Commerce Cloud2.4.4 to 2.4.8PHP8.1.x, 8.2.x, 8.3.x, 8.4.xMySQL8.0+MariaDB10.4+Search EngineElasticsearch 7/8, OpenSearch 1/2Hyva Theme1.3+Luma ThemeNative supportAnthropic APIClaude Opus 4.7, Sonnet 4.6, Haiku 4.5Required Dependency`mage2kishan/module-core` (free)---

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

[](#installation)

### Composer Installation (Recommended)

[](#composer-installation-recommended)

```
composer require mage2kishan/magento2-claude-ai
bin/magento module:enable Panth_Core Panth_ClaudeAi
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
```

Then open **Stores -&gt; Configuration -&gt; Panth Extensions -&gt; Claude AI -- Magento Automation** and paste your Anthropic API key. Get one at [console.anthropic.com](https://console.anthropic.com) - new accounts get **$5 free credit**.

### Manual Installation via ZIP

[](#manual-installation-via-zip)

1. Download the latest release from [Packagist](https://packagist.org/packages/mage2kishan/magento2-claude-ai) or from the [product page](https://kishansavaliya.com/magento-2-claude-ai.html).
2. Extract to `app/code/Panth/ClaudeAi/` in your Magento install.
3. Make sure `Panth_Core` is installed too (required dependency).
4. Run the commands above starting from `bin/magento module:enable`.

### Verify Installation

[](#verify-installation)

```
bin/magento module:status Panth_ClaudeAi
# Expected: Module is enabled

bin/magento panth_claudeai:test-api
# Expected: Round-trip OK - model=claude-opus-4-7 - cached=Y - latency=...
```

After install, open:

```
Admin -> Panth Infotech -> Claude AI Automation -> Ask Claude

```

---

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

[](#configuration)

Go to **Stores -&gt; Configuration -&gt; Panth Extensions -&gt; Claude AI -- Magento Automation**.

### Group 1: API Credentials

[](#group-1-api-credentials)

SettingDefaultDescriptionAnthropic API Key(empty)Required. Stored encrypted. Starts with `sk-ant-api...`. Get one at console.anthropic.com.### Group 2: General Settings

[](#group-2-general-settings)

SettingDefaultDescriptionEnable Module (Master Switch)YesTurns off everything - admin chat, launcher, and tools.Claude ModelOpus 4.7Opus 4.7 = most capable. Sonnet 4.6 = faster and cheaper. Haiku 4.5 = fastest.Effort LevelHighHow hard the AI thinks before replying. High is recommended.Max Output Tokens per Reply15000Maximum tokens the AI can produce in one reply.Max Tool Calls per Question8How many chained actions the AI may run per question before stopping.API Timeout (seconds)120Raise to 180 if you see timeouts on long Opus 4.7 responses.### Group 3: Safety

[](#group-3-safety)

SettingDefaultDescriptionDry Run ModeYesWhen on, the AI shows what it would change without touching data. Turn off when ready.Max Items per Bulk Action500Hard cap. The AI refuses a write that would touch more items than this.Admin Rate Limit (questions/hour)60Stops accidental loops from burning API credit.Require Confirmation Before WritesYesThe AI previews count + sample names and waits for "yes" before running a bulk write.Confirmation Threshold5Writes affecting fewer items than this run without the confirmation pause.### Group 4: Tool Capabilities

[](#group-4-tool-capabilities)

Each of the 19 tools has its own toggle. A disabled tool is removed from the API catalog at request time - the AI cannot call something it cannot see.

Tool ToggleWhat it controlsSearch products`get_products` - find by SKU, name, price range, type, statusCreate / update / clone products`manage_products` - full product writesUpdate product prices`update_product_price` - bulk price changes (fixed or percent)Enable / disable products`update_product_status` - bulk status changesAdjust stock quantities`update_inventory` - set qty, in-stock flagCustomer search and lookup`customers` - read-only, never returns passwordsOrder management`orders` - search, hold, cancel, commentManage categories`manage_categories` - create, update, tree, assign productsManage CMS pages`manage_cms_pages` - list, get, create, updateManage CMS blocks`manage_cms_blocks` - list, get, create, updateRead-only database query`database_query` - SELECT / SHOW / EXPLAIN only, writes rejectedCustomer and order insights`store_insights` - aggregated KPIsList installed modules`get_modules` - read-onlyFind low-stock products`low_stock` - products at or below a thresholdRead store info`store_info` - currency, country, base URL, versionsWrite store config`update_config` - allowlisted paths only (name, address, email senders, locale)Set storefront header logo`set_store_logo` - applies a chat-attached image as the store logoFlush caches and reindex`cache_reindex` - specific cache types or indexersUndo / restore checkpoints`restore_checkpoint` - revert any prior bulk write### Group 6: Logging and Retention

[](#group-6-logging-and-retention)

SettingDefaultDescriptionEnable Activity LogYesRecords every prompt, tool call, and reply with token counts and cost.Activity Retention (days)90Older activity rows are auto-pruned by daily cron.Checkpoint Retention (days)30Older un-restored checkpoints are auto-pruned.Write to var/log/panth\_claudeai.logYesUseful for ops and grep-friendly diagnostics.---

How It Works
------------

[](#how-it-works)

```
Admin types: "Make all t-shirts $24.99"
        |
[ Send AJAX -> /panth_claudeai/chat/send ]
        |
Orchestrator (manual tool-use loop)
        |- Inject system prompt + training examples + tool catalog
        |  (flagged cache_control = ephemeral for Anthropic prompt caching)
        |- Send to Anthropic /v1/messages
        |- stop_reason == tool_use ?
        |    yes -> execute tool locally (snapshot before-state if write)
        |           append tool_result, repeat (max N iterations, configurable)
        |    no  -> final text reply
        +- Log every step into panth_claudeai_activity (tokens, ms, cost)
        |
Admin sees: "Updated 42 t-shirts to $24.99. Reply 'undo' to revert."

```

The orchestrator is a **manual tool-use loop**, not a wrapper around Anthropic's auto-handler. This gives per-step logging, dry-run interception, confirmation gating, and graceful degradation when a tool throws.

Every write tool **snapshots minimum before-state** (e.g. old price per SKU) into `panth_claudeai_checkpoint` before mutating. Cleanup cron auto-prunes old checkpoints based on your retention setting.

---

Tool Catalog
------------

[](#tool-catalog)

Each tool can be enabled or disabled individually in **Configuration -&gt; Tool Capabilities**. A disabled tool is removed from the API catalog at request time - the model cannot call it.

\#ToolScopeWhat it does1`get_products`ReadSearch by SKU pattern, name, price range, type, status, visibility2`update_product_price`WriteBulk update prices (fixed or percent), with checkpoint3`update_product_status`WriteEnable / disable products in bulk, with checkpoint4`update_inventory`WriteSet stock qty (absolute or delta) + in-stock flag, with checkpoint5`manage_products`WriteCreate / update / delete simple, configurable, virtual, downloadable products6`low_stock`ReadFind products at or below a stock threshold7`manage_categories`WriteCreate / update categories; show tree with depth + product counts8`manage_cms_pages`WriteCreate / update CMS pages; search-and-replace inside content9`manage_cms_blocks`WriteCreate / update CMS static blocks10`customers`ReadSearch by email/name, spend totals, order counts, address summaries11`orders`Read/WriteSearch orders by status, date, customer email; hold, cancel, comment12`store_insights`ReadCustomer count, order count by status, average order value, KPIs13`store_info`ReadCurrency, country, base URL, Magento + module versions14`get_modules`ReadLists installed third-party modules, versions, enabled state15`database_query`ReadRead-only SELECT / SHOW / EXPLAIN. Write SQL blocked at parser level.16`cache_reindex`WriteFlush specific cache types, run specific indexers17`update_config`WriteUpdate core\_config\_data (allowlisted paths only) - checkpointed18`set_store_logo`WriteUpload + apply store logo from chat-attached file - checkpointed19`restore_checkpoint`WriteUndo any prior bulk write by checkpoint ID---

Safety and Undo
---------------

[](#safety-and-undo)

The module uses six layers of protection. Even if one layer is turned off, the next one catches it.

**Layer 1 - Dry-Run mode (default ON).** Every write tool shows what would change (count + sample) without touching data. New installs ship with this on.

**Layer 2 - Confirmation gate.** Any write affecting more than your threshold (default 5 items) makes the AI pause and ask for explicit "yes" / "go ahead" before proceeding.

**Layer 3 - Bulk-write hard cap.** Every write tool checks Max Items per Bulk Action (default 500) before running. If the query would touch more, the tool refuses.

**Layer 4 - Auto-checkpoint.** Even when layers 1-3 are bypassed, every write tool snapshots the affected rows' before-state into `panth_claudeai_checkpoint` before mutating. One-click restore from the Checkpoints grid, or just type "undo" in chat.

**Layer 5 - Per-tool master switch.** Disable any tool in Tool Capabilities and it vanishes from the API catalog. The AI cannot call something it cannot see.

**Layer 6 - Read-only storefront catalog.** The storefront widget is wired to a separate DI virtualType that only registers `get_products` + `store_info`. Writes are unreachable from the storefront.

---

Training Examples
-----------------

[](#training-examples-1)

Go to **Panth Infotech -&gt; Claude AI Automation -&gt; Training Examples** to teach Claude your store's conventions.

You can add examples like:

- **Store slang** - "sweats" means hoodies and sweatpants in our catalog.
- **Refusal patterns** - "never delete products, always disable instead."
- **Pricing conventions** - "Black Friday discount = 30% off applied to RRP, not current price."
- **Inventory rules** - "low stock means qty &lt; 5, not the Magento default of 1."

Each example has a Title, "Merchant says" field, "Expected outcome" field, Category, Sort Order, and Status. Active examples are injected as cached system content before every conversation - they participate in prompt caching and cost very little after the first request.

The module ships 11 starter examples seeded by `Setup/Patch/Data/SeedTrainingExamples.php`, covering pricing, inventory, refusal patterns, sales insights, and category management.

---

Conversation History
--------------------

[](#conversation-history)

Open **Panth Infotech -&gt; Claude AI Automation -&gt; Conversations** to see every chat thread.

The grid shows Started / Last activity, First prompt, Turn count, File attachment count, Total tokens (input + output), Total cost in USD, and Surface (admin or storefront).

Click any row to open the full transcript with every user turn, assistant reply, and tool call expanded - useful for compliance reviews ("who changed prices on Tuesday?") and cost reporting.

---

Storefront Shop Assistant Widget
--------------------------------

[](#storefront-shop-assistant-widget-1)

A read-only chatbot for your shoppers. It answers product and store questions in plain English. Writes are unreachable - the widget's tool catalog is restricted to `get_products` + `store_info` via a DI virtualType.

Add via layout XML:

```

        Need help finding something?
        floating
        #5B5BD6
        Hi! I can help you find products, check stock, or compare options.

```

Or add it as a CMS Widget via **Content -&gt; Widgets -&gt; New**. The same block also renders in the admin Dashboard for quick queries without leaving the home screen.

---

FAQ
---

[](#faq)

### Is this safe to run on a production store?

[](#is-this-safe-to-run-on-a-production-store)

**Yes - that is the whole point of the safety stack.** Dry-run is on by default, every write is checkpointed and reversible in one click, bulk writes are hard-capped at 500, and confirmation is required for anything above your threshold. Running in dry-run mode for the first week on production before switching it off is a sensible practice.

### Which Claude model should I pick?

[](#which-claude-model-should-i-pick)

- **Opus 4.7** - most capable, best for complex multi-step tasks ("find slow movers in Sale category that haven't been discounted, then bulk-apply 20% off"). About $0.01/question with caching.
- **Sonnet 4.6** - nearly as capable at about a third of the price. A good default for most stores. About $0.003/question.
- **Haiku 4.5** - fastest and cheapest. Good for simple lookups and the storefront widget. About $0.0006/question.

You can change the model in Configuration without restarting. The next request uses the new model.

### Does it work on Hyva themes?

[](#does-it-work-on-hyva-themes)

**Yes.** The admin chat is theme-independent. The storefront widget ships both a Luma (Knockout) template and a Hyva (Alpine.js + Tailwind) template, picked automatically based on the active frontend theme.

### Does it support multi-store setups?

[](#does-it-support-multi-store-setups)

**Yes.** Tools that write scoped data (`update_config`, `manage_cms_pages`, `manage_cms_blocks`, `set_store_logo`) accept a `scope` and `scope_id` parameter the AI fills in from your prompt. "Set the page title suffix for store view es-mx to ' | Acme Mexico'" works.

### Can I prevent the AI from editing prices?

[](#can-i-prevent-the-ai-from-editing-prices)

**Yes, three ways.** (1) Disable `update_product_price` in Tool Capabilities. (2) Remove the `Panth_ClaudeAi::price` ACL resource from the relevant admin role. (3) Add a refusal training example: "never change prices without explicit confirmation."

### Does it call anything except api.anthropic.com?

[](#does-it-call-anything-except-apianthropiccom)

**No.** Single egress endpoint. Allowlist `api.anthropic.com:443` in your firewall and you are done.

### How does prompt caching work?

[](#how-does-prompt-caching-work)

The system prompt + tool catalog + active training examples are sent as a single block flagged with `cache_control: { type: "ephemeral" }`. Anthropic stores it server-side for 5 minutes. Any request within that window gets about 90% off the cached portion. The Activity Log shows `cache_read_tokens` so you can verify cache hits.

### Can I export conversations for compliance?

[](#can-i-export-conversations-for-compliance)

**Yes.** The Conversations grid and Activity Log grid both have Export to CSV. For programmatic access, query `panth_claudeai_activity` and `panth_claudeai_message` directly - both have `created_at` indexes.

### What happens if Anthropic is down?

[](#what-happens-if-anthropic-is-down)

The chat returns a clear error, the activity row is logged with `status=error`, and the orchestrator does not retry indefinitely. Default timeout is 120 seconds. Your store is unaffected - the module is purely additive.

---

Support
-------

[](#support)

ChannelContactProduct Page[kishansavaliya.com/magento-2-claude-ai.html](https://kishansavaliya.com/magento-2-claude-ai.html)EmailWebsite[kishansavaliya.com](https://kishansavaliya.com)WhatsApp+91 84012 70422GitHub Issues[github.com/mage2sk/magento2-claude-ai/issues](https://github.com/mage2sk/magento2-claude-ai/issues)Upwork (Top Rated Plus)[Hire Kishan Savaliya](https://www.upwork.com/freelancers/~016dd1767321100e21)Upwork Agency[Panth Infotech](https://www.upwork.com/agencies/1881421506131960778/)Response time: 1-2 business days.

### Need Custom Magento Development?

[](#need-custom-magento-development)

Looking for **custom Claude / OpenAI integration**, **Hyva theme work**, **store migrations**, or **performance tuning**? Get a free quote in 24 hours:

 [ ![Get a Free Quote](https://camo.githubusercontent.com/0d9512dc4f89ef40179e9f650fd0786b6bc846d289ab2cb04a223a43f2833eeb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f254630253946253932254143253230476574253230612532304672656525323051756f74652d6b697368616e736176616c6979612e636f6d2532466765742d2d71756f74652d4443323632363f7374796c653d666f722d7468652d6261646765) ](https://kishansavaliya.com/get-quote)

 [ ![Hire on Upwork](https://camo.githubusercontent.com/fad56e8be7896e39593f090cd2ed32e6bf86b4b6e75974cf292aee99d45f5077/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f486972652532304b697368616e2d546f702532305261746564253230506c75732d3134613830303f7374796c653d666f722d7468652d6261646765266c6f676f3d7570776f726b266c6f676f436f6c6f723d7768697465) ](https://www.upwork.com/freelancers/~016dd1767321100e21) [ ![Visit Agency](https://camo.githubusercontent.com/fdf45a9d937d72b896f5e2557337d47efebc0e06b7ad4d4c162c0a64375a62fa/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f56697369742d50616e7468253230496e666f746563682532304167656e63792d3134613830303f7374796c653d666f722d7468652d6261646765266c6f676f3d7570776f726b266c6f676f436f6c6f723d7768697465) ](https://www.upwork.com/agencies/1881421506131960778/) [ ![View Product Page](https://camo.githubusercontent.com/cd24afba5ef0683659736718c5bf9cf99531924ac1b838787a754904e5e48ccb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5669657725323050726f64756374253230506167652d6d6167656e746f2d2d322d2d636c617564652d2d61692d3044393438383f7374796c653d666f722d7468652d6261646765) ](https://kishansavaliya.com/magento-2-claude-ai.html)

---

About Panth Infotech
--------------------

[](#about-panth-infotech)

Built and maintained by **Kishan Savaliya** ([kishansavaliya.com](https://kishansavaliya.com)), a **Top Rated Plus** Magento developer on Upwork with 10+ years of eCommerce experience.

**Panth Infotech** is a Magento 2 development agency that builds high quality, security focused extensions and themes for both Hyva and Luma storefronts. The extension suite covers SEO, performance, checkout, product presentation, customer engagement, store management, and AI automation - with each module built to MEQP standards and tested across Magento 2.4.4 to 2.4.8.

Browse the full extension catalog on our [Magento extensions page](https://kishansavaliya.com/magento-extensions.html) or on [Packagist](https://packagist.org/packages/mage2kishan/).

---

Quick Links
-----------

[](#quick-links)

ResourceLink**Product Page**[magento-2-claude-ai.html](https://kishansavaliya.com/magento-2-claude-ai.html)**Packagist**[mage2kishan/magento2-claude-ai](https://packagist.org/packages/mage2kishan/magento2-claude-ai)**GitHub**[mage2sk/magento2-claude-ai](https://github.com/mage2sk/magento2-claude-ai)**Website**[kishansavaliya.com](https://kishansavaliya.com)**Free Quote**[kishansavaliya.com/get-quote](https://kishansavaliya.com/get-quote)**Upwork (Top Rated Plus)**[Hire Kishan Savaliya](https://www.upwork.com/freelancers/~016dd1767321100e21)**Upwork Agency**[Panth Infotech](https://www.upwork.com/agencies/1881421506131960778/)**Email****WhatsApp**+91 84012 70422---

 **Ready to manage your Magento store in plain English?**
 [ ![See Claude AI](https://camo.githubusercontent.com/997faafd7ec8a4dbc07edc0fe1f274ebbe8a672a87d1235a96fdf4d8490c0b19/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f254630253946253941253830253230536565253230436c6175646525323041492532302545322538362539322d50726f647563742532305061676525323025323625323044656d6f2d4443323632363f7374796c653d666f722d7468652d6261646765) ](https://kishansavaliya.com/magento-2-claude-ai.html)

---

**SEO Keywords:** magento 2 claude ai, magento 2 anthropic api, magento 2 ai automation, magento 2 ai assistant, magento 2 natural language admin, magento 2 conversational commerce, magento 2 ai chatbot, magento 2 ai shop assistant, magento 2 ai widget, magento 2 ai bulk update, magento 2 ai pricing, magento 2 ai inventory, magento 2 ai cms, magento 2 ai orders, magento 2 ai customers, magento 2 ai dashboard, magento 2 ai sales insights, magento 2 ai extension, magento 2 ai module, magento 2 ai integration, hyva claude ai, luma claude ai, magento 2 ai checkpoint undo, magento 2 ai dry run, magento 2 ai content generation, magento 2 ai meta description, magento 2 chatgpt alternative, magento 2 store manager ai, claude opus 4.7 magento, claude sonnet 4.6 magento, claude haiku 4.5 magento, anthropic api magento, prompt caching magento, tool use magento, magento 2 ai backend, magento 2 ai admin, magento 2 ai bulk product update, magento 2.4.8 ai module, php 8.4 magento ai, panth claude ai, panth infotech, mage2kishan, kishan savaliya, top rated plus upwork magento, hire magento ai developer, custom ai magento development, magento 2 hyva development, adobe commerce cloud ai, ai ecommerce magento, panth extensions

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance93

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~2 days

Recently: every ~13 days

Total

22

Last Release

36d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/343e344aa298f189db888b32d62f9202d31ced1a5ea23411850a63dc4a30299c?d=identicon)[kishansavaliya](/maintainers/kishansavaliya)

---

Top Contributors

[![KishanSavaliya](https://avatars.githubusercontent.com/u/16853223?v=4)](https://github.com/KishanSavaliya "KishanSavaliya (22 commits)")

---

Tags

automationaiclaudeanthropicmagento2natural-languagemagento2 modulepanth

### Embed Badge

![Health badge](/badges/mage2kishan-magento2-claude-ai/health.svg)

```
[![Health](https://phpackages.com/badges/mage2kishan-magento2-claude-ai/health.svg)](https://phpackages.com/packages/mage2kishan-magento2-claude-ai)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1131.9M16](/packages/mollie-magento2)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68357.9k](/packages/run-as-root-magento2-prometheus-exporter)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1011.8k26](/packages/loki-magento2-components)[buckaroo/magento2

Buckaroo Magento 2 extension

32420.3k8](/packages/buckaroo-magento2)[zwernemann/module-withdrawal

Magento 2 EU Withdrawal Button Module - Adds a withdrawal/revocation button for orders in compliance with EU Directive (EU) 2023/2673

256.0k2](/packages/zwernemann-module-withdrawal)[opengento/module-category-import-export

This module add the capability to import and export the categories from the back-office.

1310.9k2](/packages/opengento-module-category-import-export)

PHPackages © 2026

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