Magefan AI Agent for Magento 2 adds a dedicated AI chat to your admin panel, so you can manage store entities, get answers, and create custom reports on products, orders, customers, blog, CMS content and more without opening multiple separate tabs and grids. It connects your store with AI through a built-in Claude API and operates within existing user permissions (ACL).

In this guide, you'll learn how to configure Magefan AI Assistant and use AI chat to get answers and complete tasks within your admin panel.

Installation and Updates

Navigate to your Magefan account and use theMagefan extensions management guide to install the AI Agent for Magento admin.

General Settings

Navigate to Stores > Configuration > Magefan Extensions > AI Agent Client to configure the extension.

Server connection

These credentials automatically connect your store to the Claude AI service that powers the chat out of the box. You don't need to generate or enter them yourself.

  • API Key — issued automatically the first time any admin user opens the AI chat and sends a message.
  • Shared Secret — also issued automatically on first chat use, and used to sign requests between your store and the AI service.

ai agent server connection in magento

Note: both fields stay empty until the first AI chat message is sent, so these fields will be empty after installation.

Chat settings

These settings allow you to customise AI chat usage.

  • Custom System Prompt — optional instructions appended to the AI system prompt. Use this to adjust the AI assistant's behavior, tone, add store-specific context (e.g. your brand's terminology, policies, or how you name SKUs), or give it standing instructions you don't want to repeat in every conversation.
  • Max Messages Shown In Chat — the number of most recent messages loaded into the chat window. Default value is 200, maximum -1000. Older messages remain saved in the chat history but aren't loaded into view until you increase this value.

ai chat settings in magento

Security and Permissions

Once installed and connected, the AI agent doesn't have unlimited access. It works strictly within the existing permissions assigned for a specific admin user (Magento access control list) with additional security measures.

  • User-based permissions (ACL) — once each admin user starts using the AI chat, the extension creates a separate AI integration for each of them, based on that user's existing role permissions (in System > Extensions > Integrations).

ai agent integration magento

e.g. if a role restricts access to customers or orders in the admin grid, the AI Agent won't be able to view or perform any actions within those areas.

Note: you can restrict specific users' actions within the AI chat, in addition to the default ACL rules for this user, by editing the permissions in System > Extensions > Integrations > specific integration > API tab.

  • Request-based access — the AI Agent only views or edits data when you send a request in the chat. It doesn't run in the background, and it stops working the moment the chat window is closed.
  • Separate chats per user — every admin user has their own chat, chat history and templates. No admin user can see another user's conversations.

AI Chat

The AI Agent chat is available under Stores > AI Agent > Chat or Magefan > AI Agent > Chat. Open it, and you'll see your available capabilities, example prompts, and your conversation history.

Capabilities

The chat panel lists every admin area the AI Agent can work with.

Note: your user is limited to areas and actions allowed by your role. If any capability is missing from the list, it means your admin account doesn't have access to a corresponding admin sections.

  • Sales: Orders, Invoices, Shipments, Credit Memos
  • Catalog: Products, Categories
  • Customers: Customers, Customer Carts
  • Marketing: Cart Price Rules, Newsletter Subscribers
  • Content: CMS Pages & Blocks
  • Blog: Magefan Blog Posts, Blog Categories, Blog Tags, Blog Comments, Blog Authors
  • Reports: Reports
  • Support: Helpdesk Tickets, Knowledge Base
  • System: Cache & Indexer Management

Conversations

Once you open an AI chat, it starts a new conversation, but you can also do it mid-conversation by clicking New conversation in the bottom right corner of the chat window. 

Each admin user has their own separate AI chat, so you won't see conversations started by other admin users, and they won't see yours.

Magefan AI agent processes different types of requests and tasks, including view, edit, create, delete, report and analyze. So you can perform any tasks, from simple questions to multi-layer tasks.

magento ai agent questions

  • Questions — ask about any data within your store and get instant, data-backed answer (e.g. sales, top products, processing orders) without opening a single grid.
  • Actions — ask it to create, edit or delete an entity (e.g. "disable the Men's Sale category", "create a 20% coupon for wholesale customers", "cancel order #10123"). The AI Agent asks for confirmation, performs the action directly, and confirms the result in the chat.

Pro tip: you can refine a result with follow-up messages in the same conversation. For example, after asking for "top 10 best-selling products this month," you could follow up with "now compare them to last month" instead of writing a new prompt.

magefan ai chat follow up messages

Prompt examples

Now find examples of different requests you can test within the AI chat.

Quick answers

  • How many orders today?
  • What's the best-selling product this week?
  • List root categories
  • How many new newsletter subscribers since last week?

Reports and analytics

  • Sales summary last 7 days
  • Top 10 products this month by sales
  • Compare sales this month vs last month
  • Show order volume by week for the last quarter

Actions and updates

  • Create a new category called Summer Sale under Women's Clothing
  • Set up a 20% cart price rule for orders over $100
  • Publish a blog post about our new arrivals and tag it 'New Season'
  • Reindex the catalog after this product update

Multi-layer tasks

  • Find all pending orders from the last 3 days, then create shipments for the ones marked as paid
  • List low stock products, then draft a blog post announcing a restock
  • Check open helpdesk tickets from today and summarize what still needs a reply
  • Compare this month's sales to last month, then flag any product with a significant drop

Prompt Templates

Instead of retyping the same recurring request, you can create Prompt Templates and use them directly from the chat window. This is useful for regular questions or reports you generate, such as a monthly sales summary, a routine stock check, or your standard order management checklist.

magefan ai agent prompt templates

Create templates

The first option is to create template for recurring tasks from a separate panel. Navigate to Stores > AI Agent > Prompt Templates or Magefan > AI Agent > Prompt Templates and click Add New Template.

Then fill out the Name, Template Text, Sort Order and make the prompt Active

ai agent new prompt template magento

The other way is to save a prompt you type directly in AI Chat by clicking a corresponding option next to the prompt.

save ai chat prompts as templates magento

Here you just need to fill out the Name for the prompt you already typed and hit Save. This will add a prompt to the Templates panel.

save prompts from ai chat in magento

Note: create universal prompts with underscores for changing values e.g. from last month, last week, a day before, which you can fill out later.

Use templates

To use a saved prompt in AI chat, hit Templates right above the chat text field and choose a template you'd like to use.

use ai chat promt templates

Chat History

Click History to browse and reopen any previous conversations.

magento ai chat history

Note: if the conversation is too long, you'll only see messages limited by the Max Messages Shown In Chat option in the configuration. If you need to scroll back further, increase that limit.