Skip to content
Botkit library for Dialogflow
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
samples Add contributing file and updates license Aug 17, 2017
.gitignore Move Slack sample Mar 28, 2017
.npmignore Add npmignore Mar 30, 2016 Add contributing file and updates license Aug 17, 2017
LICENSE Add deprecation notice Feb 20, 2019
api-ai-botkit.js Add contributing file and updates license Aug 17, 2017
package.json Change version Jan 23, 2017

DEPRECATED api-ai-botkit

This Dialogflow client library and Dialogflow API V1 have been deprecated and will be shut down on October 23th, 2019. Please migrate to Dialogflow API V2 and the v2 client library


Utility lib for creating bots. So far only tested with Slack.

For usage sample code see examples/sample_bot.js

Steps for using lib

Install library from npm

npm install --save api-ai-botkit

Import Library

const apiaibotkit = require('api-ai-botkit');

Create apiai object using token from website

const apiai = apiaibotkit(apiaiToken);

Use apiai object in controller.hears

controller.hears('.*', ['direct_message', 'direct_mention', 'mention'], function (bot, message) {
    apiai.process(message, bot);

Implement different reactions to appropriate actions

    .action('smalltalk.greetings', function (message, resp, bot) {
        var responseText = resp.result.fulfillment.speech;
        bot.reply(message, responseText);
    .action('input.unknown', function (message, resp, bot) {
        bot.reply(message, "Sorry, I don't understand");




Your use of this sample is subject to, and by using or downloading the sample files you agree to comply with, the Google APIs Terms of Service.

This is not an official Google product.

You can’t perform that action at this time.