Rather than creating the complete widget I would use Amazon Lex api in a module to achieve this. However, this will end up costing you for the service. The first year you can process 10.000 request free, after this you have to start paying. More info:
You can integrate this in your app by using the api of Amazon Lex, this is quite easy to achieve with REST calls. With the PostText call you can post a message to your bot and than it will return a reply from the bot which you can show in your app.
You will have to setup a bot first and go trough all their steps to configure it etc:
How to implement a REST call in Mendix you can find in the topics in the academy:
do you have some experience if that approach would work for the integration with IBM Watson Assistant too?
Its just as easy to use IBM Watson. You can even tie into their socket on their demo page to create a real time connection without having to use a timer. the UI component for a chat UI is really just a heavily CSS'd series of group boxes and a custom list that loads the last record to the bottom instead of the top.