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.7.8(1mo ago)112MITPHPPHP ~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 1w ago

READMEChangelogDependencies (9)Versions (21)Used By (0)

Magento 2 Automation with Claude AI — Run Your Store in Plain English | Panth Infotech
======================================================================================

[](#magento-2-automation-with-claude-ai--run-your-store-in-plain-english--panth-infotech)

[![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)[![Hyvä + Luma](https://camo.githubusercontent.com/79d5c9e312e394cab39ac098f009170efa55556aaf450c31f0720b63dfbc6484/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5468656d65732d4879762543332541342532302532422532304c756d612d313462386136)](https://hyva.io)[![Claude Opus 4.7](https://camo.githubusercontent.com/4f802d9139dc290d3bf0c69ccfb21d2d86bcdaf7bee43fee2f577ee4bf9b57e1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436c617564652d4f707573253230342e372d4439373735373f6c6f676f3d616e7468726f706963266c6f676f436f6c6f723d7768697465)](https://platform.claude.com)[![Tool Use](https://camo.githubusercontent.com/bbc6eeeb985e136d3fa82668656d482490f52defa339ad8550c941d6e8ef2dce/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f546f6f6c2532305573652d3139253230746f6f6c732d354235424436)](#tool-catalog--19-tools)[![Prompt Cache](https://camo.githubusercontent.com/f83277b2c9a54609ebe814fb87e4d064854d91f7f8e37b2dea84a9a77382200e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50726f6d707425323043616368652d456e61626c65642d323263353565)](https://docs.claude.com/en/docs/build-with-claude/prompt-caching)[![Packagist](https://camo.githubusercontent.com/d689691b11f2a3b0972124f055133f24cdf2d675d49c9865bc405981daa7585e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5061636b61676973742d6d616765326b697368616e2532466d6167656e746f322d2d636c617564652d2d61692d6f72616e67653f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/mage2kishan/magento2-claude-ai)[![GitHub](https://camo.githubusercontent.com/7c41c2ac9b976d8049bee2da989097430ef4cd2cd18b8c852b5ffaa14ce7301e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4769744875622d6d61676532736b2532466d6167656e746f322d2d636c617564652d2d61692d3138313731373f6c6f676f3d676974687562266c6f676f436f6c6f723d7768697465)](https://github.com/mage2sk/magento2-claude-ai)[![Upwork Top Rated Plus](https://camo.githubusercontent.com/6f72584179420c41ed90432fd2579a4ed36199d4229e8181d20f353c1c4ee4eb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5570776f726b2d546f702532305261746564253230506c75732d3134613830303f6c6f676f3d7570776f726b266c6f676f436f6c6f723d7768697465)](https://www.upwork.com/freelancers/~016dd1767321100e21)[![Panth Infotech Agency](https://camo.githubusercontent.com/401a792e990131002e91054d1b04494af5a2152fcc891ca000eb683786770abf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4167656e63792d50616e7468253230496e666f746563682d3134613830303f6c6f676f3d7570776f726b266c6f676f436f6c6f723d7768697465)](https://www.upwork.com/agencies/1881421506131960778/)[![Website](https://camo.githubusercontent.com/f1ae86d28e2b505aee60f240d3e5508e390b0a8dc7a9b7ecf1b450fad862053f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f576562736974652d6b697368616e736176616c6979612e636f6d2d304439343838)](https://kishansavaliya.com)[![Get a Quote](https://camo.githubusercontent.com/0b6c02cc1ad00f11bf1b0164a9998734bd716473db36cc2a5c1517e3d3578d1b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4765742532306125323051756f74652d46726565253230457374696d6174652d444332363236)](https://kishansavaliya.com/get-quote)[![License: MIT](https://camo.githubusercontent.com/5caa455d8debc46fb23abbadb45a733a937f3910a73fc875c2f7820468e1bb54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e)](LICENSE)

[![Magento 2 Claude AI integration for automation — natural-language admin assistant that manages products, orders, customers, CMS, configuration and inventory with one-click undo](docs/images/magento2-claude-ai-integration-for-automation.png)](docs/images/magento2-claude-ai-integration-for-automation.png)

> **Stop clicking through 12 admin screens. Just *ask*.***"Make every t-shirt $24.99"* · *"Disable products with no stock"* · *"Show me the 10 most recent orders"* · *"Create a Summer Sale CMS block"* · *"Reindex the catalog price index and flush the FPC"* · *"undo"*. Your **AI store manager**, sitting inside the Magento admin — built on Anthropic's [Claude Opus 4.7](https://platform.claude.com/) with **prompt caching, adaptive thinking, manual tool-use loop, dry-run safety, and one-click undo** on every bulk write.

**Magento 2 Automation with Claude AI** turns the admin into a conversational interface. The AI understands your catalog, customers, orders, CMS, configuration, and inventory — and runs the right operation at the right scope. Every destructive write snapshots the before-state into a *checkpoint* so a single click (or the word *"undo"*) reverses it. New installs ship in **dry-run** mode by default — the AI shows what it *would* change without touching the database, perfect for evaluation.

---

▶ Watch the 71-second demo
--------------------------

[](#-watch-the-71-second-demo)

[![Claude AI for Magento 2 — admin demo](docs/images/admin-dashboard-demo.gif)](docs/images/admin-dashboard-demo.gif)

> *Want the original 1080p MP4 with sound-stripped, branded encode for LinkedIn / Twitter / Facebook?* Grab `Claude-AI-Magento-2-Demo-Marketing.mp4` from the [GitHub Releases](https://github.com/mage2sk/magento2-claude-ai/releases) page.

---

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

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

> **Get a free quote for your project in 24 hours** — Claude / OpenAI / Gemini integrations, custom Magento modules, Hyvä themes, performance optimization, M1 → 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 • Hyvä 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)

- [Why this changes how you run your store](#why-this-changes-how-you-run-your-store)
- [Screenshots](#screenshots)
- [Highlights](#highlights)
- [What you can ask today](#what-you-can-ask-today)
- [Tool Catalog — 19 tools](#tool-catalog--19-tools)
- [How it works](#how-it-works)
- [Storefront Shop Assistant widget](#storefront-shop-assistant-widget)
- [Compatibility](#compatibility)
- [Installation](#installation)
- [Configuration — 6 groups, 25+ options](#configuration--6-groups-25-options)
- [Safety, Undo &amp; Dry-Run](#safety-undo--dry-run)
- [Training Examples — teach Claude your store](#training-examples--teach-claude-your-store)
- [Conversation History](#conversation-history)
- [Activity Log + Token Accounting](#activity-log--token-accounting)
- [Storefront / Marketing use cases — Lead generation, SEO, content](#storefront--marketing-use-cases--lead-generation-seo-content)
- [Security](#security)
- [Performance — Prompt caching cuts 80% of input cost](#performance--prompt-caching-cuts-80-of-input-cost)
- [CLI Reference](#cli-reference)
- [Adding a new tool](#adding-a-new-tool)
- [Architecture](#architecture)
- [Marketing assets — video, social posts, email blurb](#marketing-assets--video-social-posts-email-blurb)
- [Uninstall](#uninstall)
- [Changelog](#changelog)
- [Troubleshooting](#troubleshooting)
- [FAQ](#faq)
- [Support](#support)
- [About Panth Infotech](#about-panth-infotech)

---

Why this changes how you run your store
---------------------------------------

[](#why-this-changes-how-you-run-your-store)

The Magento admin was built for one persona: the trained merchandiser who knows where every grid lives. Real merchants don't fit that mould. They have ten things to do today and zero patience for "Catalog → Products → Filter SKU contains 'tee' → Mass Action → Update Attributes → Status → Disabled → Submit → Reindex → Flush Cache".

**Claude AI Automation collapses that entire flow into a sentence.** The same person who'd struggle to find the special-price field can now type *"Mark every t-shirt down to $19.99 until Monday"* and the AI:

1. Resolves *"every t-shirt"* into a catalog query against your live database
2. Previews the change (count + sample names) and asks for confirmation when it crosses your threshold
3. Snapshots before-state into a checkpoint
4. Runs the bulk update through Magento's official `ProductRepository`
5. Reindexes prices and flushes the right cache types
6. Replies in plain English with the exact count and an undo link

If anything's wrong, *"undo"* reverts it in one round-trip.

This is **not a wrapper around the REST API**. It's a manual tool-use loop that runs Magento's own service contracts, so every change is auditable, hookable, and indistinguishable from what a human admin would have done by hand.

---

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 &amp; Restore — one-click undo

[](#checkpoints--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 — 6 groups, 25+ options

[](#configuration--6-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 &amp; Retention + Credits[![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)---

Highlights
----------

[](#highlights)

🧠 **Plain-English chat**No SKU patterns, no JSON. The AI translates *"all t-shirts in Sale category"* → catalog query for you.🛠️ **19 tools, full Magento depth**Products, inventory, prices, statuses, categories, CMS pages, CMS blocks, customers, orders, store config, store logo, modules, raw read-only SQL — every common admin task has a tool.⏪ **Undo everything**Every bulk write snapshots before-state into a checkpoint. One-click rollback in admin or just say *"undo"*.🛡️ **Dry-run by default**New installs ship in safe mode — the AI shows what it WOULD change without touching data. Toggle off when ready.✋ **Confirmation gate**When a write affects more than your threshold (default 5 items), the AI must preview + wait for an explicit *"yes"* / *"go ahead"*.🎓 **Train your AI**Add few-shot examples (your store's slang, conventions, refusal patterns) → Claude follows your patterns, not its defaults.🛒 **Storefront widget**Read-only *Ask AI* shop assistant for shoppers. Drop into any CMS page or layout XML. Per-IP rate-limited.📁 **File uploads**Attach images, PDFs, spreadsheets to chat. Hardened (extension + MIME + magic-byte allowlists, `.htaccess` PHP-execution guard, sanitized filenames, 10 MB cap).🪵 **Activity log + custom logger**Every prompt, tool call, and reply persisted with timing + input/output/cache-read token counts. Tail `var/log/panth_claudeai.log` for ops.💬 **Conversation history**Multi-turn threads survive reloads. Switch between chats from the sidebar. View full transcripts (admin + assistant + tool messages) for compliance.⚙️ **6 config groups, 25+ options**Master switch, model selection (Opus 4.7 / Sonnet 4.6 / Haiku 4.5), effort level, dry-run, bulk caps, rate limits, per-tool toggles, retention windows.💸 **Prompt caching built in**System prompt + tool catalog + training examples are cached on Anthropic's side — repeat questions cost ~10% of the first one.💻 **CLI commands**`panth_claudeai:status`, `panth_claudeai:test-api`.⏰ **Cron cleanup**Nightly prune of old activity rows + expired checkpoints (configurable retention).---

What you can ask today
----------------------

[](#what-you-can-ask-today)

These all work out of the box on a fresh Luma sample-data install. Try them after you set your API key.

**Catalog &amp; inventory**

- *"How many products do I have?"*
- *"Find all products with the word 'hoodie' in the name"*
- *"Which products have less than 3 in stock?"*
- *"Make every t-shirt cost $24.99"* — previewed first, undoable
- *"Increase prices in the Sale category by 5%"* — previewed first, undoable
- *"Disable all products with no stock"* — undoable
- *"Set qty to 50 for SKU TEE-001"*
- *"Create a new simple product called 'Summer Tee', SKU SUM-001, price $29, qty 100, enabled"*

**Categories &amp; content**

- *"How many categories do we have? Also show the complete category structure"*
- *"Create a new category called 'Clearance' under Sale, position 100, active"*
- *"Find the 'Shipping &amp; Returns' CMS page and replace 'Tuesday' with 'Wednesday'"*
- *"Create a CMS block called summer-banner with H2 'Summer Sale - 30% off' and a link to /sale"*

**Customers &amp; orders**

- *"Show me the 10 most recent orders"*
- *"Which customers have spent more than $500 this year?"*
- *"How many orders are still on hold?"*
- *"Show me the last 5 orders for "*

**Store ops**

- *"Reindex the catalog price index and flush the full-page cache"*
- *"Set the default page title suffix to ' | Acme Store'"*
- *"Replace the store logo for the default store with the file I just attached"*
- *"List the third-party modules installed and their versions"*
- *"Run a SELECT against sales\_order to count orders by status this week"* — read-only, EXPLAIN-gated

**Insights**

- *"How much did I sell last month? What's the average order value?"*
- *"How does this week compare to the same week last year?"*
- *"Which categories have the most products but the fewest sales?"*

**Recovery**

- *"undo"* — reverts the last bulk write
- *"Open the Checkpoints page"* — admin-side rollback grid

---

Tool Catalog — 19 tools
-----------------------

[](#tool-catalog--19-tools)

Each tool can be **enabled/disabled individually** in admin → Configuration → Tool Capabilities. Disabled tools are removed from the AI's catalog *at API call time* — the AI literally can't see them, so it can't accidentally call them.

\#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/below a threshold7`manage_categories`WriteCreate / update / delete categories; show tree under any root with depth + product counts8`manage_cms_pages`WriteCreate / update / delete CMS pages; search-and-replace inside content9`manage_cms_blocks`WriteCreate / update / delete CMS static blocks10`customers`ReadSearch customers by email/name, spend totals, order counts, address summaries11`orders`ReadRecent orders, by status, by date range, by customer email12`store_insights`ReadCustomer count, order count by-status, average order value, recent 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` / `EXPLAIN`. Write SQL is hard-blocked at parser level.16`cache_reindex`WriteFlush specific cache types, run specific indexers, list available17`update_config`WriteUpdate `core_config_data` values (e.g. design / SEO / catalog) — checkpointed18`set_store_logo`WriteUpload + apply store logo from chat-attached file — checkpointed19`restore_checkpoint`WriteUndo any prior bulk write by checkpoint ID**Read tools** are safe to leave on — they don't mutate state. **Write tools** create a checkpoint *before* every change, so they're recoverable in one click. **Adding a new tool:** implement `Panth\ClaudeAi\Model\Tool\ToolInterface` and add one entry to `etc/di.xml`. The model receives the new schema on the next request — no restart needed.

---

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
        │  (system + tools + examples flagged cache_control = ephemeral)
        ├─ 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, status)
        ↓
Admin sees: "Updated 42 t-shirts to $24.99. Reply 'undo' to revert.
            Checkpoint: cp_a7b3c8e1d4f5..."

```

**Key design choices**

- **Manual loop, not Anthropic's auto-handler** — gives us per-step logging, dry-run interception, confirmation gating, and graceful degradation when a tool throws.
- **Tool catalog is per-request and per-config** — disabling a tool in admin removes it from the JSON sent to the API. The AI literally cannot call something you've turned off.
- **Checkpoints snapshot the *minimum* needed to undo** — for a price update, that's the old price per affected SKU. Storage is JSON in `panth_claudeai_checkpoint`, indexed by `created_at` so cleanup cron can prune efficiently.
- **Training examples are injected as cached system content**, not as user/assistant turns — this means they never blow out your context window and they participate in prompt caching.

---

Storefront Shop Assistant widget
--------------------------------

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

A read-only chatbot for your shoppers — answers product / store questions in plain English. The storefront catalog is restricted to `get_products` + `store_info` only via a DI virtualType; **writes are unreachable from outside admin**.

**Add via widget tool** (Content → Widgets → New) or layout XML:

```

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

```

The same widget renders inside the admin Dashboard — see screenshot above — so you can run quick queries without leaving your home screen.

---

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 — 2.4.8PHP8.1.x, 8.2.x, 8.3.x, 8.4.xMySQL8.0+MariaDB10.4+Search EngineElasticsearch 7/8, OpenSearch 1/2Hyvä Theme1.3+Luma ThemeNative supportAnthropic APIClaude Opus 4.7, Sonnet 4.6, Haiku 4.5Tested on:

- Magento 2.4.8-p4 with PHP 8.4 and Elasticsearch 8 (Hyvä 1.4.5)
- Magento 2.4.7 with PHP 8.3 and OpenSearch 2 (Luma)
- Magento 2.4.6 with PHP 8.2 and Elasticsearch 7 (Hyvä 1.3)

---

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

[](#installation)

### Composer (recommended)

[](#composer-recommended)

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

Then **Stores → Configuration → Panth Extensions → 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** which is roughly **5,000 questions** for a typical store thanks to prompt caching.

### 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=…
```

### Admin menu — Panth Infotech → Claude AI Automation

[](#admin-menu--panth-infotech--claude-ai-automation)

The menu surfaces seven pages:

- **AI Dashboard** — KPIs, quick-action prompts, recent activity table
- **Ask Claude** — the chat surface
- **How to Use** — 6-step plain-English onboarding (read this first if you're new)
- **Training Examples** — teach Claude your store's conventions
- **Conversations** — full transcript history with tokens + cost per chat
- **Activity Log** — granular audit trail of every prompt + tool call
- **Checkpoints &amp; Restore** — one-click undo for any bulk write
- **Configuration** — 6 config groups, 25+ options

---

Configuration — 6 groups, 25+ options
-------------------------------------

[](#configuration--6-groups-25-options-1)

**Stores → Configuration → Panth Extensions → Claude AI — Magento Automation**

GroupSettings**1. API Credentials**Anthropic API key (encrypted, stored via Magento's `Encrypted` backend model)**2. General Settings**Master switch · Claude model (Opus 4.7 / Sonnet 4.6 / Haiku 4.5) · Effort level (low → max) · Max output tokens per reply (default 15000) · Max tool calls per question (default 8) · API timeout seconds (default 120)**3. Safety****Dry Run mode** (default ON for new installs) · Max items per bulk action (default 500) · Admin rate limit per hour (default 60) · Require confirmation before writes (default Yes) · Confirmation threshold (default 5 items)**4. Tool Capabilities**Per-tool enable / disable for all 19 tools — toggled-off tools vanish from the AI's catalog at API call time**5. Storefront Shop Assistant**Enable widget · Per-IP rate limit · Max question length · Welcome text**6. Logging &amp; Retention**Activity log on/off · Activity retention days (default 90) · Checkpoint retention days (default 30) · Write to `var/log/panth_claudeai.log`All fields are **store-scoped where it makes sense** (model, effort, dry-run, widget config); auth + retention are global.

---

Safety, Undo &amp; Dry-Run
--------------------------

[](#safety-undo--dry-run)

This module is built on a *defense-in-depth* model — even if a single layer fails, the next one catches it.

### Layer 1 — Dry-Run mode (default ON)

[](#layer-1--dry-run-mode-default-on)

New installs ship with `Dry Run` ON. The orchestrator intercepts every write tool, runs the *resolution* phase (which products match, what would change), and returns a preview to the admin instead of calling the actual write. Output looks like:

```
[DRY-RUN] Would update 42 products to price $24.99.
Sample: Erika Running Shorts ($24.00 → $24.99), Aero Daily Fitness Tee ($29.00 → $24.99), …
Toggle Dry Run OFF in Configuration → Safety to apply changes for real.

```

### Layer 2 — Confirmation gate

[](#layer-2--confirmation-gate)

When `Require Confirmation` is on (default), any write affecting more than your threshold (default 5 items) makes the AI **stop and ask** for explicit `"yes"` / `"go ahead"` before proceeding. The conversation looks like:

```
You: Disable all products with zero stock
AI:  I found 73 products with zero stock. Want me to disable all of them?
     Reply "yes" to proceed or "no" to cancel.
You: yes
AI:  Disabled 73 products. Checkpoint cp_… (reply "undo" to restore).

```

### Layer 3 — Bulk-write hard cap

[](#layer-3--bulk-write-hard-cap)

Every write tool checks `Max Items per Bulk Action` (default 500) before running. If a query would touch more than the cap, the tool refuses and asks the AI to narrow the scope. This stops *"update everything"* mishaps even with confirmation off.

### Layer 4 — Auto-checkpoint

[](#layer-4--auto-checkpoint)

Even when 1-3 are bypassed (e.g. user explicitly turned everything off for a one-off bulk import), every write tool snapshots the affected rows' before-state into `panth_claudeai_checkpoint` *before* mutating. **One-click restore** from the Checkpoints &amp; Restore grid, or just say *"undo"* in chat.

### Layer 5 — Per-tool master switch

[](#layer-5--per-tool-master-switch)

Don't want the AI editing CMS pages? Toggle `manage_cms_pages` off in Tool Capabilities. The tool is removed from the catalog sent to the API — the AI cannot call it because it doesn't know it exists.

### Layer 6 — Read-only storefront catalog

[](#layer-6--read-only-storefront-catalog)

The storefront widget is wired to a separate DI virtualType (`Panth\ClaudeAi\Model\ToolRegistry\Storefront`) that only registers `get_products` + `store_info`. Even if a malicious shopper could craft a tool-use response (they can't — the model picks tools, not the user), there'd be nothing to call.

---

Training Examples — teach Claude your store
-------------------------------------------

[](#training-examples--teach-claude-your-store)

Add few-shot examples in **Panth Infotech → Training Examples** to teach Claude:

- **Your store's slang** — *"sweats" means hoodies + sweatpants in our catalog*
- **Refusal patterns** — *"never delete products, always disable instead — disabled is reversible from the storefront"*
- **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*, *Expected outcome*, Category, Sort Order, and Status. Active examples are **injected as cached system content** before every conversation — they never count against your context window after the first request.

[![Edit Training Example form](docs/images/admin-training-edit.png)](docs/images/admin-training-edit.png)

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

---

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

[](#conversation-history)

Every chat is persisted as a *conversation* — multiple admin turns + assistant turns + tool calls grouped together. The **Conversations** grid shows:

ColumnDescriptionStarted / Last activityConversation lifecycle timestampsFirst promptThe initial question (truncated)TurnsTotal messages in the conversationFilesAttachment countTokens (in/out)Total input + output tokens consumedTotal costUSD cost based on the model usedSurface`admin` or `storefront`ActionView → full transcript with all tool calls expandedUseful for compliance reviews (*who changed prices on Tuesday?*) and cost reporting (*how much did the AI cost us last month?*).

---

Activity Log + Token Accounting
-------------------------------

[](#activity-log--token-accounting)

The Activity Log captures **every step** — every API call, every tool execution, every result — so you can debug why the AI did or didn't do what you expected.

ColumnDescriptionWhenMicrosecond-precision timestampActor`admin` (you) · `assistant` (Claude) · `tool` (a tool execution)ActionTool name (e.g. `manage_products`) or `message`DetailTruncated prompt / result with hover-expandAffectedRow count for write toolsTokens (in / out)Input + output tokens for API stepsCostUSD cost for API stepsStatus`success` · `error` · `dry-run` · `cancelled`ConversationLink to the parent conversationCombined with prompt caching, the Tokens column makes it trivial to see when the AI is hitting the cache vs paying full price. A typical session: first question costs **~5,000 input tokens** (system + tools + examples + your prompt); subsequent questions in the same hour cost **~500 input tokens** — the system block stays cached.

---

Storefront / Marketing use cases — Lead generation, SEO, content
----------------------------------------------------------------

[](#storefront--marketing-use-cases--lead-generation-seo-content)

Beyond admin automation, the module unlocks high-value front-of-house workflows.

### 🪝 Lead generation

[](#-lead-generation)

Drop the **Shop Assistant widget** on a high-traffic CMS page or category and configure the welcome text to qualify leads:

```

  Building a wholesale order? Tell me your industry + monthly volume and I'll suggest a starter pack + connect you with our reps.

```

Every storefront conversation is logged with surface=`storefront` so you can pipe high-intent transcripts into your CRM via a custom observer on the `panth_claudeai_conversation_save_after` event.

### 🔍 SEO / content production at scale

[](#-seo--content-production-at-scale)

Ask Claude to **bulk-generate optimized meta titles and descriptions** for any subset of products:

> *"For every product in the 'Tees' category, generate a 50-60-character meta title that includes the brand and 'Free Shipping', and a 140-160-character meta description that includes the main fabric and one benefit. Save them to the products."*

The AI runs `get_products` → loops with `manage_products` write tool → snapshots a checkpoint per batch. Roll back with one click if you don't like the tone.

For category SEO:

> *"Rewrite the meta description for the 'Bottoms' category in a 130-character punchy sentence that mentions free shipping over $99 and our 30-day returns."*

For CMS content:

> *"Open the 'About Us' page, find the section starting with 'Founded in 2018' and rewrite it to a more conversational tone — 3 short paragraphs, max."*

### 📣 Marketing automation

[](#-marketing-automation)

> *"Create a CMS block called `summer-sale-banner` with an H2 'Summer Sale — 30% Off Everything' and a CTA button linking to /sale. Style classes: bg-red-600 text-white py-12."*

Then drop the block into your homepage layout — done in 8 seconds.

> *"Show me which categories have the most products but the fewest sales last 30 days — those are candidates for a promo."*

The AI runs `database_query` (read-only) and returns a sorted list. Decide your promo, ask the AI to apply it.

### 🛡️ Refusal training keeps the AI on-brand

[](#️-refusal-training-keeps-the-ai-on-brand)

Train your AI to refuse off-brand asks — *"never write product copy that mentions competitor brand X"*, *"never offer discounts greater than 25% without admin approval"* — by adding refusal-pattern training examples. The AI follows your guardrails in every future conversation.

---

Security
--------

[](#security)

- **API key encrypted** in `core_config_data` via Magento's `Encrypted` backend model.
- **Every admin controller has `ADMIN_RESOURCE`** — `Panth_ClaudeAi::chat`, `::training`, `::checkpoint`, `::config`. Create a custom admin role to scope access to specific surfaces.
- **CSRF guard** on file upload, **form-key validation** on chat send.
- **File upload hardened** — extension allowlist (`png|jpg|jpeg|gif|webp|pdf|csv|xlsx|xls|txt|md`), MIME allowlist, **magic-byte verification** on images, sanitised filenames with random suffix, **10 MB cap**, `.htaccess` drop disabling PHP execution in upload dir.
- **Storefront endpoint** — per-IP rate limit (default 30/hour), message length cap (default 1000 chars), conversation history cap (default 6 turns), **READ-ONLY tool catalog** wired via DI virtualType. Writes are unreachable.
- **Bulk-write hard cap** (default 500/call, configurable) prevents accidental whole-catalog mutations.
- **Auto-checkpoint** before every destructive write — defensive depth in case validation fails.
- **`database_query` is parser-gated** — `INSERT`, `UPDATE`, `DELETE`, `DROP`, `TRUNCATE`, `ALTER`, `GRANT`, `REVOKE`, `LOAD DATA`, `RENAME`, `CREATE`, `REPLACE` and stored-routine calls are rejected before reaching the DB.
- **Defensive logger** — failures in the logger never crash the chat loop.
- **No outbound traffic except to `api.anthropic.com`** — auditable in your egress firewall.

---

Performance — Prompt caching cuts 80% of input cost
---------------------------------------------------

[](#performance--prompt-caching-cuts-80-of-input-cost)

The module sends the system prompt + tool catalog + active training examples as a *single cached block* (Anthropic's `cache_control: { type: "ephemeral" }`). The cache lives **5 minutes** between requests; any request within the window pays the cached read price (10% of the regular input cost) instead of the full input cost.

A typical session:

RequestInput tokensCached readEffective cost (Opus 4.7)Cold start (first ever)52000$0.0782nd question, 30 s later54005000$0.0113rd question, 90 s later56005200$0.0124th, 4 min later (still warm)58005400$0.0125th, 6 min later (cache expired)60000$0.090Output tokens always pay full price — that's the AI's reasoning + reply.

**Net effect:** for an admin who asks 10-20 questions in a single sitting, average cost per question is ~**$0.01** on Opus 4.7. Switch to Sonnet 4.6 for ~$0.003/question, or Haiku 4.5 for ~$0.0006/question.

---

CLI Reference
-------------

[](#cli-reference)

```
# Show config + enabled tools + recent activity counts
bin/magento panth_claudeai:status

# Round-trip test against the API to verify your key + connectivity + model
bin/magento panth_claudeai:test-api

# Run the cleanup cron manually (prune old activity rows + expired checkpoints)
bin/magento cron:run --group=default
```

---

Adding a new tool
-----------------

[](#adding-a-new-tool)

```
namespace YourVendor\YourModule\Model\Tool;

use Panth\ClaudeAi\Model\Tool\ToolInterface;

class MyTool implements ToolInterface
{
    public function name(): string { return 'my_tool'; }

    public function definition(): array
    {
        return [
            'name' => 'my_tool',
            'description' => 'Be specific — the AI uses this to decide when to call you.',
            'input_schema' => [
                'type' => 'object',
                'properties' => [
                    'param' => ['type' => 'string', 'description' => 'A parameter'],
                ],
                'required' => ['param'],
            ],
        ];
    }

    public function execute(array $input): array
    {
        return [
            'status' => 'success',
            'affected_count' => 0,
            'summary' => 'Did the thing.',
        ];
    }
}
```

Register in `etc/di.xml`:

```

            YourVendor\YourModule\Model\Tool\MyTool

```

`bin/magento setup:di:compile && bin/magento cache:flush` — done. The model picks up the new schema on its next request.

---

Architecture
------------

[](#architecture)

FilePurpose`Model/ClaudeClient.php`Raw cURL transport against `/v1/messages`. Sets `cache_control` on system prompt for Anthropic prompt caching.`Model/Orchestrator.php`The tool-use loop. Logs every step. Injects training examples. Honours dry-run + confirmation gates.`Model/ToolRegistry.php`Holds registered tools, sorted by name for cache stability. Filters by per-tool config.`Model/ToolRegistry/Admin.php` + `/Storefront.php`DI virtualTypes — admin gets all 19 tools, storefront gets read-only subset.`Model/Tool/*.php`Each tool. Implements `ToolInterface`.`Model/CheckpointService.php`Snapshots state before destructive writes; restores on demand.`Model/TrainingRepository.php`Reads active examples to inject as cached few-shot context.`Model/Conversation/Repository.php`Multi-turn history persistence.`Model/Activity/Logger.php`Inserts into `panth_claudeai_activity`. Defensive — failures don't crash the loop.`Model/Stats.php`Computes the dashboard KPIs from the activity table.`Logger/Logger.php` + `Handler.php`Custom logger writing to `var/log/panth_claudeai.log`.`Block/Adminhtml/*`Admin view models.`Block/Widget/ShopAssistant.php`Storefront + admin Dashboard widget block.`Controller/Adminhtml/*`Admin endpoints (chat send, training CRUD, checkpoint restore, file upload, conversation view).`Controller/Assistant/Ask.php`Public storefront endpoint — restricted toolset, rate-limited.`Cron/Cleanup.php`Nightly housekeeping — prunes old activity + expired checkpoints.`Console/Command/StatusCommand.php``bin/magento panth_claudeai:status`.`Console/Command/TestApiCommand.php``bin/magento panth_claudeai:test-api`.**Database tables:**

- `panth_claudeai_activity` — every prompt, tool call, reply with token + timing + cost
- `panth_claudeai_training` — few-shot examples
- `panth_claudeai_checkpoint` — undo snapshots
- `panth_claudeai_attachment` — file uploads
- `panth_claudeai_conversation` — multi-turn threads

---

Marketing assets — video, social posts, email blurb
---------------------------------------------------

[](#marketing-assets--video-social-posts-email-blurb)

We ship a **branded, social-ready demo video** at `docs/marketing/` (and on the [GitHub Releases](https://github.com/mage2sk/magento2-claude-ai/releases) page) — 119-second 1280x720 H.264 with overlay branding, fade in/out, no audio. Drop it straight into LinkedIn / Twitter / Facebook / your homepage.

**Suggested LinkedIn caption** (copy-paste, edit to taste):

> Just shipped: Magento 2 admin you can run in plain English.
>
> No more clicking through 12 screens to bulk-update prices, disable out-of-stock products, or generate SEO meta. Just type what you want — Claude AI handles the rest, with one-click undo on every change.
>
> 19 tools · prompt caching · dry-run by default · open source under MIT.
>
> Built on @AnthropicAI Claude Opus 4.7. Compatible with Magento 2.4.4 — 2.4.8, Hyvä, and Luma.
>
> Try it: github.com/mage2sk/magento2-claude-ai
>
> \#magento #ecommerce #ai #claudeai #anthropic #hyva #adobecommerce

**Suggested email blurb:**

> Magento 2 just got an AI store manager. Type *"Make every t-shirt $24.99"* into the admin and 4 seconds later 42 products are updated, with a one-click undo if you change your mind. 19 tools. Free + open source. Built on Anthropic's Claude.
>
> → kishansavaliya.com

---

Uninstall
---------

[](#uninstall)

```
bin/magento module:disable Panth_ClaudeAi
composer remove mage2kishan/magento2-claude-ai
bin/magento setup:upgrade
```

The five `panth_claudeai_*` tables are dropped automatically by `setup:upgrade` once the module is removed (declarative schema). Your activity history, checkpoints, training examples, and conversations are erased — export anything you want to keep first.

---

Changelog
---------

[](#changelog)

### 1.7.6

[](#176)

- **New:** `manage_cms_blocks` and `manage_cms_pages` tools — full CRUD over CMS content from chat.
- **New:** `set_store_logo` tool — upload + apply store logos from chat-attached files, fully checkpointed.
- **Improvement:** confirmation gate threshold is now configurable (was hard-coded at 1).
- **Fix:** `update_config` now writes scope-correctly when scope\_id is provided in the prompt.

### 1.7.0

[](#170)

- **New:** Conversations grid + per-conversation transcript viewer with token + cost columns.
- **New:** Storefront Shop Assistant widget — Knockout (Luma) + Alpine (Hyvä) templates.
- **Improvement:** training examples now seeded with 11 production-quality starters covering pricing, inventory, refusal patterns, sales insights, and category/page management.

### 1.6.0

[](#160)

- **New:** `database_query` tool — read-only SQL with parser-level write blocking.
- **New:** `get_modules` tool — list installed third-party modules from chat.
- **Improvement:** moved system prompt + tool catalog + training examples into a single `cache_control` block — cuts repeat-question input cost by ~90%.

### 1.5.0

[](#150)

- **New:** `manage_categories` and `manage_products` tools — full CRUD on categories and products (including configurable + virtual + downloadable types).
- **New:** Per-tool toggles in admin Configuration — disabled tools removed from API catalog at request time.

### 1.4.0

[](#140)

- **New:** Confirmation gate — writes affecting more than the threshold pause for explicit approval.
- **New:** Bulk-write hard cap — refuses to call write tools that would touch more than the configured max.
- **New:** Custom logger to `var/log/panth_claudeai.log` for ops + grep-friendly diagnostics.

### 1.3.0

[](#130)

- **New:** Checkpoints + Restore — every write tool snapshots before-state; one-click + voice undo.
- **New:** Activity log with token accounting + cost-per-request.

### 1.2.0

[](#120)

- **New:** Training examples (few-shot) injected as cached system content.
- **New:** File uploads — images / PDFs / spreadsheets — hardened with extension + MIME + magic-byte allowlists.

### 1.1.0

[](#110)

- **New:** Dry-Run mode (default ON for new installs) — preview changes before applying.

### 1.0.0

[](#100)

- Initial release: 6 tools (`get_products`, `update_product_price`, `update_product_status`, `update_inventory`, `low_stock`, `store_info`) + manual tool-use loop.

---

Troubleshooting
---------------

[](#troubleshooting)

IssueCauseResolution*"API key invalid"*Missing or wrong keyRe-paste key from [console.anthropic.com](https://console.anthropic.com), `bin/magento cache:flush`Chat returns *"Tool not available"*Tool toggled off in Configuration → Tool CapabilitiesRe-enable it and `bin/magento cache:flush config`AI *previews* but never writesDry Run is ON (default for new installs)Configuration → Safety → Dry Run Mode = NoBulk update gets capped at 500`Max Items per Bulk Action` reachedRaise the cap in Configuration → Safety, or narrow the prompt scope*"Confirmation required"* loop`Require Confirmation` is on, threshold reachedReply `yes` / `go ahead` to proceed, or lower the threshold for trusted opsStorefront widget returns 429Per-IP rate limit hitConfiguration → Storefront Shop Assistant → raise rate limit, or wait 1 hour`panth_claudeai.log` grows unboundedLogger enabled with no rotationAdd `var/log/panth_claudeai.log` to your `logrotate.d` config — example provided in `docs/logrotate-example.conf`API timeouts on Opus 4.7Long generations exceed default timeoutConfiguration → General Settings → API Timeout → raise to 180*"Cache miss"* on every requestLess than 5 min between requests but cache expired anywayConfirm system prompt isn't being mutated per-request — check Activity Log `cache_read_tokens` columnFile upload rejected as *"unsafe MIME"*Magic bytes don't match extensionThis is intentional — try re-saving the file from a known editorEnable `bin/magento deploy:mode:set developer` and tail `var/log/panth_claudeai.log` for diagnostic output.

---

FAQ
---

[](#faq)

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

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

**Yes — that's 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, and confirmation is required for anything above your threshold. We recommend a 1-week dry-run period on production before flipping the switch.

### Which Claude model should I pick?

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

- **Opus 4.7** — most capable, best for complex multi-step reasoning (*"find slow movers in the Sale category that haven't been discounted yet, then bulk-apply a 20% catalog rule"*). ~$0.01/question with caching.
- **Sonnet 4.6** — 95% as smart at 1/3 the price. Recommended default for most stores. ~$0.003/question.
- **Haiku 4.5** — fastest + cheapest. Great for simple lookups + storefront widget. ~$0.0006/question.

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

### Will it work with a custom theme / Hyvä / page-builder?

[](#will-it-work-with-a-custom-theme--hyvä--page-builder)

**Yes.** The admin chat is theme-independent — it lives at `panth_claudeai/chat/index`. The storefront widget ships both a Luma (Knockout) template and a Hyvä (Alpine.js + Tailwind) template, picked up automatically based on the active frontend theme.

### Does it support multi-store / multi-website?

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

**Yes.** Tools that write to scoped data (`update_config`, `manage_cms_pages`, `manage_cms_blocks`, `set_store_logo`) accept a `scope` + `scope_id` parameter the AI fills in based on your prompt. *"Set the page title suffix for store view es-mx to ' | Acme México'"* — 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. Disable the entire `Panth_ClaudeAi::price` ACL resource for the relevant admin role.
3. Add a refusal training example: *"never change prices without explicit confirmation from the admin user"*.

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

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

**No.** Single egress endpoint. Auditable in your firewall — allowlist `api.anthropic.com:443` and you're done.

### How does prompt caching work?

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

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

### Can I export conversations / activity for compliance?

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

**Yes.** The Conversations grid has *Export → CSV / XLSX* (UI-component grid). Activity Log too. For programmatic export, query the `panth_claudeai_activity` and `panth_claudeai_conversation` tables directly — both have `created_at` indexes.

### Does it work with Adobe Commerce Cloud?

[](#does-it-work-with-adobe-commerce-cloud)

**Yes** — composer-installable, no native dependencies, no shell-execs, deploy-mode-aware. Tested on Cloud Pro + Starter.

### What happens if Anthropic is down?

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

The chat returns a clear error to the admin, the activity row is logged with `status=error`, and the orchestrator does **not** retry indefinitely (would burn API credit). Default timeout is 120 s. The store itself is unaffected — Claude AI is purely additive.

### Can I run my own model (e.g. local Llama / Mistral) instead?

[](#can-i-run-my-own-model-eg-local-llama--mistral-instead)

**Not out of the box.** The orchestrator is built around Anthropic's tool-use schema. A future *Provider* abstraction is on the roadmap — open an issue if this is a blocker.

### Is the storefront widget GDPR-compliant?

[](#is-the-storefront-widget-gdpr-compliant)

The widget logs the question + IP for rate limiting + abuse detection. **No third-party trackers, no cookies set by us** (Anthropic doesn't get end-user IPs — only your server IP). For GDPR, add a one-line disclosure to your widget's welcome text and you're set.

### Is the source code available?

[](#is-the-source-code-available)

**Yes.** Open source under [MIT licence](LICENSE), full source on GitHub at [github.com/mage2sk/magento2-claude-ai](https://github.com/mage2sk/magento2-claude-ai). PRs welcome.

---

Support
-------

[](#support)

ChannelContactEmailWebsite[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/)Packagist[mage2kishan/magento2-claude-ai](https://packagist.org/packages/mage2kishan/magento2-claude-ai)Response time: 1–2 business days.

### 💼 Need Custom Magento + AI Development?

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

Looking for **custom Claude / OpenAI integration**, **Hyvä theme customization**, **store migrations**, or **performance optimization**? 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/) [ ![Visit Website](https://camo.githubusercontent.com/7455559317a374eb3eb536c5ea201ca2c2a29bc13d82cc127278975a680d552c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5669736974253230576562736974652d6b697368616e736176616c6979612e636f6d2d3044393438383f7374796c653d666f722d7468652d6261646765) ](https://kishansavaliya.com)

**Specializations:**

- 🤖 **AI-Powered eCommerce** — Claude / OpenAI / Gemini integration for content, search, recommendations, automation
- 🛒 **Magento 2 Module Development** — custom extensions following MEQP standards
- 🎨 **Hyvä Theme Development** — Alpine.js + Tailwind CSS, lightning-fast storefronts
- 🖌️ **Luma Theme Customization** — pixel-perfect designs, responsive layouts
- ⚡ **Performance Optimization** — Core Web Vitals, page speed, caching strategies
- 🔍 **Magento SEO** — structured data, hreflang, sitemaps, AI-generated meta
- 🛍️ **Checkout Optimization** — one-page checkout, conversion rate optimization
- 🚀 **M1 to M2 Migrations** — data migration, custom feature porting
- ☁️ **Adobe Commerce Cloud** — deployment, CI/CD, performance tuning
- 🔌 **Third-party Integrations** — payment gateways, ERP, CRM, marketing tools

**Industries served:** Fashion &amp; Apparel, Electronics, Health &amp; Beauty, Food &amp; Beverage, Home &amp; Garden, B2B Wholesale, Multi-vendor Marketplaces.

---

License
-------

[](#license)

Released under the [MIT License](LICENSE) — free for commercial use, no per-store fees, no attribution required (but appreciated).

---

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

[](#about-panth-infotech)

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

**Panth Infotech** is a Magento 2 development agency specializing in high-quality, security-focused extensions and themes for both Hyvä and Luma storefronts — and increasingly, **AI-augmented commerce tooling**. The Panth extension suite covers SEO, performance, checkout, product presentation, customer engagement, store management, and now AI automation — **34+ modules** built to MEQP standards and tested across Magento 2.4.4 to 2.4.8.

Browse the full extension catalog on [Packagist](https://packagist.org/packages/mage2kishan/) or the [Adobe Commerce Marketplace](https://commercemarketplace.adobe.com).

### Quick Links

[](#quick-links)

- 🌐 **Website:** [kishansavaliya.com](https://kishansavaliya.com)
- 💬 **Get a Quote:** [kishansavaliya.com/get-quote](https://kishansavaliya.com/get-quote)
- 👨‍💻 **Upwork Profile (Top Rated Plus):** [upwork.com/freelancers/~016dd1767321100e21](https://www.upwork.com/freelancers/~016dd1767321100e21)
- 🏢 **Upwork Agency:** [upwork.com/agencies/1881421506131960778](https://www.upwork.com/agencies/1881421506131960778/)
- 📦 **Packagist:** [packagist.org/packages/mage2kishan](https://packagist.org/packages/mage2kishan/)
- 🐙 **GitHub:** [github.com/mage2sk](https://github.com/mage2sk)
- 🛒 **Adobe Marketplace:** [commercemarketplace.adobe.com](https://commercemarketplace.adobe.com)
- 📧 **Email:**
- 📱 **WhatsApp:** +91 84012 70422

---

 **Ready to put an AI store manager inside your Magento admin?**
 [ ![Get Started](https://camo.githubusercontent.com/66dee04430af977df988ac18454416f2f08a5169868a0d0689061b7e8db6f8ca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f254630253946253941253830253230476574253230537461727465642532302545322538362539322d4672656525323051756f7465253230696e2532303234682d4443323632363f7374796c653d666f722d7468652d6261646765) ](https://kishansavaliya.com/get-quote)

---

**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 checkpoint undo, magento 2 ai dry run, magento 2 ai marketing, magento 2 ai seo, magento 2 ai content generation, magento 2 ai meta description, magento 2 ai category 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, manual tool loop magento, magento 2 ai backend, magento 2 ai admin, magento 2 ai integration, hyva claude ai, luma claude ai, hyva ai chatbot, luma ai chatbot, magento 2 ai extension, magento 2 ai module, magento 2 lead generation widget, magento 2 ai shop by ai, magento 2 ai voice undo, magento 2 ai role permission, magento 2 meqp ai module, magento 2.4.8 ai module, magento 2.4.7 ai module, php 8.4 magento ai module, panth claude ai, panth infotech, mage2kishan, mage2sk, kishan savaliya, top rated plus upwork magento, hire magento ai developer, hire ai magento developer, custom ai magento development, magento 2 hyva development, magento 2 luma customization, magento 2 performance optimization, magento 2 SEO services, adobe commerce cloud magento, magento 2 checkout optimization, ai ecommerce magento, magento freelancer india, panth extensions

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance91

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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

Total

20

Last Release

41d 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 (20 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.8M12](/packages/mollie-magento2)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

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

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

1010.0k22](/packages/loki-magento2-components)[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)[mage-os/module-inventory-reservations-grid

Add a grid with the list of inventory reservations.

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

PHPackages © 2026

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