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