makes your store discoverable and shoppable by AI agents such as ChatGPT, Claude, Gemini and AI browsers. It enables UCP profile, agents.md and agent block in robots.txt so agents can find your store, search the catalog, create carts and read your store policies through an MCP server or a JSON API.
This guide explains how to install the extension, configure discovery, agent API, agent carts and checkout, WebMCP, store policies and security, test your store like an AI agent, and read the Agentic Commerce dashboard and reports.
Installation
You can find Composer installation instructions in your Magefan Account > Downloads under the Install via Composer option. To install the extension from an archive and get details on the installation, follow the Magefan extensions installation guide.
Once the extension is installed, follow these steps to make your store available to AI agents with the default settings.
- Navigate to Stores > Configuration > Magefan Extensions > Agentic Commerce, Enable the extension and enter a Product Key from your Magefan account.
- Select your return, shipping, terms and privacy CMS pages in the Store Policies group, so agents answer questions about your policies correctly.
- Save the config and flush the cache.
- Generate the llms.txt file in Stores > Configuration > Magefan Extensions > LLMs.txt > Generation Settings with the Generate LLMs.txt button.
- Go to Marketing > Agentic Commerce > Dashboard and click Run test to check your store like an AI agent and see what it can and can't read.
- Connect an AI assistant in Claude or ChatGPT, add a custom connector with your MCP server URL, e.g.https://example.com/agent/mcp, and ask it to find a product in your store. The AI agent requests will appear on the dashboard.
To configure the extension, go through the sections below.
Agentic Shopping Tools
Agentic Commerce exposes your store to AI agents in different layers, which allow them to read your policies, access catalog, prepare carts and make purchases. You can switch each layer on or off in the configuration. A disabled endpoint returns 404.
- Discovery — agents find out what your store offers from the UCP merchant profile at /.well-known/ucp, /agents.md, the agent block in robots.txt and the agent discovery sitemap at /sitemap_agentic_discovery.xml.
- Catalog access — AI assistants connect to the MCP server at /agent/mcp and use its tools (search_catalog, lookup_catalog, get_product, get_store_policies). Other agents read the public JSON API: /agent/products.json, /agent/products/{url_key}.json, /agent/collections/{url_key}/products.json, /agent/search.json and /agent/policies.json.
- Purchase — two ways to sell through an agent:
- Agent Cart (enabled by default) — the agent builds a cart with the create_cart, get_cart, update_cart and cancel_cart tools and gives the shopper a cart link. The shopper opens it, the cart moves into their session, and they pay on your regular checkout.
- Agent Checkout (disabled by default) — UCP platforms such as Google AI Mode and Gemini collect the shipping address and shipping method from the customer, and allow customers to pay with Google Pay and place the order without leaving the conversation.
- WebMCP — AI browser agents that visit your storefront get in-page tools and tagged forms, so they can search, add to cart and read policies while on the page.
Note: agents only receive enabled, visible, in-stock products.
General Settings
Navigate to Stores > Configuration > Magefan Extensions > Agentic Commerce to configure the extension. You can also open this page from Marketing > Agentic Commerce > Configuration. Most configuration options can be set per website and store view, with the Security and Agent Activity groups set to global.
Discovery
Discovery settings help AI agents find your store and learn which agent endpoints it supports.
- Enable UCP merchant profile (/.well-known/ucp) — enables the Universal Commerce Protocol profile with the MCP server, capabilities (catalog, cart and checkout), payment handles and public signing key.
- Enable agents.md — serves /agents.md with the same content as /llms.txt, generated by Magefan LLMs.txt. An "AI Agents" section listing the agent endpoints is added to both files.
- Add Agent Block to robots.txt — adds links to the UCP profile, agents.md, the MCP server and the agent discovery sitemap to robots.txt.
- Enable Agent Discovery Sitemap — serves /sitemap_agentic_discovery.xme immediately based on the default sl listing all agent endpoints.
With the robots.txt option enabled, Magento adds a block like this to your robots.txt:
# AI agents (Agentic Commerce) # UCP profile: https://example.com/.well-known/ucp # Agent instructions: https://example.com/agents.md # MCP server: https://example.com/agent/mcp Sitemap: https://example.com/sitemap_agentic_discovery.xml
Note: If your robots.txt is a static file in the web root or is served by a CDN, the extension can't change it.
![]()
Agent API
Agent API settings switch on the MCP server and the public JSON API that AI agents use to read your catalog.
- Enable MCP Server — serves the Model Context Protocol server at /agent/mcp. AI assistants (Claude, ChatGPT and others) connect to it to search your catalog and build carts.
- Enable Public JSON API — serves the read-only catalog endpoints /agent/products.json, /agent/products/{url_key}.json, /agent/collections/{url_key}/products.json, /agent/search.json and /agent/policies.json.
- Description Attributes — product attribute codes used as the product description for agents, comma-separated, in priority order. The first non-empty value is used.
- Shared Cache TTL (seconds) — how long proxies, a CDN or Full Page Cache may cache public agent JSON responses. 0 disables shared caching.
The JSON product list accepts the parameters q, category, price_min, price_max, sort, page and limit. The /agent/search.json requires query and accepts the same filters. A product detail URL also accepts the product ID or SKU instead of the URL key.
Pro tip: If your description attribute holds long HTML or page builder content, put short_description first in Description Attributes section, e.g. short_description,description, so agents get a short and clean summary.
![]()
Agent cart
Agent Cart lets AI agents create carts through the MCP server and create a cart link to the shopper, who completes the purchase on your checkout as they're used to.
- Enable Agent Cart — allows AI agents to create carts through the MCP server.
- Cart Lifetime (hours) — agent carts that are not converted into an order expire after this time.
- Continue URL Landing Page — where the shopper lands after opening the cart link from the AI agent.
The cart link has the form /agent/cart/{cart_id}. When the shopper opens it, the agent cart moves into their session, and they're redirected to the selected page.
![]()
Agent checkout (UCP)
Agent Checkout lets AI platforms that support UCP checkout, such as Google AI Mode and Gemini, collect the shipping address and shipping method and place the order in the conversation. Enabling it adds the checkout REST API at /agent/ucp and the create_checkout, get_checkout, update_checkout, complete_checkout and cancel_checkout MCP tools to the UCP profile.
- Enable Agent Checkout — switches agent checkout on or off.
- Checkout Session Lifetime (hours) — checkout sessions that are not completed expire after this time.
- Require Signed Requests — when enabled, checkout requests are accepted only if they carry an RFC 9421 signature made with a key from the platform's UCP profile. Signatures that are present are always verified.
![]()
Google Pay
When UCP checkout is enabled, Google AI Mode and Gemini pay with Google Pay and place the order. The card is charged through the payment processor. Without it, buyers finish the payment on your store.
- Accept Google Pay — enables Google Pay for UCP checkout.
- Google Pay Environment — Test or Production. Use Test until Google approves your Google Pay production access.
- Google Pay Merchant ID — the merchant ID from the Google Pay & Wallet Console.
Important: Google Pay is not offered to agents until you set up the Google Pay and wallet.
- Merchant Name — the name shown to buyers in Google Pay. Leave empty to use the store name.
- Card Networks — the cards you accept: American Express, Discover, JCB, Mastercard, Visa.
- Payment Processor — Stripe or Braintree. The processor uses the API keys and mode from its own payment extension settings in Sales > Payment Methods.
- Braintree Tokenization Key — required for Braintree. Find it in the Braintree Control Panel under Settings > API > Tokenization Keys. Use the key of the same environment (sandbox or production) as the Braintree payment method.
Important: Google Pay in Agent Checkout needs the official Stripe (stripe/module-payments) or Braintree (paypal/module-braintree-core) payment module installed and configured. For Braintree, Google Pay must also be enabled in Settings > Processing of the Braintree Control Panel.
Note: Google requires Terms & Conditions and Privacy Policy pages for checkout in the conversation, so select both in Store policies before you enable Agent Checkout.
A UCP checkout session goes through these statuses:
- Incomplete — information is missing, and the response tells the platform what to add (e.g. the shipping address).
- Ready for complete — the address and a Magento shipping rate are set, and the session can be paid.
- Requires escalation — the buyer finishes on your store through the continue URL, e.g. when the card needs 3-D Secure or Google Pay is not available.
- Completed — the payment went through, and the Magento order is placed.
- Canceled — the platform cancelled the session.
To protect your payment account, after 3 failed payments on one checkout, 10 from one client IP or 50 on the store within an hour, new attempts are not charged, and the checkout goes to Requires escalation.
![]()
WebMCP for AI browser agents
WebMCP registers in-page tools for AI browser agents and marks your storefront forms with declarative WebMCP attributes. The Google Lighthouse "Agentic Browsing" audit checks for them.
- Enable WebMCP — switches the in-page tools and form attributes on or off.
- WebMCP Output Limit (characters) — the maximum length of one WebMCP tool result. Longer results are shortened to keep the agent context small.
See WebMCP on the Storefront for the list of tools and forms.
![]()
Store policies
Store Policies share the selected CMS pages with AI agents, so they can answer questions about returns, shipping and terms with your actual wording. Agents read them through the get_store_policies MCP tool, /agent/policies.json and the "Store Policies" section of llms.txt and agents.md.
- Return & Refund Policy Page — the CMS page with your return and refund terms.
- Shipping Policy Page — the CMS page with shipping methods, costs and delivery times.
- Terms & Conditions Page — the CMS page with your terms of sale.
- Privacy Policy Page — the CMS page with your privacy policy.
Note: both terms and conditions and your privacy policies are required for Agentic checkout.
- FAQ Page — the CMS page with answers to common shopper questions.
![]()
Security
Security settings limit how often one client can call the agent endpoints, which websites may call the MCP server from a browser, and how your store signs its responses.
- Rate Limit (requests per minute) — the maximum number of requests per minute from one client IP to all agent endpoints. Exceeding it returns 429 Too Many Requests.
- New Carts per Hour — the maximum number of new agent carts and checkouts per hour from one client IP. Each one creates a Magento quote, so the limit stops bots from filling the database.
- Allowed Browser Origins — extra websites allowed to call the MCP server from a browser, one per line, e.g. https://app.example.com. The MCP server rejects browser requests from other websites (Origin header) to prevent DNS rebinding. Your store URLs are always allowed.
- Response Signing Key — shows the status of the key that signs MCP responses with an RFC 9421 HTTP Message Signature (ES256), e.g. "Active. Key ID: … Created: … UTC." The public key is published in /.well-known/ucp, so agents can verify that responses come from your store. Click Regenerate to create a new key.
Note: Behind a proxy or CDN, make sure Magento sees the real client IP, otherwise all clients share one limit. AI platforms send many users from shared IPs, so raise New Carts per Hour if real agents get "Too many new carts".
Important: A regenerated key replaces the current one. Agents that cached the old public key fail to verify signatures until they reload /.well-known/ucp.
![]()
Agent activity
Agent Activity settings control the recording of agent requests for the reports in Marketing > Agentic Commerce. No shopper personal data is stored.
- Record Agent Activity — enables or disables recording for the Dashboard, Agents, Searches, Agent Carts, Agent Orders and Activity Log reports.
- Keep Activity For (days) — how long the raw Activity Log entries are stored.
Note: The dashboard and the Agents and Searches reports read daily totals, which are kept for two years regardless of this setting.
![]()
llms.txt and agents.md
Agentic Commerce comes with , which generates the /llms.txt file that /agents.md also serves. The Agentic Commerce extension adds two sections to both files: "AI Agents", with the agent endpoint URLs, and "Store Policies", with the pages you selected in Store policies.
Navigate to Stores > Configuration > Magefan Extensions > LLMs.txt to set the company information, choose which categories, products, CMS pages and Magefan Blog content to include, add custom content and schedule the generation. Click Generate LLMs.txt in Generation Settings to create the file immediately based on your current settings.
Note: to include or exclude a single product, category, CMS page or blog entity, open it in the admin and change Generative Engine Optimization > Include in LLMs.txt from Use Config Settings to Yes or No.
For a description of every option, see the LLMs TXT Generator User Guide.
![]()
Test Agent in the Admin
Test with an agent requests your store's public agent endpoints the way an AI agent does and shows a pass, warning or fail result for each check, with how to fix it. No payment is made, test carts are deleted, and the test calls are not added to the reports.
- Navigate to Marketing > Agentic Commerce > Dashboard.
- Select the store view in the Store View filter if you run several stores.
- Click Run test in the Test with an agent block and wait for the summary.
The test runs these checks:
- Extension enabled — Agentic Commerce is enabled for the store view.
- Store reachable by agents — /.well-known/ucp returns a UCP profile and the store uses HTTPS.
- MCP server — the MCP server answers and lists its tools.
- Product search — search_catalog finds an in-stock product.
- Product details — get_product returns the product with its variants.
- Agent cart — create_cart creates a cart with a cart link for the shopper.
- Store policies — policy pages are selected, including the ones Agent Checkout requires.
- agents.md and llms.txt — /agents.md is available.
- robots.txt — robots.txt contains the agent block.
- Agent checkout — a test checkout gets a shipping rate for a US test address (Springfield, IL) and reaches the ready-to-pay status with Google Pay, without charging.
- Response signing — a signing key exists and responses are signed.
- Magento cron — the time of the last cron run.
Checks for disabled features are skipped.
![]()
Agentic Commerce Dashboard
The Agentic Commerce dashboard shows how AI agents use your store: requests, carts, orders and revenue for a period, compared with the previous period of the same length.
Navigate to Marketing > Agentic Commerce > Dashboard. Pick a period with Today, Last 7 days, Last 30 days or Last 90 days, or set From and To dates, choose a Store View and click Apply.
The dashboard contains:
- Agent requests — all calls to agent endpoints.
- Unique agents — distinct agent identities: the UCP platform profile, the MCP client name or the user agent.
- Carts created — carts built by agents.
- Orders — orders placed from agent carts and checkouts.
- Revenue — the base grand total of those orders.
- Cart to order — orders per created cart.
- Agent requests per day — a bar chart, hover a day to see its requests, errors, carts and orders.
- Funnel — how many agent sessions Searched, Viewed a product, Built a cart, Opened the cart link and Placed an order, with the conversion between cart steps. The number of discovery requests (UCP profile, agents.md, sitemap) is shown below.
- Top agents — the most active agents with their requests, carts, orders and revenue.
- Top searches and Searches without results — what agents searched for, and what they asked for that your catalog didn't have.
- Endpoints — requests and errors per channel and tool or endpoint.
Until the first agent connects, the dashboard shows No agent activity yet with your MCP server URL to add as a custom connector in Claude or ChatGPT.
Note: Access to the dashboard and reports is controlled by the Marketing > Agentic Commerce > Agent Activity ACL resource in System > Permissions > User Roles.
![]()
Agent Activity Reports
Agent Activity reports are admin grids with the details behind the dashboard. Every grid has a Store View filter, column controls and CSV export.
Agents report
The Agents report shows the activity of each AI agent. Navigate to Marketing > Agentic Commerce > Agents.
- Agent — the UCP platform profile URL, the MCP client name or the user agent.
- Requests, Searches, Carts, Orders — the agent's totals for the period.
- Revenue — the total of the agent's orders.
- Cart to Order, % — the share of the agent's carts that became orders.
- Errors — failed requests.
- Period — filter the report by date range.
![]()
Searches report
The Searches report lists the queries AI agents sent to your catalog. Navigate to Marketing > Agentic Commerce > Searches.
- Query — the search text.
- Searches — how many times agents searched for it.
- Results — the largest number of products found.
- Searches Without Results — how many of these searches found nothing.
- Found Products — filter by queries that found or didn't find products.
- Period — filter the report by date range.
Pro tip: Filter by Found Products to see the products agents ask for that your catalog lacks, then add them or improve your product names and search terms.
![]()
Agent carts report
The Agent Carts report lists every cart and checkout session created by AI agents. Navigate to Marketing > Agentic Commerce > Agent Carts.
- ID and Cart / Checkout ID — the internal ID and the ID the agent uses.
- Type — Cart (Agent Cart) or Checkout (Agent Checkout).
- Agent — the agent that created it.
- Status — for carts: Open (agent), Opened by shopper, Ordered, Canceled or Expired. For checkouts: Checkout: Incomplete, Checkout: Ready for Payment, Checkout: Payment in Progress, Checkout: Continued on Store or Checkout: Completed.
- Store View, Created, Opened by Shopper, Expires — where and when the cart was created, opened and when it expires.
- Products — click View Products to see the cart items with product name, SKU, quantity and row total.
Use the keyword search above the grid to find a cart by its ID or agent.
![]()
Agent orders report
The Agent Orders report lists the orders that came from agent carts and checkouts, both paid in the agent and finished on the store. Navigate to Marketing > Agentic Commerce > Agent Orders.
- Order — the Magento order number, linked to the order page.
- Ordered — the order date.
- Agent — the agent that built the cart or checkout.
- Completed In — AI agent (paid in the conversation through Agent Checkout) or Store (the shopper opened the cart link and paid on your checkout).
- Type and Cart / Checkout ID — the source session.
- Order Total — the order grand total.
- Store View, Cart Created, Opened by Shopper — the session details.
- Products — click View Products to see the ordered items.
![]()
Activity log
The Activity Log records every agent call. Navigate to Marketing > Agentic Commerce > Activity Log.
- ID and Date — the entry and the time of the call.
- Agent — the agent identity.
- Channel — MCP server, JSON API, Discovery, Cart link, WebMCP or UCP checkout.
- Tool / Endpoint — the MCP tool or URL called, e.g. search_catalog.
- Search Query and Results — the query and the number of products found, for searches.
- Error — whether the call failed.
- Store View — the store view of the call.
![]()
Agent Checkout Orders and Refunds
Orders placed through Agent Checkout are regular Magento orders that you manage in Sales > Orders.
They use the payment method Google Pay (AI agent checkout), which is hidden on the store checkout and in admin order creation, and get the processing status after a successful charge.
- Stripe — the Google Pay token is charged as a confirmed PaymentIntent. Cards that need 3-D Secure go to Requires escalation, and the buyer finishes on your store.
- Braintree — the Google Pay nonce is charged as a settled sale. A charge in a currency other than the merchant account's is voided.
To refund an agent order, create an online credit memo from the invoice: the refund goes through the same processor.
Note: With Braintree, refunds before settlement must be full, because they are processed as a void.
The extension sends order updates to the AI platform: order created, shipped (with tracking), refunded and canceled events are posted to the platform's webhook URL, signed with RFC 9421 and Content-Digest. Cron sends them every minute and retries on failure.
![]()
WebMCP on the Storefront
WebMCP adds tools to your storefront pages that AI browser agents can call directly, and tags your storefront forms so agents understand what each one does. WebMCP works on Luma and Hyvä themes and needs no layout changes. You can enable it in WebMCP for AI browser agents.
In-page tools available to AI browser agents:
- search_products — searches products by text, category and price, sorted by relevance or rating.
- get_product_details — returns the description, options (e.g. Color, Size) and variant IDs of one product.
- get_store_policies — returns your return, shipping, terms, privacy and FAQ text.
- add_to_cart, get_cart, update_cart_item, remove_from_cart — manage the shopper's cart on your site.
- open_cart — opens the cart page.
Forms tagged with WebMCP attributes (toolname and tooldescription):
- search_catalog_form — the search form.
- add_this_product_to_cart — the add-to-cart form on the product page.
- subscribe_newsletter — the newsletter subscription form.
- contact_store — the contact form.
- sign_in and create_account — the customer login and registration forms.
To check the result, run the Google Lighthouse audit on a product page in Chrome and look at the "Agentic Browsing" section.
Cron Jobs and CLI Commands
Agentic Commerce relies on Magento cron for two jobs:
- magefan_agentic_commerce_order_webhooks — sends order updates to AI platforms every minute.
- magefan_agentic_commerce_cleanup — expires old agent carts and checkout sessions and removes activity older than the retention period, every hour.
Run this command to generate llms.txt (and the agents.md content) for all store views right away, e.g. after changing the LLMs.txt settings or catalog:
bin/magento magefan:llmstxt:generate
Troubleshooting
Agent endpoints return 404
It usually happens when the extension or the endpoint is disabled for the store view, or the cache still holds the old configuration.
Solution:
- Check if the extension is enabled in the scope of the store view you test.
- Check if a specific endpoint is enabled in Discovery or Agent API.
- Flush the Magento cache and run Test with an agent on Agentic Dashboard again.
An AI assistant cannot connect to the MCP server
It usually happens when a firewall, bot protection, CDN rule or rate limit blocks the request, or the store doesn't use HTTPS.
Solution:
- Make sure the store base URL uses HTTPS.
- Allow the agent URLs (/agent/*, /.well-known/ucp, /agents.md) in your firewall, bot protection and CDN.
- If the client calls from a browser on another website, add its origin to Allowed Browser Origins.
- Check the Activity Log and the store error log for failed requests.
Agents get "Too many new carts" or 429 errors
It usually happens because AI platforms send many users from shared IPs, or Magento behind a proxy sees one IP for all clients.
Solution:
- Make sure Magento receives the real client IP from your proxy or CDN.
- Raise New Carts per Hour or Rate Limit (requests per minute) in Magefan Extensions > Agentic Commerce > Security.
Agent search finds no products
It usually happens when products are disabled, not visible in search, out of stock, or the search index is outdated, because agents only get enabled, visible, in-stock products.
Solution:
- Check product status, visibility and stock.
- Reindex the catalog search:
bin/magento indexer:reindex catalogsearch_fulltext - Check the Searches report for queries without results.
robots.txt has no agent block
It usually happens when robots.txt is a static file in the web root or is served by a CDN, so Magento doesn't generate it.
Solution:
- Flush the Magento cache.
- Run Test on the Agentic Dashboard with an agent and copy the lines it shows in the robots.txt check.
- Add the lines to the end of your static robots.txt or the CDN rule.
Google Pay is not offered in Agent Checkout
It usually happens when Accept Google Pay is off, the Google Pay Merchant ID is empty, or the payment processor isn't configured.
Solution:
- Set Accept Google Pay to Yes and enter the Google Pay Merchant ID.
- Configure the Stripe or Braintree payment method keys in Stores > Configuration > Sales > Payment Methods. For Braintree, also enter the Braintree Tokenization Key.
- Make sure at least one shipping method is available for the buyer's address.
- Run Test with an agent: the Agent checkout check should say the checkout is ready to pay with Google Pay.
Agent carts don't expire, and order updates aren't sent
It usually happens when Magento cron is not running.
Solution:
- Check the Magento cron result in Test with an agent.
- Set up Magento cron on your server:
bin/magento cron:install