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

Get started with BuilderBot

Esto es un free y marco de código abierto con una forma intuitiva y extensible de crear chatbot y aplicaciones inteligentes que se conecten a diferentes canales de comunicación como Whatsapp, Telegram y otros. Hemos creado un marco intuitivo para que pueda tener su primer chatbot en minutos.

Quick Start

Para instalar rápidamente con el siguiente comando

pnpm create builderbot@latest

Quick Example

En este ejemplo podemos ver la base de un bot simple que responde a las palabras clave enviadas por un usuario, las palabras son ` 'info, hola, hola'. Puedes ver cómo crear el bot e implementar el 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')

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.