# Get started with BuilderBot

> BuilderBot With this library, you can set up automated responses to frequently asked questions, receive and respond to messages in an automated way, and track customer interactions. In addition, our Chatbot integrates...
>
> - **Canonical URL:** https://www.builderbot.app/en
> - **Documentation Index:** https://www.builderbot.app/llms.txt
> - **Full Corpus:** https://www.builderbot.app/llms-full.txt

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](/plugins/telegram)__, __[Telegram](/plugins/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](https://a.cstmapp.com/voteme/974264/712365893)

## Quick Start
To create quickly with the following command

```bash (pnpm)
pnpm create builderbot@latest
```

```bash (npm)
npm create builderbot@latest
```

  [Installation and requirements](/quickstart#install)

---

## 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.

<Video label="Learn how to create a bot with the new open ai assistants" yt="SfYvU3bOMcM" />

  [Code repository](https://github.com/leifermendez/builderbot-openai-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](/concepts#flow).

```ts (main.ts)
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()
```

```js (main.js)
const { createBot, createProvider, createFlow, addKeyword, MemoryDB } = require('@builderbot/bot')
const { BaileysProvider } = require('@builderbot/bot')

/** send static messages */
const welcomeFlow = addKeyword(['hello', 'hi']).addAnswer('Ey! welcome')

/** send dynamic message from db or other sources */
const infoFlow = addKeyword('info')
    .addAction(async (ctx, { flowDynamic }) => {
        await flowDynamic(`Welcome ${ctx.name}`)
    })

/** initialization bot */
const main = async () => {

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

    adapterProvider.initHttpServer(3000)

    await createBot({
        flow: adapterFlow,
        provider: adapterProvider,
        database: adapterDB,
    })
}

main()

```

---
