Mycroft Community Forum

Creating new intents at runtime

I am trying to make a new skill that should be released soon, but to finish I need to make it create new intents, each associated with new code, during run time.
This would be an example:
intents = []
commands = {bla bla bla}
for command, user_phrase in commands:
intents.append(create_intent(user_phrase, a_function_that_changes(command))) #the function changes based command

I’m not sure if this makes any sense, but any help would be appreciated!

I’m trying to understand your problem. Can you explain the function of the skills in more detail? In the marketplace I have the learning skill that intents local can create.

I’ve already worked on something like this but I don’t have the matching with existing functions

The register_intent method can be used to add new intents during runtime. Not sure if this it covers all you want to do though.