Convert Figma logo to code with AI

howdyai logobotkit

Botkit is an open source developer tool for building chat bots, apps and custom integrations for major messaging platforms.

11,468
2,283
11,468
46

Top Related Projects

Bot Framework provides the most comprehensive experience for building conversation applications.

12,494

The open-source hub to build & deploy GPT/LLM Agents ⚡️

18,602

💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants

43,143

Create agents that monitor and act on your behalf. Your agents are standing by!

Quick Overview

Botkit is an open-source developer tool for building chat bots, apps, and custom integrations for major messaging platforms. It provides a consistent interface for creating conversational interfaces across various platforms, including Slack, Facebook Messenger, Twilio, and more.

Pros

  • Easy to use and quick to get started with, thanks to its intuitive API and extensive documentation
  • Supports multiple messaging platforms, allowing developers to create cross-platform bots with minimal effort
  • Provides a wide range of built-in features, including natural language processing and conversation management
  • Active community and regular updates, ensuring ongoing support and improvements

Cons

  • Some users report occasional stability issues, especially with more complex bot implementations
  • The learning curve can be steep for developers new to bot development or specific messaging platforms
  • Limited customization options for advanced use cases compared to building bots from scratch
  • Dependency on third-party services for certain features, which may impact performance or reliability

Code Examples

  1. Creating a simple Slack bot:
const { Botkit } = require('botkit');

const controller = new Botkit({
  webhook_uri: '/api/messages',
});

controller.on('message', async(bot, message) => {
  await bot.reply(message, 'I heard a message!');
});
  1. Adding a simple conversation flow:
controller.hears(['hello', 'hi'], ['message'], async(bot, message) => {
  await bot.beginDialog(message, 'greeting');
});

controller.addDialog(new BotkitConversation('greeting', controller));

controller.dialogSet.dialogs.get('greeting').addQuestion('How are you?', async(response, convo, bot) => {
  await bot.say(`Nice to meet you! You said: ${response}`);
}, 'feeling');
  1. Implementing a custom middleware:
controller.middleware.receive.use((bot, message, next) => {
  message.timestamp = new Date();
  next();
});

Getting Started

  1. Install Botkit:
npm install botkit
  1. Create a new bot file (e.g., mybot.js):
const { Botkit } = require('botkit');

const controller = new Botkit({
  webhook_uri: '/api/messages',
});

controller.on('message', async(bot, message) => {
  await bot.reply(message, 'Hello, I am your bot!');
});

controller.webserver.get('/', (req, res) => {
  res.send(`This app is running Botkit ${controller.version}.`);
});
  1. Run your bot:
node mybot.js

Competitor Comparisons

Bot Framework provides the most comprehensive experience for building conversation applications.

Pros of Bot Framework SDK

  • More comprehensive and feature-rich, supporting multiple channels and languages
  • Better integration with Azure services and Microsoft ecosystem
  • Stronger enterprise-level support and documentation

Cons of Bot Framework SDK

  • Steeper learning curve due to its complexity
  • More resource-intensive and potentially slower development process
  • Tighter coupling with Microsoft technologies, which may limit flexibility

Code Comparison

Bot Framework SDK:

public class EchoBot : ActivityHandler
{
    protected override async Task OnMessageActivityAsync(ITurnContext<IMessageActivity> turnContext, CancellationToken cancellationToken)
    {
        var replyText = $"Echo: {turnContext.Activity.Text}";
        await turnContext.SendActivityAsync(MessageFactory.Text(replyText, replyText), cancellationToken);
    }
}

Botkit:

controller.hears(['hello', 'hi'], ['direct_message', 'direct_mention', 'mention'], function(bot, message) {
    bot.reply(message, 'Hello yourself.');
});

Bot Framework SDK offers a more structured approach with stronger typing and built-in activity handling, while Botkit provides a simpler, event-driven model for bot development. Bot Framework SDK is better suited for complex, enterprise-level projects, whereas Botkit excels in rapid prototyping and simpler bot implementations.

12,494

The open-source hub to build & deploy GPT/LLM Agents ⚡️

Pros of Botpress

  • More comprehensive platform with built-in NLU, analytics, and visual flow builder
  • Supports multiple channels out-of-the-box (e.g., web, Messenger, Slack)
  • Active development and regular updates

Cons of Botpress

  • Steeper learning curve due to more complex architecture
  • Requires more system resources to run
  • Less flexible for custom integrations compared to Botkit

Code Comparison

Botpress (JavaScript):

bp.hear(/hello/i, async (bp, event) => {
  await bp.messaging.sendText(event.channel.id, 'Hello, human!')
})

Botkit (JavaScript):

controller.hears('hello', 'message', async(bot, message) => {
  await bot.reply(message, 'Hello, human!')
})

Both frameworks use similar event-driven approaches, but Botpress offers more built-in functionality and a modular architecture. Botkit provides a simpler API for basic bot interactions, making it easier for beginners to get started. However, Botpress offers more advanced features and scalability for complex chatbot projects.

18,602

💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants

Pros of Rasa

  • More advanced natural language understanding (NLU) capabilities
  • Supports multiple languages out of the box
  • Offers both open-source and enterprise versions

Cons of Rasa

  • Steeper learning curve for beginners
  • Requires more setup and configuration
  • Less extensive documentation compared to Botkit

Code Comparison

Rasa example (Python):

from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher

class ActionHelloWorld(Action):
    def name(self) -> str:
        return "action_hello_world"

    def run(self, dispatcher: CollectingDispatcher,
            tracker: Tracker,
            domain: Dict[str, Any]) -> List[Dict[str, Any]]:
        dispatcher.utter_message(text="Hello World!")
        return []

Botkit example (JavaScript):

controller.hears(['hello', 'hi'], ['direct_message', 'direct_mention', 'mention'], function(bot, message) {
    bot.reply(message, 'Hello!');
});

Rasa focuses on more complex NLU tasks and multi-language support, while Botkit provides a simpler approach for creating chatbots. Rasa's code structure is more verbose and requires more setup, but offers greater flexibility for advanced use cases. Botkit's code is more straightforward and easier to get started with, making it suitable for simpler chatbot implementations.

43,143

Create agents that monitor and act on your behalf. Your agents are standing by!

Pros of Huginn

  • More versatile and can automate a wide range of tasks beyond just chatbots
  • Supports multiple data sources and can create complex workflows
  • Has a web-based interface for easier management and monitoring

Cons of Huginn

  • Steeper learning curve due to its complexity and wide range of features
  • Requires more setup and configuration compared to Botkit
  • May be overkill for simple chatbot projects

Code Comparison

Huginn (Ruby):

agent = Agents::WebsiteAgent.new
agent.name = "My Website Agent"
agent.options = {
  'url' => 'https://example.com',
  'mode' => 'on_change'
}
agent.save!

Botkit (JavaScript):

const bot = controller.spawn({
  token: process.env.TOKEN
});

controller.hears(['hello'], 'direct_message', (bot, message) => {
  bot.reply(message, 'Hi there!');
});

Summary

Huginn is a powerful automation platform that can handle various tasks, including but not limited to chatbots. It offers more flexibility and can create complex workflows across different data sources. However, this versatility comes at the cost of a steeper learning curve and more complex setup.

Botkit, on the other hand, is specifically designed for building chatbots and conversational interfaces. It's more straightforward to use for chatbot development but lacks the broader automation capabilities of Huginn.

Choose Huginn for complex, multi-faceted automation tasks, and Botkit for focused chatbot development.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Botkit

Botkit is an open source developer tool for building chat bots, apps and custom integrations for major messaging platforms.

This repository contains the core Botkit library, as well as a series of plugins and extensions for connecting Botkit to messaging and chat platforms and other tools in the bot building ecosystem.

Botkit is part of the Microsoft Bot Framework and is released under the MIT Open Source license

Use Botkit

Packages included in this repo

PackageDescriptionNPM Status
botkitBotkit Core libraryNPM Badge
botbuilder-adapter-webA platform adapter for the webNPM Badge
botbuilder-adapter-slackA platform adapter for SlackNPM Badge
botbuilder-adapter-webexA platform adapter for Webex TeamsNPM Badge
botbuilder-adapter-hangoutsA platform adapter for GoogleNPM Badge
botbuilder-adapter-twilio-smsA platform adapter for Twilio SMSNPM Badge
botbuilder-adapter-facebookA platform adapter for Facebook MessengerNPM Badge
generator-botkitA Yeoman generator for creating a new Botkit projectNPM Badge
botkit-plugin-cmsA plugin that adds support for Botkit CMSNPM Badge

Build Botkit locally

This repo contains multiple inter-linked packages containing Botkit Core, platform adapter packages, and some additional plugins and extensions. To build these locally, follow the instructions below.

Install lerna and TypeScript globally:

npm install -g typescript
npm install -g lerna

Clone the entire Botkit project from Github.

git clone git@github.com:howdyai/botkit.git

Enter the new folder and install the dependent packages:

cd botkit
npm install

Use lerna to set up the local packages:

lerna bootstrap --hoist

Now, build all of the libraries:

lerna run build

To build updated versions of the class reference documents found in packages/docs, run:

lerna run build-docs

NPM DownloadsLast 30 Days