Integrating AI agents
An AI agent in the designer is used to call an AI agent built in IBM® watsonx™ Orchestrate®. watsonx Orchestrate AI agents provide powerful AI capabilities that you can integrate directly into your workflow automations. The designer provides a discovery mechanism to find the AI agent in watsonx Orchestrate that you want, and to generate an AI agent artifact in the designer.
In the designer, you can discover AI agents from watsonx Orchestrate. As the result of the discovery, an AI agent artifact is created in the designer.
The AI agent editor shows you relevant information about the AI agent and allows you to specify an API key that is used for invocation at runtime. In the runtime, this API key can be overwritten by an administrator by using the Operations REST API.
To call an AI agent, you use an AI agent activity in a service flow.
To discover an AI agent from watsonx Orchestrate and generate an AI agent artifact in the designer that you can use in a service flow, complete the following steps.
Before you begin
- Apply the following watsonx
Orchestrate endpoint configurations:
environment-type: The type of environment. Supported values areAWS(default),IBMCloud, andOnPrem.token-url: Used for authentication. Only required for AWS and IBM Cloud. For more information on how to obtain the token-url, see Generating the JWT Token for the AWS offering
for AWS and Generating the access token for the IBM Cloud offering
for IBM Cloud.service-instance-url: Used to access the watsonx Orchestrate instance during discovery. For more information on how to obtain theservice-instance-url, see Getting the API endpoint.
-
Add the following configuration to your 100Custom.xml file.
- AWS
<server> <wxo merge="mergeChildren"> <environment-type>AWS</environment-type> <token-url>https://iam.platform.saas.ibm.com/siusermgr/api/1.0/apikeys/token</token-url> <discovery> <service-instance-url>https://api.<hostname>/instances/<tenant_id></service-instance-url> </discovery> </wxo> </server> - From 26.0.0.0-IF001 IBM
Cloud
<server> <wxo merge="mergeChildren"> <environment-type>IBMCloud</environment-type> <token-url>https://iam.cloud.ibm.com/identity/token</token-url> <discovery> <service-instance-url>https://api.<hostname>/instances/<tenant_id></service-instance-url> </discovery> </wxo> </server> - From 26.0.0.0-IF001
On-premises
<server> <wxo merge="mergeChildren"> <discovery> <service-instance-url>https://<hostname>/orchestrate/<namespace>/instances/<instance_id></service-instance-url> </discovery> </wxo> </server>
Replace
<hostname>,<tenant_id>, and<instance-id>with your specific environment values. - AWS
- Depending on your environment, use one of the following custom resource
parameters to enable the 100Custom.xml snippet.
- For Workflow Authoring, use
lombardi_custom_xml_secret_name. - For Workflow Process Service
Authoring, use
lombardi_custom_xml_secret_name. - For Workflow Runtime, use
lombardi_custom_xml_secret_name. - For Workflow Process Service
Runtime, use
lombardiXML.
- For Workflow Authoring, use
- (On-premises) Trust the certificate of your watsonx Orchestrate on-premises environment.
- Create a secret with the certificate of your watsonx Orchestrate on-premises environment:
kubectl create secret generic <secret name> --from-file=tls.crt=<certificate file path> -n <namespace> - Add the secret to the component’s trust store. If you want watsonx Orchestrate on-premises to be
trusted by all components installed by the operator, add the secret to the custom resource in the
shared_configuration.trusted_certificate_list parameter. For
example:
shared_configuration: trusted_certificate_list: - <secret name>
- Create a secret with the certificate of your watsonx Orchestrate on-premises environment:
- Make sure your Cloud Pak for Business Automation instance can access the watsonx Orchestrate instance.
- Build or identify the AI agents in watsonx Orchestrate that you want to use in your workflows. For more information on creating AI agents, see Building agents.
Procedure
Discovering an AI agent
Viewing and configuring the discovered AI agent
Using the AI agent in a service flow
What to do next
- Install your workflow automation to a workflow server for production use. For more information, see Installing workflow automations and automation services.
- Manage the API as needed. Administrators can override API keys by using the Operations REST API. For more information, see Operations REST APIs.