Android 8.0 allows users to activate Google Assistant inside an app
Because users can change the default personal assistant on their device, this means that depending on the virtual assistant chosen, sometimes it might be Cortana or even Alexa that gets activated inside an app. According to XDA, the personal assistant will be displayed as a new layer on top of "other activities," and it won't be affected by multi-window at all.
Of course, the device being used must be powered by Android 8.0 (Oreo), along with the app. This is the kind of third party integration that Amazon's Alexa has done very well, and now it seems that Google Assistant will be trying to show that it can blend in with a third party app as well.
source: Android Developers via XDA