Integrating AI Hub with Liferay DXP

AI Hub connects a Liferay DXP instance to centralized AI agents. Connecting the two takes three stages:

  1. Liferay provisions an AI Hub account for your organization, creating the account, adding your users, and generating the credentials Liferay DXP uses to authenticate.

  2. In AI Hub, you set your Liferay DXP environment URL.

  3. In Liferay DXP, enter the credentials Liferay provided and the AI Hub service URL to complete the connection.

Before you begin, make sure Liferay has provisioned your AI Hub account, that your Liferay DXP environment is reachable from the internet, and that you have administrator access to it.

Provisioning Your AI Hub Account

Liferay provisions your AI Hub account for you. Provisioning creates your account, adds your users to the AI Hub site, and generates the credentials Liferay DXP uses to authenticate. Because Liferay performs these steps, you connect to a ready-to-use account instead of wiring up users, roles, and credentials yourself.

The first user receives the Account Administrator and AI Hub Administrator roles, and the remaining users receive the AI Hub Agent Manager role. For what each role grants, see Account Administration.

Once your account is provisioned, configure your environment in AI Hub.

Configuring Your Environment in AI Hub

  1. Log in to AI Hub and click Configurations in the left navigation.

  2. In the Environment URLs field, enter the base URL of the Liferay DXP environment that connects to AI Hub (for example, https://example.com). AI Hub uses this URL to reach your instance for content searches and to let the embedded chatbot load on your site. To connect more than one environment, add each URL.

    Important

    AI Hub calls back into this URL, so your Liferay DXP environment must be publicly reachable from the internet.

    To test with a local instance, expose Liferay DXP to the internet with a tunneling tool like ngrok, then enter the generated public URL (for example, https://my-instance.ngrok.app) as the environment URL. If using ngrok, a paid plan is required: the free tier intercepts traffic with a confirmation page, which breaks the calls between the services.

  3. Click Save.

Connecting Liferay DXP to AI Hub

Configure your Liferay DXP instance to complete the connection:

  1. Log in to your Liferay DXP instance as an administrator.

  2. Open the Global Menu (Global Menu icon) and navigate to Control PanelInstance Settings.

  3. Open the Feature Flags entry and click the Release category.

  4. Search for AI Hub (LPD-62272) and enable it. Enabling this flag activates AI Hub on your Liferay DXP instance.

    Note

    Alternatively, enable AI Hub directly by setting the portal property feature.flag.LPD-62272=true. For more on enabling feature flags, see Feature Flags.

  5. Return to the Instance Settings page and click AI Hub under the Platform section.

  6. Enter the Client ID and Client Secret that Liferay provided.

  7. Enter the Service URL for AI Hub: https://ai.hub.liferay.com/.

  8. Click Save.

Once Liferay DXP is connected to your AI Hub account, you can use the built-in AI tasks and create your own. To build your first custom agent, see Building a Custom Agent.