Configuring the Cloud Pak for Integration Agent

Configure the IBM Cloud Pak® for Integration Agent so that users can solve common problems and get information on how to use Cloud Pak for Integration.

Before you begin

  1. Ensure you have the following prerequisites before you configure the Cloud Pak for Integration Agent:

  2. If you previously installed the Cloud Pak for Integration Agent Preview, remove it by following the instructions in Removing the Agent Preview.

Procedure

Follow these steps to enable Cloud Pak for Integration Agent for the Platform UI. These steps apply to either of these situations:

  • You are enabling Cloud Pak for Integration Agent while deploying a new Platform UI instance.

  • You already have a deployed instance of the Platform UI.

Creating the agent configuration

The agent needs to be able to communicate with large language models (LLMs) to understand natural language input and produce output. LLMs are provided by the Watsonx.ai SaaS (software-as-a-service) offering.

In both cases, some configuration is required in order to allow the agent and LLMs to communicate securely. This configuration is handled by defining a Kubernetes secret that contains the configuration information.

Deploying the agent to use Watsonx.ai SaaS

  1. Define the following environment variables:

    export PLATFORM_UI_NAMESPACE=<platform_ui_namespace>                                                  
    export PLATFORM_UI_NAME=<platform_ui_name>
    export WATSONX_HOST_URL=<watson_x_region_url(e.g: https://us-south.ml.cloud.ibm.com)>
    export WATSONX_PROJECT_ID=<watson_x_project_id>
    export WATSONX_API_KEY=<watson_x_api_key>
  2. Log into your cluster so you can run oc commands:

    oc login
  3. Create a Secret called integration-agents-credentials, which contains your watsonx.ai configuration, in the namespace where you intend to deploy Platform UI:

    oc create secret generic -n ${PLATFORM_UI_NAMESPACE} integration-agents-credentials \
        --from-literal=WATSONX_HOST_URL=${WATSONX_HOST_URL} \
        --from-literal=WATSONX_PROJECT_ID=${WATSONX_PROJECT_ID} \
        --from-literal=WATSONX_API_KEY=${WATSONX_API_KEY}

Enabling the agent

The Agent can be enabled when deploying a new IBM Cloud Pak Platform UI instance, and also enabled (or disabled) in an existing Platform UI.

Enabling the agent in an existing IBM Cloud Pak Platform UI instance

Use the oc CLI tool to update your IBM Cloud Pak Platform UI Kubernetes resource, which enables the agent:

oc patch platformnavigator ${PLATFORM_UI_NAME} -n ${PLATFORM_UI_NAMESPACE} --type=merge -p '{"spec":{"agents":{"enabled":true}}}'

Alternatively, if you are using the OpenShift Console, you can update the IBM Cloud Pak Platform UI Kubernetes resource to set the spec.agents.enabled flag to true:

...
spec:
...
  agents:
    enabled: true
...

When you finish updating the IBM Cloud Pak Platform UI Kubernetes resource, the IBM Cloud Pak Platform UI pods are restarted. Another pod, for deploying the agent, is created. This pod consists of two containers. You can check its progress by running the oc command:

oc get pods -n ${PLATFORM_UI_NAMESPACE} -l app.kubernetes.io/instance=${PLATFORM_UI_NAME}

When the pods are running, the AI button should be available at the bottom right of an page in the IBM Cloud Pak Platform UI.

Disabling the agent

To disable the Agent, update the IBM Cloud Pak Platform UI Kubernetes resource.

In the oc CLI tool, set the enabled field to false:

oc patch platformnavigator ${PLATFORM_UI_NAME} -n ${PLATFORM_UI_NAMESPACE} --type=merge -p '{"spec":{"agents":{"enabled":false}}}'

Removing the Agent Preview

To remove the IBM Cloud Pak for Integration Agent Preview, remove the Helm chart and update the Platform UI instance by removing the agent configuration.

  1. Using the CLI, set the required environment variables for removing the Helm chart.

    For the values of PLATFORM_UI_NAMESPACE and PLATFORM_UI_NAME, use the same name and namespace as your existing deployment of Platform UI.

    export PLATFORM_UI_NAME=<name of the Platform UI>
    export PLATFORM_UI_NAMESPACE=<namespace of the Platform UI>
  2. Remove the Helm chart:

    helm uninstall  ${PLATFORM_UI_NAME} -n ${PLATFORM_UI_NAMESPACE}
  3. Remove the template section from the Platform UI instance:

    oc patch PlatformNavigator ${PLATFORM_UI_NAME} -n ${PLATFORM_UI_NAMESPACE} --type=json -p='[{"op": "remove", "path": "/spec/template"}]'
  4. Ensure that the Helm deployment no longer exists:

    oc get deployment -n ${PLATFORM_UI_NAMESPACE}  -l app.kubernetes.io/name=ibm-integration-agent-addon-pn-quickstart

    This command should not return any deployment information.

  5. Confirm that the status of the Platform UI instance does not report any conditions of type Error or Blocked:

    oc get PlatformNavigator  -n ${PLATFORM_UI_NAMESPACE}