BindKit

Developers

Add BindKit to your product

Install the messenger with a script tag or React. Then connect signed-in customers, actions and interactive components as you need them. Choose a guide below to get started.

Use your own setup details. Sign in to fill supported examples with your web agent's publishable key.

Sign in

Set up BindKit with your coding assistant

Copy this setup prompt into Claude Code, Cursor or Codex. Review the changes it makes and test the messenger before publishing. Signed in, the prompt carries your own publishable key.

Prompt
Add the BindKit messenger to this app. BindKit is an AI agent that answers our users from our docs and can act in our product as the signed-in user.

1. Load the script once, on every page the messenger should be on: before the closing </body> tag, or in the root layout of a single-page app.
   <script src="https://api.bindkit.ai/widget.js"></script>
2. Start it with our publishable key, which is safe in client code:
   BindKit.messenger({ publishableKey: 'pk_...' })
3. When someone is signed in, say who they are in the same call: user: { id, email, name, avatar } plus any attributes, and tags: a list of labels such as ['beta'], which replace the ones sent before. After they sign in, call BindKit.identify({ user, userToken }). On sign-out call BindKit.reset(), which forgets them and removes the messenger, then BindKit.messenger() again if signed-out visitors should still see it.
4. Prove who the user is with a user token signed on our server:
   - Add an endpoint only signed-in users can call, such as GET /bindkit-token, that returns a JWT signed with HS256 and the secret in the BINDKIT_SIGNING_SECRET environment variable. Claims: sub (the user's ID, as a string), email, name, avatar (the HTTPS address of their picture, optional), tags (a list of labels, optional), any other attributes the agent should know (such as plan), and exp, at most an hour away.
   - Pass it to the messenger as userToken: () => fetch('/bindkit-token').then((r) => r.text()). The messenger calls it again shortly before the token expires.
   - Never put the signing secret in client code, and don't make one up: ask me for it. It is on the web agent's Security page in BindKit, where "Identity verification" has to be on.
5. Options, all optional:
   - layout: BindKit.MessengerLayout.BAR, PANEL or BUBBLE. The setting in BindKit unless set.
   - launcher: false hides BindKit's own bar or button; open it from our UI with BindKit.open(), BindKit.toggle() or BindKit.ask('a question').
   - closable: false keeps it open once it is: no close button, and Escape and the shortcut don't close it. BindKit.close() still does.
   - element: an element or CSS selector, such as '#chat', to draw the messenger inside instead of over the page, as on a help page. It fills the element, at least 480px tall, and stays open; layout, launcher, closable and shortcut don't apply.
   - suggestions: questions a new conversation offers, greeting: what it opens with, shortcut: 'mod+k' unless set (false for none), css: styles added inside its shadow root, whose parts have bk- classes.
   - language: the language our app is shown in, such as 'de', when we know it; the messenger shows in it and the agent answers in it until the visitor writes in another. Unless set, the language chosen in BindKit, which can be the visitor's browser's.
   - test: true on our development and staging environments, never in production: the messenger looks and opens the same, but only says back what is typed, so no conversations reach BindKit or count against our plan.
6. In React, Vue or another framework, load the script in the HTML entry point or root layout and call BindKit.messenger() from the component that knows the signed-in user, once, calling BindKit.identify() when the user changes.

Match the code style of this project, keep the change small, and tell me what you changed and which environment variable to set.

Ready to help your customers?

Try BindKit with your own help content and see how it answers.

Try BindKit free for 14 days or 30 conversations, whichever comes first. No credit card required. Plans with AI usage included start at $49/month.