Create a Node.js interface to the API.AI agent

There are many ways to connect to an API.AI agent. We discussed some of them in Chapter 3, Let's Talk Weather. In this section, we will explore one more approach: 

  1. Create a Node.js program called apiai.js in the project root directory.
  2. Install the API.AI Node.js library using the following command from the console:
npm install apiai --save
  1. Go back to agent settings (click the settings icon next to the agent's name on the drop-down list) on the web console:
  1. Under the General tab, copy the Developer access token:
  1. Go back to the Node.js program, apiai.js, and create a request to access the ...

Get Hands-On Chatbots and Conversational UI Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.