I’ve open sourced a sample that shows how to build Alexa skills via the serverless framework OpenWhisk and IBM Watson Conversation. The sample demonstrates how to define a conversation flow declaratively via Watson Conversation dialogs and it shows how to pass context between different intents.

Here is a sample conversation flow:

User: Alexa, ask my skill what do you know about me

Alexa/Watson: I don’t know anything about you. Where do you live?

User: Berlin

Alexa/Watson: Now I know you live in Berlin

User: Alexa, ask my skill what is the weather

Alexa/Watson: Looking up weather information for Berlin …

The sample has been implemented via the new slots filling functionality in Watson Conversation. The screenshot shows how the entity (slot) ‘location’ is defined as mandatory and how the value is stored in a context variable.

The next screenshot shows how the location is automatically used in the next ‘weather’ intent.

To build your own Alexa skills via OpenWhisk and Watson, check out the instructions in the GitHub project.