# BuilderBot > BuilderBot é um framework open-source em TypeScript e JavaScript para criar chatbots e agentes conversacionais no WhatsApp (Baileys, Meta Cloud API, Twilio, Venom, WPPConnect), Telegram e outros canais com bancos de dados intercambiáveis (Memory, JSON, MongoDB, MySQL, PostgreSQL). Key facts for coding agents and LLMs: - **Scaffold a new project:** `pnpm create builderbot@latest` or `npm create builderbot@latest` (requires Node.js >= 20 and Git). - **Core package:** `@builderbot/bot` — exports `createBot`, `createFlow`, `createProvider`, `addKeyword`, `addAnswer`, `EVENTS`, `MemoryDB`. - **Three core primitives:** **Flow** (conversation steps built with `addKeyword(...).addAnswer(...).addAction(...)`), **Provider** (channel adapter such as `@builderbot/provider-baileys`, `@builderbot/provider-meta`, `@builderbot/provider-twilio`), and **Database** (`@builderbot/database-memory`, `@builderbot/database-json`, `@builderbot/database-mongo`, `@builderbot/database-mysql`, `@builderbot/database-postgres`). - **Markdown endpoints:** Every documentation page has a clean Markdown counterpart at `.md` (for example, `https://www.builderbot.app/pt/quickstart.md`). - **Context bundles:** Curated core context at [https://www.builderbot.app/llms-ctx.txt](https://www.builderbot.app/llms-ctx.txt) and complete documentation corpus at [https://www.builderbot.app/llms-full.txt](https://www.builderbot.app/llms-full.txt). - **Localized indexes:** [English (https://www.builderbot.app/en/llms.txt)](https://www.builderbot.app/en/llms.txt) · [Español (https://www.builderbot.app/es/llms.txt)](https://www.builderbot.app/es/llms.txt) · [Português (https://www.builderbot.app/pt/llms.txt)](https://www.builderbot.app/pt/llms.txt). ## Start here - [Introdução ao BuilderBot](https://www.builderbot.app/pt/index.md): Com esta biblioteca, pode configurar respostas automatizadas a perguntas frequentes, receber e responder a mensagens de forma automatizada e acompanhar as interações com os clientes. Além disso, o nosso Chatbot... - [Quickstart](https://www.builderbot.app/pt/quickstart.md): Este guia irá prepará-lo e pronto para usar a API do Protocolo. Abordaremos como iniciar um cliente de API e como fazer sua primeira solicitação de API. - [Concepts](https://www.builderbot.app/pt/concepts.md): A biblioteca baseia-se em três componentes fundamentais para o seu correcto funcionamento: o fluxo, encarregado de construir o contexto da conversa e de oferecer uma interface amigável ao programador; o fornecedor, que... - [Practices](https://www.builderbot.app/pt/uses-cases.md): Abaixo, você encontrará diferentes exemplos mostrando a implementação em diferentes casos de uso. Estes exemplos foram compilados com base na comunidade, sinta-se livre para postar um exemplo que você gosta ou que você... - [Templates](https://www.builderbot.app/pt/templates.md): Templates completos do BuilderBot: um agente com ferramentas, vendas no WhatsApp com catálogo, perguntas sobre um PDF ou um link e suporte com passagem para uma pessoa. Um arquivo para colar, e roda no seu navegador. - [Playground](https://www.builderbot.app/pt/playground.md): Escreva fluxos do BuilderBot com addKeyword, addAnswer e addAction e converse com eles no navegador, com o núcleo real do @builderbot/bot. ## Basics - [Features](https://www.builderbot.app/pt/add-functions.md): Estas são as funções mais importantes que você deve aprender ao criar fluxos ou interações dinâmicas com o bot - [Context](https://www.builderbot.app/pt/context.md): O objeto "contexto" é um componente-chave dentro da estrutura que fornece aos desenvolvedores acesso a informações essenciais sobre a interação contínua entre o Usuário e o bot. Esta informação inclui propriedades... - [Methods](https://www.builderbot.app/pt/methods.md): Em muitas ocasiões, você precisará compartilhar dados entre fluxos e não importa se modularizou seu projeto em arquivos diferentes, você pode usar o estado na função de retorno de chamada para poder acessar o estado... - [Events](https://www.builderbot.app/pt/events.md): Às vezes, os usuários enviam mensagens como uma imagem, um vídeo ou mensagens de localização especial, entre outras, para receber e iniciar uma conversa quando chega uma mensagem desse tipo, podemos usar os eventos. - [Errors](https://www.builderbot.app/pt/errors.md): Guia oficial do BuilderBot sobre Errors: exemplos em TypeScript/JavaScript para bots de WhatsApp e Telegram. ## Databases - [Databases](https://www.builderbot.app/pt/databases.md): Assim como os fornecedores podem ser facilmente trocados entre adaptadores, podemos fazer o mesmo com a base de dados. Agora, o importante a entender é como funciona. O principal objectivo do banco de dados dentro da... - [Memory](https://www.builderbot.app/pt/databases/memory.md): Guia oficial do BuilderBot sobre Memory: exemplos em TypeScript/JavaScript para bots de WhatsApp e Telegram. - [Supabase Uses Cases](https://www.builderbot.app/en/databases/postgres/uses-cases.md): Connect to your Cloud Supabase database - [Getting Starter](https://www.builderbot.app/en/databases/postgres/uses-cases/uses-cases-supabase.md): Postgres database supports other types of connections as in this case it is Supabase, let's take a quick tour on the Supabase platform to get our database credentials ## Providers - [Providers](https://www.builderbot.app/pt/providers.md): Os provedores são responsáveis por fornecer a ponte de comunicação entre seu bot e whatsapp, telegram ou provedor personalizado. - [baileys](https://www.builderbot.app/pt/providers/baileys.md): A plataforma WhatsApp Business permite que empresas de médio e grande porte se comuniquem com seus clientes em grande escala. Você pode iniciar conversas com os clientes em apenas alguns minutos, enviar-lhes... - [Blocked Users on BOT](https://www.builderbot.app/en/providers/baileys/blocked-users.md): To check the blocked users on the BOT, you should use the 'fetchBlocklist()' method of the provider. This method has the following signature: - [Delete Bot Message](https://www.builderbot.app/en/providers/baileys/delete-bot-message.md): We can use the sendMessage method to delete a message sent by the bot. This method has the following signature: - [Contacts on BOT](https://www.builderbot.app/en/providers/baileys/delete-on-bot.md): From the adapterProvider, we can utilize the store property to fetch all contacts, store them in a variable, and subsequently display them to the user. This property has the following signature: - [External API Call](https://www.builderbot.app/en/providers/baileys/external-api.md): Firstly, let's create a script named 'getjoke.ts' inside a folder called 'services'. This script will handle the API call to the external service and return the response. Then, in our 'app.ts', we import it, make the... - [Fetch Status](https://www.builderbot.app/en/providers/baileys/fetchStatus.md): This method has the following signature: - [Basic Menu](https://www.builderbot.app/en/providers/baileys/menu.md): Basic menu navigating to two sub-menus with the option to return to the main menu. - [Meta](https://www.builderbot.app/pt/providers/meta.md): Neste guia, discutiremos o que fazer quando algo der errado ao trabalhar com a API. - [Meta Uses Cases](https://www.builderbot.app/en/providers/meta/uses-cases.md): There are several features that the default provider does not provide and you can create them along the way - [Providers](https://www.builderbot.app/pt/providers/twilio.md): A plataforma WhatsApp Business permite que empresas de médio e grande porte se comuniquem com seus clientes em grande escala. Você pode iniciar conversas com os clientes em apenas alguns minutos, enviar-lhes... - [Twilio Uses Cases](https://www.builderbot.app/en/providers/twilio/uses-cases.md): Official BuilderBot guide for Twilio Uses Cases: TypeScript and JavaScript examples for WhatsApp and Telegram chatbots. - [Twilio Setup](https://www.builderbot.app/en/providers/twilio/deploy.md): Twilio is a development platform that enables developers to build cloud communication applications and web systems. Twilio's communication APIs empower businesses to provide the appropriate communication experience for... - [venom](https://www.builderbot.app/pt/providers/venom.md): A plataforma WhatsApp Business permite que empresas de médio e grande porte se comuniquem com seus clientes em grande escala. Você pode iniciar conversas com os clientes em apenas alguns minutos, enviar-lhes... - [wpp-connect](https://www.builderbot.app/pt/providers/wpp-connect.md): A plataforma WhatsApp Business permite que empresas de médio e grande porte se comuniquem com seus clientes em grande escala. Você pode iniciar conversas com os clientes em apenas alguns minutos, enviar-lhes... ## Deploy - [Deploying](https://www.builderbot.app/en/deploy.md): Congratulations the time has come to take your project to production and for your convenience there are several ways to achieve this from quite tenic options to other easier strategies. - [Railway](https://www.builderbot.app/en/deploy/railway.md): Railway provides infrastructure primitives with sane defaults to manage secrets, builds, and deploys. So you can start quickly and focus on your product. - [Deploy](https://www.builderbot.app/en/deploy/docker.md): In this guide, we will discuss how to create a Dockerfile and how to deploy your bot. - [VPS (Virtual Private Server)](https://www.builderbot.app/en/deploy/vps.md): Prioritize initiating a connection to your server using SSH or via your chosen cloud provider's preferred method. This initial step is essential to start following this entire tutorial. - [Deploying Your Chatbot with Meta API](https://www.builderbot.app/en/deploy/meta.md): This guide is designed for those who have already followed the official documentation at Meta Provider. It assumes that developer accounts have been created and business and app verification has been completed. ## Recipes & Showcases - [Showcases](https://www.builderbot.app/pt/showcases.md): Guia oficial do BuilderBot sobre Showcases: exemplos em TypeScript/JavaScript para bots de WhatsApp e Telegram. - [Queue](https://www.builderbot.app/pt/showcases/queue-limit.md): Implement message queues for better resource management - [Modularize](https://www.builderbot.app/pt/showcases/modularize.md): Implementar filas de mensagens para uma melhor gestão dos recursos - [Fast Entires](https://www.builderbot.app/pt/showcases/fast-entires.md): Implementar filas de mensagens para uma melhor gestão dos recursos - [Idle](https://www.builderbot.app/en/showcases/idle-optional.md): The inactivity of flows in our business logic can become a nuisance, that is why we share the following resources as an alternative solution to this situation. - [Scheduled Reboots](https://www.builderbot.app/en/showcases/docker-pm2.md): When using the free providers we will need to restart the bot to avoid accumulating temporary data that may affect its performance. In that case an easy solution to implement is to schedule restarts, these restarts will... - [Incoming and outgoing messages](https://www.builderbot.app/en/showcases/event-in-out-messages.md): In the example below we show a code which you can execute and observe the messages in the console. The objective is to capture the incoming and outgoing message from the bot. - [Reminder (cron)](https://www.builderbot.app/en/showcases/cron-reminder.md): For this we will need to install some dependencies that will facilitate the work of the scheduled tasks, we will use node-cron below you will find the instructions on how to install install - [Forward conversation to human](https://www.builderbot.app/en/showcases/forward-conversation-to-human.md): In this example let's imagine that the bot number is ADMINNUMBER the idea is that if a user writes me the bot will answer this is correct, but I want to pause the bot for that user, what I do is write to my own number... - [Como Usar GotoFlow?](https://www.builderbot.app/pt/showcases/gotoflow-use.md): GotoFlow é um recurso projetado para permitir a transição de um fluxo para outro dentro de um bot do WhatsApp. Essa capacidade é particularmente útil quando se tem lógica de negócios distribuída em diferentes fluxos... - [Multiple messages](https://www.builderbot.app/en/showcases/multiple-messages.md): Implement a debounce decorator to prevent the bot from responding multiple times in a short period of time - [How to implement a REST API?](https://www.builderbot.app/pt/showcases/api-use.md): Em muitas ocasiões, precisamos enviar uma mensagem via solicitação HTTP é muito útil para enviar lembretes ou confirmações de Pedidos. Nesse caso, cada provedor implementa uma função handleCtx que permite injetar a... ## Tutorials - [Tutorials](https://www.builderbot.app/en/tutorials.md): Official BuilderBot guide for Tutorials: TypeScript and JavaScript examples for WhatsApp and Telegram chatbots. - [Migrating from bot-whatsapp to builderbot: A Simple Guide](https://www.builderbot.app/en/tutorials/migrate-to-builderbot.md): builderbot is the next evolution of bot-whatsapp, maintaining 99% compatibility while introducing significant improvements. This guide will walk you through the straightforward migration process. - [How to implement a REST API?](https://www.builderbot.app/en/tutorials/api-use.md): In many occasions we need to send a message via HTTP request is very useful to send reminders or order confirmations. In this case each provider implements a handleCtx function which allows you to inject the bot... - [Chatbot with Context](https://www.builderbot.app/en/tutorials/chatbot-with-gemini.md): Implement context for your chatbot solution - [Langchain](https://www.builderbot.app/en/tutorials/langchain.md): When we want something more personality and intelligence in our assistants, the first thing we think about is Openai, what if I tell you that there is a simple way to get the most out of your LLM? ## Plugins - [CONTRIBUTING](https://www.builderbot.app/pt/plugins.md): Contribuindo connosco, juntando-se e codificando lado a lado uma grande comunidade - [Telegram](https://www.builderbot.app/pt/plugins/telegram.md): O Telegram é um provedor amigável, neste artigo você aprenderá como integrar seus bots do Telegram à biblioteca. - [Shopify](https://www.builderbot.app/pt/plugins/shopify.md): Saiba como implementar o seu próprio bot da Shopify para ajudar os clientes da sua loja e cuidar das vendas - [OpenAi Plugin](https://www.builderbot.app/pt/plugins/agents.md): Instalar a biblioteca para fazer uso do OpenAI: - [Builderbot x Langchain](https://www.builderbot.app/en/plugins/langchain.md): This is a series of utilities that use AI based on the langchain framework ## Optional - [Contribute](https://www.builderbot.app/en/contribute.md): Welcome to the BuilderBot Contribution Guide We're glad to have you here. - [Core](https://www.builderbot.app/en/contribute/core.md): Official BuilderBot guide for Core: TypeScript and JavaScript examples for WhatsApp and Telegram chatbots. - [BuilderBot Brand Guidelines and Assets](https://www.builderbot.app/en/resources.md): Brand guidelines and assets for using Instagram logos and resources. - [Attachments](https://www.builderbot.app/pt/attachments.md): Nesta página, vamos nos aprofundar nos diferentes endpoints de anexos que você pode usar para gerenciar anexos programaticamente. - [Contacts](https://www.builderbot.app/pt/contacts.md): Nesta página, vamos nos aprofundar nos diferentes endpoints de contato que você pode usar para gerenciar contatos programaticamente. - [Conversations](https://www.builderbot.app/pt/conversations.md): Nesta página, vamos nos aprofundar nos diferentes pontos finais de conversação que você pode usar para gerenciar conversas programaticamente. - [Groups](https://www.builderbot.app/pt/groups.md): Nesta página, vamos nos aprofundar nos diferentes endpoints de grupo que você pode usar para gerenciar grupos programaticamente. - [Messages](https://www.builderbot.app/pt/messages.md): Nesta página, vamos nos aprofundar nos diferentes endpoints de mensagens que você pode usar para gerenciar mensagens programaticamente. - [Webhooks](https://www.builderbot.app/pt/webhooks.md): Guia oficial do BuilderBot sobre Webhooks: exemplos em TypeScript/JavaScript para bots de WhatsApp e Telegram.