Conversational Actions

Conversational Actions extend the functionality of Google Assistant by allowing you to create custom experiences, or conversations, for users of Google Assistant. In a conversation, your Conversational Action handles requests from Assistant and returns responses with audio and visual components. Conversational Actions can also communicate with external web services with webhooks for added conversational or business logic before returning a response.

In
    a back-and-forth conversation with the Google Assistant, a user asks about
    and receives an answer for when a conference session is happening.
Figure 1. An example of a Conversational Action

Why build

Typical computer interfaces require structured and predictable input to function properly, which makes the use of these interfaces unnatural and sometimes difficult. If users can't easily figure out this structured input, they'll have a hard time figuring out what to do.

For example, consider an easy user request like, "What's the forecast like today?" Other users might also ask, "What's the weather like right now?" or "What's the temperature like in San Francisco tomorrow?" Even with this simple question, you can see that conversational experiences are hard to implement, because interpreting and processing natural language requires a very robust language parser that's capable of understanding the nuances of language. Your code would have to handle all these different types of requests (and potentially many more) to carry out the same logic: looking up some forecast information for a time and location. For this reason, a traditional computer interface requires well-known, standard input requests to the detriment of the user experience, because it's easier to handle highly structured input.

However, when you build Conversational Actions, Assistant handles the natural language understanding (NLU) for you, so you can build open-ended, conversational interfaces easily. These interface tools let you understand the vast and varied nuances of human language and translate that to standard and structured meaning that your apps and services can understand. Let's take a look at how an Action might handle the previous examples for weather forecast requests.

Figure 1. NLU intent matching

To look up a weather forecast, you might need a few pieces of information, like the time users want the forecast for and their location. However, as we previously mentioned, different users might request a forecast in different way. The Assistant can understand these differences and translate them to a standard user intent to get the forecast. It can then parse the user's request for the pertinent data you need to fulfill the request. In this case, that's the user's desired time and location for the weather forecast. Finally, you can use this data to look up the weather with a public REST API and return the weather to the user in the form of a prompt.

When to build

Conversational Actions work best for simple use cases that let users get things done quickly as well as for immersive use cases that are voice-forward. Good Conversational Actions often fall into these general categories:

  • Things people can easily answer. Actions that can be accomplished with familiar input like times or dates, like booking a flight.
  • Quick, but useful Actions. These usually give users immediate benefit for very little time spent, like finding out when their favorite sports team plays next.
  • Actions that are inherently better suited for voice. These are typically things you want to do hands-free, like receiving coaching during yoga or light exercise or a game that's been designed for voice-first interactions.

How to build

Actions on Google lets you build Conversational Actions with either the Actions SDK, Actions Builder, or both interchangeably. This feature lets you choose the best development workflow for your needs, while giving you the flexibility of switching back and forth when needed.

The Actions SDK provides a standardized, file-based schema to build your Actions, libraries to interact with Assistant, and a CLI to deploy and manage your Actions project. Actions Builder is built on top of the same technology as the Actions SDK and lets you build with an easy-to-use and powerful IDE.

See the Build overview for more information.

Next steps

Check out the following resources to start building now:

  • Quick start guide - Get a quick introduction on how to set up your environment and start developing with Actions SDK and Builder.
  • Codelabs - Codelabs offer detailed and in-depth walkthroughs on how to build Actions for the Google Assistant.
  • Samples - Get all of our samples on Github to start experimenting now.