IDK is initiated by a roku component in a standard main.brs file. You can use any Roku API functions in this space. Once you have started an IDK instance, you no longer have access to brightscript/Scenegraph. You can however pass variables to the IDK instance. You may also be able to run brightscript on IDK instance exit but I have not attempted doing that yet.