To understand your questions, the IBM® MQ Agent
uses large language models (LLMs) that are hosted in an AI runtime. If you are
using IBM watsonx.ai™ Runtime, create a project and an API key,
which the IBM MQ Agent can use to access the LLMs. If you
are using vLLM, you need only note any existing API
key.
Before you begin
Currently, the supported AI runtimes are IBM watsonx.ai Runtime (which you add to an IBM Cloud® account) and vLLM. For more information about entitlement for IBM watsonx.ai Runtime, see Entitlement.
If you are using vLLM, you
do not need to complete this task; you need only record your API key, if your vLLM runtime requires one for access. You specify this key
when you later deploy the IBM MQ Agent, so that the
IBM MQ Agent can access the vLLM runtime. After recording the key, proceed to Granting the IBM MQ Agent access to queue manager resources.
If you are using IBM watsonx.ai Runtime, complete the rest of this task to create a project with an API key.
About this task
For more information about the set of LLMs that is used by the IBM MQ Agent, see Foundation models for the IBM MQ Agent.
Procedure
- Create IBM Cloud Object
Storage.
- Create an IBM watsonx.ai
runtime.
For
example, use the
IBM Cloud CLI tool to run the
following command:
ibmcloud resource service-instance-create <service_instance_name> pm-20 <plan_name> <region> --service-endpoints <endpoint_network>
where:
<service_instance_name>: a custom name for your service instance.
pm-20: the service ID for the IBM watsonx.ai Runtime.
<plan_name>: an IBM watsonx.ai
Runtime pricing plan, such as essentials or standard. For more
information, see watsonx.ai Runtime service
plans
in the IBM watsonx documentation.
<region>: the IBM watsonx
regional data center, such as us-south (Dallas).
<endpoint_network>: defines network traffic. Options are
public, private, or public-and-private. For more
information, see Managing the watsonx.ai Runtime service
endpoint
in the IBM watsonx documentation.
- Navigate to the Manage page for the IBM watsonx Runtime instance that you created.
- Click the Options (down arrow) icon next to Launch
in then click IBM watsonx to open an IBM watsonx browser tab.
If the "Welcome to
watsonx" dialog opens, close it.
- Create a new project.
- In the IBM watsonx browser tab, scroll to
the Projects section at the end of the page then click the Create a new
project (+) icon.
- Associate cloud object storage with the project.
Use the Select
storage service drop-down list to associate the cloud object storage that you created
earlier with this new project.
- Click Create.
You might need to create an access
key before the Create button is enabled.
- Note the project ID for future use.
In the Project
navigation, click General to open the "General" page, which shows the
Project ID.
- Add collaborators to the project.
- In the project, click the Manage tab, then in the
Project navigation, click Access Control to open the
"Access control" page.
- In the "Access control" page, click Add
collaborators.
- Associate the IBM watsonx.ai Runtime with the
project.
- In the project, click the Manage tab, then in the
Project navigation, click Services & Integrations
to open the "Services & integrations" page.
- In the "Services & integrations" page, click .
Without this association, you cannot run or deploy assets that you create within a
IBM watsonx.ai project.
- Create an IBM Cloud API key then retain it
for future use.
For example, use the
IBM Cloud CLI tool to run the following command, which creates
a key called
MyAPIKey in a file called
my-api-key.json in the
directory in which you run the
command:
ibmcloud iam api-key-create MyAPIKey -d "API key for use with IBM MQ Agent" --file my-api-key.json
- Optional: As an account administrator, you might want to grant access to
other users.
For example, use the
IBM Cloud CLI tool to run one or more of the following
commands. For more information about each command, see the following topics in the
IBM Cloud CLI documentation:
Managing IAM access, API keys, trusted profiles, service IDs, and access groups (ibmcloud
iam) and
Managing accounts and users (ibmcloud account)Create a
group:
ibmcloud iam access-group-create [<group_name>]
Check
if a group exists:
ibmcloud iam access-groups
Add a policy to the
group:
ibmcloud iam access-group-policy-create [<group_name>] --roles [<role>] --service-name [<service_name>] --service-instance [<service_instance>] --region [<region>]
Invite
users:
ibmcloud account user-invite [<email>]
Add a user
to the
group:
ibmcloud iam access-group-user-add [<group_name>] [<email>]
Remove
a user from a
group:
ibmcloud iam access-group-user-remove [<group_name>] [<email>] -f
Remove
a user from an
account:
ibmcloud account user-remove [<email>] -f
Results
You created a project that is associated with an IBM watsonx.ai Runtime service. The IBM MQ Agent will use the LLMs in the IBM watsonx.ai service to understand your questions.You also
recorded the following information, which you will use in the next task:
- The ID of the project that you created.
- The IBM Cloud API key that you created.