In a nutshell, downloadable software like apps are in class 009. Software that is used in the cloud or on webapps is in 042. Artificial Intelligence usually resides on a server so it would also be in class 042. Transmission of data and information, like in a messenger app, is in class 038. So you may end us with several trademark classes to cover the function of your software.