Node.js Client Library

The Actions On Google client library for API.AI and Actions SDK is a NodeJS module that faciliates communication between your webhook and API.AI or the Actions SDK. It wraps the JSON payloads for the HTTP POST request and generates a JSON payload for the response.


To install the client library, run the following command:

cd <nodejs-project-dir>/
npm install actions-on-google --save

For more information on how to use the client library, see:

Release Notes


Version 1.0.9

  • Added a getContextArgument() method
  • Added a getContext() method to retrieve a particular context
  • Fixes to getArgument() method


Version 1.0.8

  • Defensive check for conversation type in ActionsSDK request


Version 1.0.7

  • Defensive check for originalRequest object in ApiAiAssistant constructor


Version 1.0.6

  • Added ‘getContexts()’ method


Version 1.0.5

  • Improved error handling for getArgument() method
  • Fix error handling for getUser() method


Version 1.0.4

  • Documentation fixes.
  • Improved debug logging.
  • Improved support for SSML syntax.


Version 1.0.3

  • Removal of support of inDialogTriggers in the Actions SDK.
  • Change in ActionsSdkAssistant.ask method parameters.


Version 1.0.2

  • Initial public launch of the client library on GitHub and NPM.