Enabling generative AI in Business Automation Workflow

After you enable it, the generative AI feature will allow you to add generative AI tasks to service flows in Process Designer.

You must first set up a connection to a watsonx.ai™ provider, then configure Business Automation Workflow to enable the generative AI feature.

Before you begin

To enable the generative AI feature, you must set up a connection to a watsonx.ai provider. The supported watsonx.ai providers are:
Setting up with an IBM watsonx.ai as a Service account
Follow these steps to create an IBM watsonx.ai as a Service account and to collect the data (an IBM watsonx™ Project ID and an API Key) required to enable the generative AI feature:
  1. Sign up for IBM watsonx.ai as a Service, by following the instructions at Signing up for IBM watsonx as a Service External link opens a new window or tab, create an account, and log in.
    Note: Make sure to review the watsonx pricing External link opens a new window or tab and choose the plan that best suits your requirements.
  2. Create a project in IBM watsonx.ai by following the instructions at Creating a project External link opens a new window or tab.
  3. Find and copy the Project ID: to know how to find and copy the Project ID, see Finding the project ID External link opens a new window or tab.

    The Project ID value is required to enable the generative AI feature in Business Automation Workflow.

  4. To enable your IBM watsonx.ai project to use the IBM watsonx.ai REST API, associate the watsonx.ai Runtime service instance with the project by following the instructions at Adding associated services to a project External link opens a new window or tab.
    Note: Make sure to review the watsonx.ai Runtime service plans External link opens a new window or tab to choose the plan that best suits your requirements.
  5. Create an IBM Cloud® API key. There are different options to create an IBM Cloud API key, for more information, see IBM Cloud API key External link opens a new window or tab.

    The IBM Cloud API key value is required to enable the generative AI feature in Business Automation Workflow.

  6. In addition to the foundation models provided with watsonx.ai, the generative AI feature also supports inferencing by using deploy on demand foundation models and custom foundation models that you can deploy in your watsonx.ai as a Service account.
    • To deploy curated foundation models, see Deploy on demand foundation models External link opens a new window or tab .
    • To deploy custom foundation models, see Custom foundation models External link opens a new window or tab .
      Note:
      • A serving name is required when you create your deploy on demand or custom foundation model deployment.
      • For deploy on demand foundation models, Space ID is required to enable the generative AI feature in Business Automation Workflow. Obtain the Space ID GUID from the Manage tab in Deployment spaces External link opens a new window or tab .
Setting up with an IBM watsonx.ai software in IBM Cloud Pak for Data account
Prerequisite: You must have an instance of IBM Cloud Pak for Data with a full watsonx.ai service installed. The watsonx.ai lightweight engine is not supported in the generative AI feature. For installation instructions, see IBM watsonx.ai External link opens a new window or tab.
  1. Create a project. See Creating a project External link opens a new window or tab.
  2. Find and copy the project ID. See Finding the project ID External link opens a new window or tab.
    The project ID value is required to enable the generative AI feature in Business Automation Workflow.
  3. Create an API key. See Generating API keys for authentication External link opens a new window or tab.
    The API key value is required to enable the generative AI feature in Business Automation Workflow.
  4. In addition to working with the foundation models that are curated by IBM, the generative AI feature also supports inferencing using your custom foundation models. To deploy custom foundation models, see Creating a deployment for a custom foundation model on dedicated GPUs External link opens a new window or tab.
    Note: A serving name is required when you create your deployment.

About this task

Now that your IBM watsonx.ai account is set up and you retrieved the required data, you can enable the generative AI feature in Business Automation Workflow by following this procedure.

Procedure

  1. If you have applied network policies to your deployment to have restricted internet access, you must create a network policy to allow the Business Automation Workflow or the Workflow Process Server pod to make outbound calls on port 443.
    Note: You should inspect your pods to identify the proper values to use in the spec.podSelector.matchLabels section of the NetworkPolicy.
    The following example shows a network policy for a Business Automation Workflow authoring instance deployed as part of an ICP4Cluster named bawdeploy in the baw-project namespace:
    kind: NetworkPolicy 
    apiVersion: networking.k8s.io/v1 
    metadata: 
      name: bastudio-egress-to-ibmcloud 
      namespace: baw-project
    spec: 
      podSelector: 
        matchLabels: 
          app.kubernetes.io/component: deployment 
          app.kubernetes.io/instance: bawdeploy 
          app.kubernetes.io/managed-by: Operator 
          app.kubernetes.io/name: bastudio 
      egress: 
        - ports: 
            - protocol: TCP 
              port: 443 
      policyTypes: 
        - Egress 

    For more information about how to create a network policy, see the Network policies to manage access to external services (egress) section in Configuring cluster security External link opens a new window or tab .

  2. Create an authentication alias using the Liberty authData element:
    1. Create a valid XML snippet with the Liberty authData settings that you want, starting from the <server> element.
      The following example sets an authentication alias with id watsonx.ai_auth_alias, where myUserId is the username associated with the API key that you created in the Before you begin section, and myAPIKey is the API key created in the Before you begin section:
      <server> 
          <authData id="watsonx.ai_auth_alias" user="myUserId" password="myAPIKey" /> 
      </server> 
    2. Customize Liberty with your XML snippet by following the instructions depending on your environment type:
  3. Enable the generative AI feature by configuring the related properties in the 100Custom.xml file. Create an XML snippet that specifies the 100Custom configuration settings that you want to use for the generative AI feature. For more information about the properties that are supported by the generative AI feature, see table 1.
    You must at least configure the following properties:
    • project-id
    • provider-url
    • auth-alias
    Note: If you are using an IBM watsonx.ai software provider, you will also need to provide at least the following properties:
    • auth-url
    • auth-type
    The following example shows a configuration with the required properties, where the watsonx.ai provider is IBM watsonx.ai as a Service and is using the default auth-type IAM value. In the exemplified configuration:
    • The watsonx.ai project-id is 00000000-1111-2222-3333-444444444444.
    • The provider-url of the project-id is https://us-south.ml.cloud.ibm.com.
    • The authentication alias created in step 2 is watsonx.ai_auth_alias.
    <properties> 
        <server> 
            <gen-ai merge="mergeChildren"> 
                 <project-id>00000000-1111-2222-3333-444444444444</project-id> 
                 <provider-url>https://us-south.ml.cloud.ibm.com</provider-url> 
                 <auth-alias>watsonx.ai_auth_alias</auth-alias> 
            </gen-ai> 
        </server> 
    </properties> 
    The next example shows a configuration where the watsonx.ai provider is an IBM watsonx.ai software in IBM Cloud Pak for Data. In the exemplified configuration:
    • The watsonx.ai project-id is 00000000-1111-2222-3333-444444444444.
    • The provider-url of the project-id is https://my-cpd.mycompany.com.
    • The authentication alias created in step 2 is watsonx.ai_auth_alias.
    • The authentication URL is https://my-cpd.mycompany.com/icp4d-api/v1/authorize.
    • The authentication type is CP4D.
    • The SSL configuration name is MyNewSSLSettings.
    <properties>
        <server>
            <gen-ai merge="mergeChildren">
                 <project-id>00000000-1111-2222-3333-444444444444</project-id>
                 <provider-url>https://my-cpd.mycompany.com</provider-url>
                 <auth-alias>watsonx.ai_auth_alias</auth-alias>
                 <auth-url merge="replace">https://my-cpd.mycompany.com/icp4d-api/v1/authorize</auth-url>
                 <auth-type merge="replace">CP4D</auth-type>
                 <ssl-configuration merge="replace">MyNewSSLSettings</ssl-configuration>
            </gen-ai>
        </server>
    </properties>
    Table 1. Properties supported by the generative AI feature
    Property Required Description Default value
    auth-alias Yes

    The alias value used when you create an authentication alias.

    This field is used to connect to the IBM watsonx.ai REST APIs.

    None
    project-id Yes The project-id in the IBM watsonx.ai provider.

    This field is used to connect to the IBM watsonx.ai REST APIs.

    None
    provider-url Yes

    The base URL associated with the project in the IBM watsonx.ai provider.

    This field is used to connect to the IBM watsonx.ai REST APIs.

    For an IBM watsonx.ai as a Service provider, see watsonx.ai endpoint URLs External link opens a new window or tab .

    For IBM watsonx.ai software, the URL is https://{cluster_url}, where cluster_url is your IBM Cloud Pak for Data cluster URL
    For more information, see Endpoint URLs External link opens a new window or tab .

    None

    Example: https://us-south.ml.cloud.ibm.com

    space-id Yes, when supported-foundation-model includes curated The Space GUID that has the deploy on demand model deployments. This field is used to connect to the IBM watsonx.ai REST APIs.  
    auth-type No
    The authentication type.
    • For a watsonx.ai as a Service provider, use IAM.
    • For a watsonx.ai software provider, use CP4D.
    IAM
    auth-url No

    The URL to use for authentication.

    For watsonx.ai as a Service provider, the URL is the Cloud Identity and Access Management (IAM) token API. See Authentication External link opens a new window or tab .

    For watsonx.ai software provider, the URL is the IBM Cloud Pak for Data icp4d-api/v1/authorize API. See Authentication External link opens a new window or tab .

    https://iam.cloud.ibm.com/identity/token
    connection-timeout No

    The time limit (in seconds) for the generative AI task to wait for a connection to the IBM watsonx.ai REST APIs.

    15
    default-foundation-model No

    The foundation model ID or serving name to use in the assistant.

    meta-llama/llama-3-3-70b-instruct
    default-foundation-model-type No
    The foundation model type for the default-foundation-model. This value is used in conjunction with the default-foundation-model value, as follows:
    • For a supported foundation model that is curated by IBM, use watsonx.
    • For a custom foundation model that you deployed in your project, use custom.
    • For a curated foundation model that you deployed in your space, use curated.
    watsonx
    read-timeout No

    The time limit (in seconds) for the generative AI task to wait to read from the IBM watsonx.ai REST APIs.

    45
    ssl-configuration No

    Checks the server certificate for the IBM watsonx.ai REST service that the generative AI task will use. If the server certificate from the provider-url and the auth-url are signed by a public certification authority, the default preconfigured SSL configuration, PublicInternetSSLSettings, can be used.

    If the server certificate from the provider-url and the auth-url are not signed by any of the public certification authorities included in the preconfigured SSL configuration, an administrator must create a new SSL configuration for this service, import the server certificate into a new trust store, and update the new SSL configuration name in this property.

    PublicInternetSSLSettings
    supported-foundation-model-type No Use this property to decide which foundation model types to include in the Large language model list under Gen AI during the authoring of the generative AI task.
    Valid values are:
    • watsonx: Includes the supported foundation models that are curated by IBM (default value).
    • custom: Includes the custom foundation models that you deployed in your project.
    • curated: Includes the deploy on demand models that you deployed in your space. To use this option, you must also provide space-id in the configuration.
    Note: The curated option is not supported for the watsonx.ai software provider.
    Example
    To include both watsonx and custom foundation model types in your Large language model list, you must specify the supported-foundation-model-type element multiple times inside the gen-ai element.
    To choose from both the watsonx and the custom foundation model types, add the following child elements to the gen-ai element:
    <supported-foundation-model-type>watsonx</supported-foundation-model-type> 
    <supported-foundation-model-type>custom</supported-foundation-model-type>
    watsonx
    To customize your Business Automation Workflow instance with your 100Custom configuration settings, follow the instructions depending on your environment type:

What to do next

Now that your server is configured, you can use the generative AI tooling in the service flow editor as described in Adding a generative AI task to a service flow.