# Support bot on Slack and Teams? Let the same bot answer your website visitors

> For teams who wrote their support bot once with Chat SDK: the Hibira Live Chat adapter lets the same bot answer visitors on your website, LINE and email, in plain text, with verified webhooks and a handoff to your team.

Source: https://hibira.io/blog/chat-sdk-live-chat-adapter
Updated: 2026-12-01

More and more teams write their support bot once with Chat SDK and run it on Slack, Teams and Discord. The same questions also arrive somewhere else, though: in the chat box on the company's own website, from customers who will never join your Slack.

Until now that meant a second bot, or a gap. `@hibira-io/chat-adapter` closes it. It is a Chat SDK adapter for Hibira Live Chat, so the bot you already have answers visitors on your website, on LINE and by email too, and passes the conversation to a person on your team when it should.

![A visitor asks about brewing sencha in the website chat, the bot answers, then hands the order question to Aiko.](https://hibira.io/portal/articles/chat-adapter-widget-en-light.webp)

## One more line in your adapters

If you already use Chat SDK, adding Live Chat is one entry:

```ts
import { Chat } from "chat";
import { createHibiraAdapter } from "@hibira-io/chat-adapter";

export const bot = new Chat({
  userName: "support-bot",
  adapters: { slack, teams, hibira: createHibiraAdapter() },
  state: createRedisState(),
});

bot.onDirectMessage(async (thread, message) => {
  await thread.post(`Thanks! Looking into "${message.text}" now.`);
});
```

Every Live Chat conversation is one thread, `hibira:<conversation id>`, and it is a direct message, so the `onDirectMessage` handler you wrote for Slack DMs already covers it. Visitors writing from the website widget, from LINE or by email all arrive the same way, and each reply goes back on the channel it came from. Your handler doesn't need to know which one it was.

Setup takes two values from **Settings › API & webhooks** in Live Chat: an API key with write access, and the signing secret of a webhook endpoint pointing at your bot. The adapter reads them from `HIBIRA_LIVECHAT_API_KEY` and `HIBIRA_LIVECHAT_WEBHOOK_SECRET`. Both also accept a function, called on every request, so a secret you rotate in your secret manager takes effect without a redeploy. The REST API and webhooks are on the Starter, Team and Business plans.

## Only the visitor's messages reach your bot

A Live Chat conversation holds more than the visitor's words: internal notes between agents, the bot's own replies, system messages such as "Aiko joined", and answers from the workspace's own assistant if you have one. Passing all of that to your handlers would make the bot answer itself.

So the adapter only dispatches what visitors write. It recognises its own replies both by the messages it sent and by the agent it posts as, so a reply that comes back through the webhook moments later is never mistaken for a new question. If your bot should also see what human agents write, for example to stay quiet once someone is answering, set `dispatchAgentMessages: true`.

Every delivery is checked against its `Hibira-Signature` header, an HMAC-SHA256 of the timestamp and the body, before any handler runs. Unsigned or stale requests get a 401.

## Plain text, on purpose

Live Chat shows plain text everywhere, because the same message may end up in a LINE chat or an email. Rather than leave Markdown symbols in front of your customers, the adapter turns what your bot posts into readable text: a link becomes `text (url)`, lists get bullets, and cards and tables are written out line by line. Answers longer than 4,000 characters are split into several messages.

Live Chat messages also can't be edited once sent. Chat SDK normally streams an answer by posting a message and editing it as text arrives; here the adapter shows the visitor that the bot is typing, collects the stream, and sends the finished answer as one message. Code that passes a text stream to `thread.post()` works without changes:

```ts
bot.onDirectMessage(async (thread, message) => {
  const result = streamText({ model, system, prompt: message.text });
  await thread.post(result.textStream);
});
```

For the typing indicator we added a small endpoint to the Live Chat REST API, `POST /v1/conversations/{id}/typing`. It is open to any integration, not just this adapter.

## Handing over to a person

A support bot is only as good as the moment it knows to stop. Besides the standard Chat SDK methods, the adapter exposes the Live Chat actions that make that moment smooth:

```ts
const hibira = bot.getAdapter("hibira");

await hibira.postNote(thread.id, "Asked where order #1042 is.");
await hibira.handoff(thread.id, { teamId: "tm_orders" }); // or { agentId }, or nothing
```

`handoff()` assigns the conversation to an agent, or leaves it unassigned in a team's queue, and the note tells whoever picks it up what has happened so far without the visitor having to repeat it. `getConversation()` returns what Live Chat knows about the visitor: name, email, the page they are on, the channel and, if your site identifies signed-in users, their verified user ID. And `onEvent` receives every webhook event, so the bot can step back as soon as `conversation.assigned` names someone other than itself.

![The same conversation in the Live Chat inbox: the bot's replies, its internal note, and the conversation assigned to Aiko.](https://hibira.io/portal/articles/chat-adapter-inbox-en-light.webp)

These screenshots come from a real Chat SDK bot running the published package against a Live Chat workspace, with the webhook delivered and verified on every message.

## Things to know

- Turn off the workspace's own assistant (**Settings › AI assistant**) in a workspace your bot answers, so visitors don't get two replies.
- Messages can't be edited or deleted, and there are no reactions, buttons or modals, so those Chat SDK methods aren't supported.
- `fetchMessages` returns a conversation's latest 100 messages.
- Keep `onEvent` handlers quick: Live Chat waits up to 15 seconds for the webhook response.

## Get it

`@hibira-io/chat-adapter` is MIT licensed, the source is on [GitHub](https://github.com/hibira-io/chat-adapter), and you install it with `npm install chat @hibira-io/chat-adapter`. The REST API and webhooks it uses are described in the [Live Chat developer docs](https://chat.hibira.io/docs/#api). We maintain the adapter ourselves and will keep it current as Chat SDK and the Live Chat API evolve.

Live Chat has a free plan for small teams; see [Hibira Live Chat](https://hibira.io/live-chat) to set up a workspace and put the chat box on your site.
