magebitcom / magento2-module-agentic-commerce
Magebit Agentic Commerce extension
Agentic Commerce for Magento 2 (ACP Feed, Payments and Checkout)
This module makes your store compatible with AI-powered shopping experiences like OpenAI's "Instant Checkout" in ChatGPT.
This is the first Open-Source module that enables Agentic Commerce features in Magento 2 / Adobe Commerce stores (such as Shop in ChatGPT). The module is Hyva and Adobe Commerce Cloud compatible.
Agentic Commerce Protocol (ACP) is an open standard that enables a conversation between buyers, their AI agents, and businesses to complete a purchase.
This module is currently actively under development by Magebit and is open to public contributions.
Features
- ChatGPT Compatible Product Feed Export
- Instant Checkout Ready
- Agentic Checkout Configuration (according to ACP)
- Agentic Checkout webhooks
- Delegated Payment Support
Requirements
- PHP >= 8.1
- Stripe Payments (only if using checkout)
Installation
As a composer package
composer require magebitcom/magento2-module-agentic-commerce
Run bin/magento setup:upgrade
As a module
- Download latest release files and extract them under
app/code/Magebit/AgenticCommerce - Run
bin/magento setup:upgrade
Configuration
You can find the Module's configuration under Stores -> Settings -> Configuration -> Magebit -> Agentic Commerce:
Make sure to configure Product Feed settings before running an export.
Additionally, there are settings at the product level. Here you can configure product visibility in Agentic search and whether to allow
Agentic Checkout.
ACP Ready Product Feed
To export the product feed, use the magebit:agentic-commerce:export Magento command:
Usage:
magebit:agentic-commerce:export [options]
Options:
-s, --store=STORE Store ID to export products from [default: 1]
-o, --output=OUTPUT Output file path. Relative to var directory [default: "export/agentic_commerce.csv"]
Configuring Feed Mapping
Exported product attributes are mapped using the ac_product_feed_mapping.xml config file. To adjust the mapping,
create a new ac_product_feed_mapping.xml config file and add or overwrite existing mappings.
<mapping id="id">
<source_attribute>sku</source_attribute>
<target_attribute xsi:type="const">Magebit\AgenticCommerce\Api\Data\Spec\ProductInterface::ID</target_attribute>
</mapping>
idis a unique identifier for the mappingsource_attributeis the Magento 2 product attributetarget_attributeis the attribute code that will be used in the feedformatter(optional) is a Magento 2 class that formats the attribute value
Source Attribute value can be a string or an object:
<mapping id="link">
<source_attribute xsi:type="object">Magebit\AgenticCommerce\Model\Mapping\Source\Url</source_attribute>
<target_attribute xsi:type="const">Magebit\AgenticCommerce\Api\Data\Spec\ProductInterface::LINK</target_attribute>
</mapping>
Source classes must implement the Magebit\AgenticCommerce\Api\Mapping\SourceInterface interface.
Check out the default ac_product_feed_mapping.xml config for a full reference.
Delegated Payments
By default, this module does not store any payment data as the implementation logic will be different depending on what PSP is used by the merchant. To enable delegated payments, it's required to implement a
class that implements Magebit\AgenticCommerce\Api\PaymentMethodVaultHandlerInterface and handles the storage of the
payment method data. Payment Method Vault handler will receive DelegatePaymentRequestInterface object and must return a vault token.
An example for an imaginary FooBar payment service provider:
<?php
namespace My\Module\AgenticCommerce\Model;
use Magebit\AgenticCommerce\Api\PaymentMethodVaultHandlerInterface;
use Magebit\AgenticCommerce\Api\Data\Request\DelegatePaymentRequestInterface;
class FooBarPaymentVaultHandler implements DelegatePaymentRequestInterface
{
/**
* @param DelegatePaymentRequestInterface $request
* @return bool
*/
public function canStore(DelegatePaymentRequestInterface $request): bool
{
return $request->getPaymentMethod()->getType() === 'card';
}
/**
* @param DelegatePaymentRequestInterface $request
* @return string
*/
public function handle(DelegatePaymentRequestInterface $request): string
{
$fooBarVaultToken = $this->fooBarPaymentsApi->createPaymentMethod([
'type' => 'card',
'number' => $request->getPaymentMethod()->getNumber(),
'expMonth' => $request->getPaymentMethod()->getExpMonth(),
'expYear' => $request->getPaymentMethod()->getExpYear(),
'cvc' => $request->getPaymentMethod()->getCvc(),
]);
return $fooBarVaultToken->id;
}
}
Vault handler class must be registered in di.xml:
<type name="Magebit\AgenticCommerce\Service\DelegatePaymentService">
<arguments>
<argument name="paymentMethodVaultHandlers" xsi:type="array">
<item name="foo_bar" xsi:type="object">My\Module\AgenticCommerce\Model\FooBarPaymentVaultHandler</item>
</argument>
</arguments>
</type>
Handling place order requests
See: Magebit\AgenticCommerce\Model\Payment\StripePaymentsHandler
Contributing
Found a bug, have a feature suggestion or just want to help in general? Contributions are very welcome! Check out the list of active issues or submit one yourself.
Implementation as a Service
Interested in Magebit doing the integration for you? Contact us on our website and we can help you with the full implementation of Agentic Commerce sales channels (Instant Checkout on ChatGPT, Product Feeds, etc).
Have questions or need help? Contact us at [email protected]
No changelog yet
The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.
Requires 4
| Package | Constraint |
|---|---|
| magebitcom/magento2-core | 0.1.* |
| magento/framework | * |
| php | >=8.1 |
| symfony/validator | ^7.3 |
Suggests 1
| Package | Reason |
|---|---|
| stripe/stripe-payments | * |
Compatibility
Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.
Code Quality
Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge. A phpcs finding can't make a module incompatible.
Static analysis
Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.
| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 54 | 54 warnings (ruleset: Magento2), 8 auto-fixable with phpcbf |
| PHPMD | Warning | 9 | 9 rule violations (UnusedPrivateField:8, NumberOfChildren:1) |
| Cpd | Warning | 10 | 10 duplicated chunks spanning 376 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Info | 2 | valid; 2 advisory notes (composer validate --strict) |
PHPStan
Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases.
Tests
Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.
Unit tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
Integration tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
Security
Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.
More from magebitcom
View vendorMagebit Universal Commerce extension
Module documentation viewer for Magento 2 admin
This module enables Montonio Hirepurchase with Hyva Checkout
Google Analytics 4 MCP tools for Magebit_Mcp — wraps the GA Data and Admin APIs as MCP tools so AI clients can query property metadata, run reports, run realtime reports, and run funnel reports against your store's analytics property.
Turn an existing module into recurring revenue.
If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.