How to code rich interactions?

As a reminder, Actions are the expected behaviors to be triggered on device once the Intent has been caught by the App.

Here, we are going to describe everything you need to code rich interactions.

The first thing your action code will need to do is to listen to intents being detected, to know when your action code needs to run. One way to do this is to directly connect to the MQTT, in the corresponding channels. This can be done from pretty much any language, on any platform, in a similar way. We describe it here.

If you are using Python to write your action code, we provide you with a helper library Hermes Python. This Python library will abstract the connection to the Hermes protocol we built on top of MQTT, making it easier to send and receive messages.

In addition, if your code follows certain specifications, the Snips apps server will take care of running your code in the background.

If you are running into any issue whith your code, follow our instructions on how to debug your actions. You can also check the troubleshooting & faq page for common issues.

Once you are happy with your action code, you can chose to publish it on Github, and link it to your voice app:

Linking the Snips' weather skill demo

Any app on the store that is linked to a Github account in Python, will be installable out of the box for anyone using SAM. Build rich interactions, and share them on the app store!