Coming soonYour agent on WhatsApp, Messenger and Instagram
ReplyBash

AI chatbot for React

Copy one small component, render it once near the root, and your app has an agent trained on your own content. No package to install, and a JavaScript API when you need control.

  • One component
  • No package to install
  • Free plan to start
Who it's for

Made for React apps

This is for teams with a React single-page app, built with Vite, Create React App or similar, who want a help chat that answers from their own docs and site.

The component is a few lines that load our script once. You own the code, there's no dependency to update, and the widget keeps its conversation while your app changes route.

Install

Install on React, step by step

Create your agent first: paste your website's address and it reads your pages. Then add it to your site.

Add the component

  1. 1Create your agent: paste your website URL and let it read your pages.
  2. 2Add ReplyBashWidget.tsx with the code below (your dashboard fills in your agent key).
  3. 3Render it once, near the root of your app, for example in App.tsx.
  4. 4Deploy, or run the app locally, and ask a question you know the answer to.
ReplyBashWidget.tsx
// ReplyBashWidget.tsx: render <ReplyBashWidget /> once, e.g. in App.tsx.
// (Or paste the script tag from "Script tag" into index.html instead.)
import { useEffect } from "react"

export function ReplyBashWidget() {
  useEffect(() => {
    if (document.querySelector('script[src="https://replybash.com/embed.js"]')) return
    const script = document.createElement("script")
    script.src = "https://replybash.com/embed.js"
    script.dataset.agentId = "YOUR_AGENT_KEY"
    script.defer = true
    document.body.appendChild(script)
  }, [])
  return null
}

Prefer no component? Paste the script tag into index.html instead; it does the same. Other ways to install, such as the chat inside one page, are in the quickstart.

On React

What works on your site

Every feature below is built and in the product today.

  • Stays put between routes

    Render it once and the chat stays mounted while your app changes page. If a re-render removes it, it comes back with the open conversation.

  • Test on localhost

    Allow localhost is on by default, so it loads on localhost and 127.0.0.1 on any port while you build.

  • Control it from code

    replybash("open"), "close", "toggle", "hide" and "show" from anywhere in your app.

  • Events for your analytics

    Listen for widget-opened, user-message, conversation-started or form-submitted and send them on.

  • Hide it on some routes

    Page rules decide where it shows, checked on every navigation, or call hide and show yourself.

  • Clean up on logout

    replybash("reset") clears the conversation when a user signs out, even before the chat has loaded.

FAQ

React questions

Something else? We answer every email.

Email us

No. The component is a few lines you copy into your app, and it loads our embed.js. There's nothing to keep up to date.

Yes, and with any other single-page React app. Render the component once, near the root.

No. The component checks for the script before adding it, and the script adds the widget only once per page.

Use the Next.js page instead: there the script goes in your root layout with next/script, for the App Router and the Pages Router.

Yes. Allow localhost is on by default, so it loads on localhost and 127.0.0.1. Chats there use your message credits.

The chat works on every plan, the Free plan included, which has 100 messages a month. Paid plans start at $39 a month with a 7-day free trial.

Put your website to work tonight

Paste your URL and chat with your agent in minutes.

Free for 100 messages a month · No credit card required