Get Talking
with Actions on Google
Abraham Williams
Pearl Latteier
Senior Engineers at Bendyworks
Google Developer Experts
Google Developer Group Organizers
slides.today
To follow along with today’s slides.
Voice is the new platform
Siri
Bixby
Alexa
Cortana
Google Assistant
AI is
the new platform
Google Assistant
Assistant SDK
Actions on Google
Smart Home
Movie Maven
Press 1 for our updated menu
Be cooperative
Instill confidence
Act natural
Hey Google, let me talk to Movie Maven
{
"conversation": {
"conversation_id": "...",
"type": "ACTIVE",
"conversation_token": "..."
},
"inputs": [{
"intent": "assistant.intent.action.MAIN",
"raw_inputs": [{
"query": "..."
}]
}]
}
Actions SDK
Dialogflow
Dialogflow Agent
Agent
INTENT
Agent
ACTION
Blah Blah Blah
Intents
Intents
Entities
Entities
Prebuilt Agents
Food delivery
Food delivery
Fulfillment
Dialogflow makes HTTP request
const { DialogflowApp } = require('actions-on-google');
const app = new DialogflowApp({
request: request,
response: response
});
app.handleRequest(function() {
let actionMap = new Map();
actionMap.set(WELCOME_ACTION, welcome);
actionMap.set(ASK_GENRE_ACTION, askGenre);
actionMap.set(GET_MOVIE_ACTION, getMovie);
...
return actionMap;
});
Runs method assigned to action
Server tells Dialogflow how to respond
Assistant ask/tell
function quit(app) {
app.tell("OK, see you later.");
}
function askGenre(app) {
app.ask("What genre would you like?")
}
SSML support
<speak>
Here are <say-as interpret-as="characters">SSML</say-as> samples.
I can pause <break time="3s"/>.
I can speak in cardinals. Your number is <say-as interpret-as="cardinal">10</say-as>.
</speak>
Store data between requests
function getLastGenres(app) {
return app.data.last_genres;
}
function setLastGenres(app, genres) {
app.data.last_genres = genres;
}
Train and Test
Your Bot!
Training
Testing
Language Support
Distribution & Discovery
Distribution
App Directory
Invocation
“Hey Google, let me talk to Movie Maven”
“Hey Google, I’d like a recommendation for a funny movie”
Re-engagement
Daily Updates
Push Notifications
Preview
Where to next?
Actions on Google Codelab
1pm, Room 3
Templates
Apps for Families
Create apps for the Google Assistant that engage the whole family.
Transactions API
Profit
slides.today
Resources
We design and build software that stands the test of time, specializing in Ruby on Rails, JavaScript, Clojure, and Ionic.
Craft a project with us at bendyworks.com
Find today’s slides at slides.today
Pearl Latteier
pearl@bendyworks.com
twitter.com/pblatteier
github.com/pearlbea
Abraham Williams
abraham@bendyworks.com
twitter.com/abraham
github.com/abraham