PHP code example of mahesh-rajawat / module-agentic-ucp

1. Go to this page and download the library: Download mahesh-rajawat/module-agentic-ucp library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mahesh-rajawat / module-agentic-ucp example snippets


'ucp' => [
    'token_secret' => 'paste-generated-secret-here',
],
bash
cd /var/www/html
php bin/magento module:enable MSR_AgenticUcp
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush
bash
php -r "echo bin2hex(random_bytes(32)) . PHP_EOL;"
bash
npm install -g @digitalbazaar/did-key-cli
npx did-key generate --type Ed25519
xml
<!-- YourVendor/YourModule/etc/ucp.xml -->
<config ...>
    <agent id="profile-b2b">
        <capabilities>
            <capability name="catalog.browse"     enabled="true"/>
            <capability name="quote.request"      enabled="true"/>
            <capability name="contract.negotiate" enabled="true"/>
        </capabilities>
    </agent>
</config>
bash
unzip MSR_AgenticUcpCheckout.zip -d /var/www/html/app/code/
php bin/magento module:enable MSR_AgenticUcpCheckout
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush