In App chat bot with Web Sockets

Hi Friends

I want to add a “chat bot” to my app and suspect I need to use websockets for it to work properly.

Can I do this with normal JS/TS in the runtime, or will I need to implement this via HTML Bridge / custom app package?