“IBM Watson Assistant is a SaaS offering from IBM to build conversational assistants.”
IBM Watson Assistant uses artificial intelligence, which helps understand users in context and provides easy, fast, consistent, and accurate answers across various applications, devices, or channels. IBM Watson Assistant is built on natural language understanding (NLU), natural language processing (NLP), and machine learning (ML).”
The first version was already excellent, and IBM clients and partners started taking these advantages; for example, Watson Assistant was used at the International Space Station. Here are more details: CIMON brings AI to the International Space Station. Based on client feedback, the IBM development and design team has created a new experience and added new functionalities to the service; for example, they expanded the integration possibilities with extensions.
In this blog post I focus especially on custom extensions development and setup.
These are the sections of the blog post
- Custom extension
- Live stream on YouTube related to the example
- Additional resources
Watson Assistant does provide the integration to custom information resources by using webhooks for a long time. I also created a video about how to configure the Watson Assistant webhook integration @Crisis communication chatbot. However, the WebHook integration is limited to one post-endpoint invocation.
Now it is possible to integrate several extensions based on full REST APIs. Of course, these APIs need to be documented/specified by OpenAPI 3. This new functionality opens the door wide open for Watson Assistant using incredible, nearly unlimited possibilities of integration with custom extensions; this has impressed me deeply and shows a fantastic progression.
Here is an example image for the OpenAPI 3 specification of the Node.js extension opened in the swagger.io online editor.
That motivated me to create an example that starts from scratch, from the development of a simple REST API application to the containerization and the deployment to the cloud and the definition of an own Open API documentation.
Therefore, I created the GitHub project extension APIs with easy navigable documentation Examples to develop and configure Watson Assistant extensions APIs.
Simplified architecture dependencies
The following diagram displays the simplified architecture dependencies inside a Watson Assistant Service. We will integrate a custom extension to an assistant instance in the examples.
- Add custom extensions
- We have an assistant instance inside the Watson Assistant service.
- The assistant instance simplified contains environments, integrations, and actions.
- The integrations do contain a catalog of extensions.
- The extension catalog contains Out-Of-The-Box extensions and custom extensions.
- A custom extension uses an Open API specification of an application to consume the REST API provided by this application.
- Make a custom extension available for usage in an “action”.
- Add the custom extension to the environments of the assistant instance.
- Use the custom extension in a step of an “action”.
Live stream on YouTube related to the example
This is simplified diagram related to live stream at YouTube.
I also create a one houre YouTube video that shows all steps for a Node.js application with the following content.
The links do provide a direct navigation to the section in the live stream.
- Introduction 01:29
- Local development
- Overview of the example Node.js application 08:01
- Clone the GitHub project to the local machine 10:29
- Develop a Node.js application and run the application locally 12:43
- Externalize the environment variables for the basic authentication 17:11
- Create a container image and run the container locally 19:54
- Push the container image to a container registry 23:18
- Understand the Open API specification/documentation 27:15
- Run the application on the IBM Cloud in Code Engine
- Create a Code Engine project and application to run the container in the cloud 30:36
- Configure the application in Code Engine 39:05
- Verify the OpenAPI documentation works 40:09
- Configure IBM Cloud Watson Assistant
- Summary 01:03:24
Again the new custom extension functionality is opening the door for Watson Assistant to consume a nearly unlimited number of integrations. Now we can combine the new functionality extensions made for Action skills with webhooks made for Dialog skills, which all the integration possible, including the out-of-the-box and the search with Watson Discovery; it feels like Watson Assistant can be used to address all business challenges.
That motivated me to create an example that starts from scratch, from the development of a simple REST API application to the containerization and the deployment to the cloud and the definition of an own Open API.
- OpenAPI related
- SwaggerHub Here you can verify your Swagger or OpenAPI documentation.
- OpenAPI Tools “OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (both 2.0 and 3.0 are supported).”
- Smartbear SwaggerHub tutorials
- Watson Assistant related
- Code Engine related
I hope this was useful for you and let’s see what’s next?