Intent Extraction for external use

I need to extract the intent of the user input in the real time and need to pass that as an argument to the python function to proceed my project. I couldn’t fin enough resources to implement this.