🚀 ¡Nuevo! builderbot cloud para No-code ¡Pruébalo gratis!

Get started with BuilderBot

This is a free and open source framework with an intuitive and extensible way to create chatbot and smart apps that connect to different communication channels like Whatsapp, Telegram and others. We have made an intuitive framework so you can have your first chatbot in minutes. Winner of the first prize at OpenExpo 2024 🏆

Quick Start

To create quickly with the following command

pnpm create builderbot@latest

⚡ Building an AI bot

In this few minutes tutorial you can have your own chatbot with whatsapp and artificial intelligence to talk about your business.

Learn how to create a bot with the new open ai assistants


Quick Example

In this example we can see the basis of a simple bot which responds to the keywords sent by a user, the words are: info, hello, hi. You can see how to create the bot and implement the flows.

import { createBot, createProvider, createFlow, addKeyword, MemoryDB } from '@builderbot/bot'
import { BaileysProvider } from '@builderbot/provider-baileys'

const welcomeFlow = addKeyword<BaileysProvider, MemoryDB>(['hello', 'hi'])
    .addAnswer('Ey! welcome')
    .addAnswer(`Send image from URL`, { media: 'https://i.imgur.com/0HpzsEm.png' })

const main = async () => {

    const adapterDB = new MemoryDB()
    const adapterFlow = createFlow([welcomeFlow])
    const adapterProvider = createProvider(BaileysProvider)

    const { handleCtx, httpServer } = await createBot({
        flow: adapterFlow,
        provider: adapterProvider,
        database: adapterDB,
    })

    httpServer(3000)

    adapterProvider.server.post('/v1/messages', handleCtx(async (bot, req, res) => {
        const { number, message } = req.body
        await bot.sendMessage(number, message, {})
        return res.end('send')
    }))
}

main()

Guides

My first chatbot

Learn how build your first chatbot in few minutes

Read more

Concepts

Understand the essential concepts for building bots

Read more

Add Functions

The key to learning how to write flows is add-functions.

Read more

Plugins

Unlimitate and start implementing the community plugins.

Read more

Resources

Modularize

Learn how to modularise flows so that you can have a more maintainable bot.

Send Message

How to send a message via HTTP to start conversations, you can send multimedia as well.

Dockerizer

A good practice is to dockerise your bots to make them more maintainable and effective.

Events

Learning about events will make us more fluent when creating chatbots.