API Agent is
an optional add-on for API Connect that simplifies
and automates complex API management workflows. By intelligently converting user queries into
actions, it streamlines API discovery, creation, governance, and testing. You can configure API Agent in IBM®
API Connect deployments on
Kubernetes, Red Hat OpenShift, or IBM Cloud Pak for integration deployment by enabling the API Agent services.
API Agent is not
supported on VMware deployments.
Before you begin
Ensure that your system meets the following requirements:
- A Milvus database instance is required to enable the API Agent and its details
must be added to the
ManagementCluster CR.
- The base profile for management in API Connect is not dependent
on API Agent, but you
might require extra CPU or memory. For more information about memory or CPU requirements, see Management subsystem deployment profile limits.
About this task
By default, API Agent is disabled and remains inactive unless it is explicitly enabled in the ManagementCluster
CR (henceforth referred to as just management CR). You can also enable API Agent during the
initial deployment of a new management CR or later. The enablement experience is the same whether
you're deploying a new system on 10.0.10.0, or upgrading to 10.0.10.0 from version 10.0.8.x or
10.0.9.0.
To enable API Agent,
complete the following tasks:
Procedure
- Create a Milvus secret as shown in the example below:
kubectl create secret generic milvus-creds --from-literal=username=$MILVUS_USER_NAME --from-literal=password=$MILVUS_API_KEY
- Edit the
ManagementCluster CR and add the following definition for the
API Agent service.
Append the API Agent
definition to the end of the spec: section, making sure to adhere to the spacing
used in the file.
spec:
ai:
enabled: true
apiAgent:
enabled: true
vectorDatabaseSource: remote
remoteVectorDatabase:
type: milvus
host: milvus.host
port: 30279
databaseName: default
collectionName: apic_agent
credentials: milvus-creds
The following are the details of each field:
ai: enables AI features.
enabled: true: enables AI.
apiAgent:
enabled: true: enables the API Agent tab.
vectorDatabaseSource: remote: specifies that the vector database is
remote.
remoteVectorDatabase: configures the remote vector database.
type: milvus: specifies the type of vector database (milvus).
host: milvus.host: specifies the host of the milvus database.
port: 30279: specifies the port of the milvus database.
databaseName: default: specifies the name of the milvus database.
collectionName: apic_agent: specifies the name of the collection in the milvus
database.
credentials: milvus-creds: specifies the credentials for the milvus
database.
Note:
- Both
ai and ai.apiAgent must be set to either true or
false.
- If
apiAgent is enabled, then remoteVectorDatabase is required
and is validated when CR is created or updated. During validation, the system also checks
connectivity to the database.
- For collection name, specify a new collection to be created by API Agent. The name can
include letters, numbers, and underscores. If the specified collection already exists, API Agent attempts to use
it. If the existing schema differs from what API Agent requires, it will
drop the existing collection and create a new a collection with required schema.
- Apply the updated CR by running the following command as part of the standard Management
subsystem installation (see Installing the management subsystem for
details):
kubectl apply -f management_cr.yaml -n <management_namespace>
Where
management_namespace is the name of the target installation namespace in the
Kubernetes cluster.
The API Agent service will be
enabled with the Management subsystem. Alternatively, use the form view or apply the
APIConnectCluster CR directly in Red Hat OpenShift. The settings are under
, and its children fields. For more
information about Open Shift settings, see API Connect configuration settings.