Actions on Google lets you extend the functionality of the Google Assistant with Assistant apps that contain actions. Actions let users get things done through a conversational interface that can range from a quick command to turn on some lights or a longer conversation, such as playing a trivia game.
API.AI is a conversational platform that lets you design and build actions by wrapping the functionality of the Actions SDK and providing additional features such as an easy-to-use IDE, natural language understanding (NLU), machine learning, and more.
To extend the Google Assistant, you build an app with the following steps.
Design your Conversation
Before developing, you should design your conversation, or the user interface for your app. The conversation describes how users invoke your app, the valid things that they can say to your app, and how your app responds to them.
Create an Actions on Google developer project and API.AI Agent
Go to the Actions on Google Developer Console and create a developer project. The project lets you define metadata about your app and manage and track your app through the approval process. Once you have a project, you can create an API.AI agent that defines all your actions.
You define actions in your API.AI agent with intents that define entry points into your app's functionality. For example, say you wanted to build an app that could purchase some goods, check the status of orders, and to show some daily deals. You can define intents that are triggered by saying:
- "Ok Google, talk to My Favorite Shoe Store to purchase some shoes"
- "Ok Google, talk to My Favorite Shoe Store to check on my order"
- "Ok Google, talk to My Favorite Shoe Store to show me today's deals"
Build and deploy fulfillment
When an action in your app is invoked, it calls fulfillment to start a conversation with users to fulfill the action.
To create your conversation, you define intents in API.AI to create your conversation's grammar, or the things users can actually say to your action. When users actually say something to trigger an intent, your fulfillment is called and returns a response back to the user.
This back and forth request and response happens repeatedly until your fulfillment has enough information to complete the action.
Submit your app for approval and make it available to users