Important

You are browsing upcoming documentation for version 7.0 of OroCommerce, scheduled for release in 2026. Read the documentation for version 6.1 (the latest LTS version) to get up-to-date information.

See our Release Process documentation for more information on the currently supported and upcoming releases.

CLI Commands (StorefrontAgentBundle) 

oro:ai-agent:access-token:create 

Creates an OAuth2 access token for the specified customer user for the Smart Agent microservice for development or testing purposes.

php bin/console oro:ai-agent:access-token:create

Commands in Use (Examples) 

The following example runs the creation of an OAuth2 access token for customer user Amanda and returns the result in JSON format:

php bin/console oro:ai-agent:access-token:create --current-customer-user=1 --format=json

The output would be as follows:

{
    "customer_user_identifier": "1",
    "access_token": "access token hash",
    "client_name": "Oro Agent Client"
}

The following example runs the creation of an OAuth2 access token for customer user Amanda and returns the result in text format:

php bin/console oro:ai-agent:access-token:create --current-customer-user=1

The output would be as follows:

OAuth2 Access Token
-------------------
* customer_user_identifier: 1
* access_token: access token hash
* client_name: Oro Agent Client