Let's build a bot!

Build apps that can respond to humans and perform automated tasks on their behalf. Botkit is a flexible tool for creating conversational software of all types.

Pre-flight Checklist

Each Botkit bot is actually a Node.js app, made up of the Botkit core library, a basic web server, and the application logic and plugins that combine to make your bot special. To run Botkit, you will need to have Node installed on your computer. If you don't already have it set up, follow the instructions here.

If you don't want to build the bot locally, we suggest remixing one of our starter kits on Glitch. Glitch provides a free place to host and edit your bot in the cloud.

Install Botkit

Use npm to install the Botkit starter kit and a tool called Yeoman.

npm install -g yo generator-botkit

Create your bot

It's time to create new Botkit app!

mkdir mybot
cd mybot
yo botkit

The command line tool will collect a few pieces of information from you, like the name of your bot. Then, it will create a pre-configured and ready-to-customize bot project for you.

Here's what you'll see:

screen capture of console output from using yo botkit command

Boot it up and say Hello!

Next, run the app from the project folder. It'll boot up and you'll be able to chat with the bot in your web browser!

npm start

If you set up a web bot, you'll see...

Chat with me: http://localhost:3000

Your bot is alive!!!!! If you did this on your local computer, you should be able to load it in your browser at http://localhost:3000 and get to chatting!

If you set up a bot for a chat platform like Slack, Webex, MS Teams, Facebook, or Google Hangouts, you'll see...

Webhook endpoint online:  http://localhost:3000/api/messages

This is your bot's messaging endpoint! You'll need to expose this to the public internet, either through a tool like ngrok, or by deploying this bot to a web host. Then, you need to follow these instructions to configure the chat platform to communicate with your new Botkit app.

Upgrade Your Bot's Brain

With your new bot up and running, now comes the fun part - creating a personality for your bot, and adding features to make it useful!

Here's a few ways you can get started:

Back to top