• DocsDocs
  • PricingPricing
Sign in
Get started
Sign in
Get started
    • Realtime Infrastructure
      • Presence
        Presence

        Online users, cursors, selections

      • Broadcast
        Broadcast

        Temporary event signals

      • Storage
        Storage

        Synced conflict-free data

      • Feeds
        FeedsBeta

        Messages and activity logs

      • Threads
        Threads

        Contextual conversations

    • Collaboration features
      • Multiplayer
        Multiplayer

        Realtime collaboration

      • Comments
        Comments

        Contextual commenting

      • Notifications
        Notifications

        Smart alerts for your app

      • AI Copilots
        AI Copilots

        Individual AI assistants

    • Tools
      • Examples

        Gallery of open source examples

      • Showcase

        Gallery of collaborative experiences

      • Next.js Starter Kit

        Kickstart your Next.js collaborative app

      • DevTools

        Browser extension

      • Tutorial

        Step-by-step interactive tutorial

      • Guides

        How-to guides and tutorial

      • Figma UI Kit

        Liveblocks Collaboration Kit

    • Company
      • Blog

        The latest from Liveblocks

      • Customers

        The teams Liveblocks empowers

      • Changelog

        Weekly product updates

      • Security

        Our approach to security

      • About

        The story and team behind Liveblocks

  • Docs
  • Pricing
  • Realtime Infrastructure
    • Presence
    • Broadcast
    • Storage
    • FeedsBeta
    • Threads
    Collaborative features
    • Multiplayer
    • Comments
    • Notifications
    • AI Copilots
    Solutions
    • People platforms
    • Sales tools
    • Startups
    Use cases
    • Multiplayer forms
    • Multiplayer text editor
    • Multiplayer creative tools
    • Multiplayer whiteboard
    • Comments
    • Sharing and permissions
    • Document browsing
  • Resources
    • Documentation
    • Examples
    • Showcase
    • DevTools
    • React components
    • Next.js Starter Kit
    • Tutorial
    • Guides
    • Release notes
    Technologies
    • Next.js
    • React
    • JavaScript
    • Redux
    • Zustand
    • Yjs
    • Tiptap
    • BlockNote
    • Slate
    • Lexical
    • Quill
    • Monaco
    • CodeMirror
  • Company
    • Pricing
    • Blog
    • Customers
    • Changelog
    • About
    • Contact us
    • Careers
    • Terms of service
    • Privacy policy
    • DPA
    • Security
    • Trust center
    • Subprocessors
  • HomepageSystem status
    • Github
    • Discord
    • X
    • LinkedIn
    • YouTube
    © 2026 Liveblocks Inc.
Blog/Updates

Chat SDK adapter for Liveblocks

We’re releasing a new adapter for Chat SDK, enabling you to create cross-platform AI bots that can respond in Liveblocks comment threads.

on April 8th
Chat SDK adapter for Liveblocks
April 8th·3 min read
Share article
Product updatesOpen sourceAI

Ready to get started?

Join thousands of companies using Liveblocks to build multiplayer experiences for people and agents.

Get started for free

Related blog posts

  • Multiplayer SDK for React Flow: Realtime collaboration between humans and agents

    Multiplayer SDK for React Flow: Realtime collaboration between humans and agents

    Picture of Chris Nicholas
    April 7th
    Updates
  • AI agents are becoming native users of software

    AI agents are becoming native users of software

    Picture of Steven Fabre
    April 6th
    Updates
  • Introducing Feeds and APIs for Agent Workflows

    Introducing Feeds and APIs for Agent Workflows

    Picture of Steven Fabre
    April 6th
    Updates

Today, we’re releasing a new adapter for Chat SDK that lets you build cross-platform bots that can respond in Liveblocks comment threads. With a single codebase, you can power bots across 10+ platforms, including Slack, Microsoft Teams, Discord—and now Liveblocks.

Trigger AI workflows from other platforms

One common use case for Chat SDK is triggering AI workflows from external apps like Slack. Picture this: you’ve built a realtime app with Liveblocks that lets users create table-based documents. From Slack, you can @mention your bot, and ask it to create a new document.

Your browser does not support the video tag.Triggering an AI change from Slack

Triggering the bot’s “Create document” tool from Slack

With the addition of the Liveblocks adapter for Chat SDK, you can now @mention the same bot inside Liveblocks comment threads, and it behaves identically to Slack—all powered by a single codebase.

Your browser does not support the video tag.Triggering an AI change from Liveblocks comments

Triggering the bot’s “Edit document” tool from Liveblocks

Liveblocks adapter

Chat SDK exposes simple TypeScript events and methods, which you can wire into your adapters. For example, here’s how to create a bot that automatically replies when it’s mentioned.

bot.onNewMention(async (thread, message) => {  await thread.adapter.addReaction(thread.id, message.id, "👀");  await thread.post(`Hello, ${message.author.userName}! Our support t…`);});

Each adapter translates these events into platform-specific actions, so your bot logic stays platform-agnostic. With the Liveblocks adapter configured, this code produces an automated reply inside a comment thread.

Your browser does not support the video tag.Liveblocks Comments bot

You can register multiple adapters simultaneously, allowing a single bot to operate across platforms.

Setting up the adapter

To get started, create an instance of the Liveblocks adapter with createLiveblocksAdapter and pass it into new Chat. You’ll need Liveblocks secret keys and a webhook configured in your dashboard.

import { Chat } from "chat";import { createLiveblocksAdapter } from "@liveblocks/chat-sdk-adapter";import { createMemoryState } from "@chat-adapter/state-memory";
const liveblocks = createLiveblocksAdapter({ apiKey: "sk_prod_xxxxxxxxxxxxxxxxxxxxxxxx", webhookSecret: "whsec_...", botUserId: "__bot__", botUserName: "Liveblocks Bot",});
const bot = new Chat({ userName: "Liveblocks Bot", adapters: { liveblocks }, state: createMemoryState(),});
bot.onNewMention(async (thread, message) => { await thread.adapter.addReaction(thread.id, message.id, "👀"); await thread.post(`Hello, ${message.author.userName}! Our support t…`);});

Find more information in our Chat SDK documentation or try our Chat SDK bot example.

Adding AI to your bot

You can add AI to your bot in different ways. One approach is to wait until the bot is mentioned, and then subscribe to the thread and automatically reply to all subsequent messages.

Your browser does not support the video tag.Liveblocks Comments AI bot

To set up a bot that replies to all comments after its first mention in a thread, use thread.subscribe and bot.onSubscribedMessage.

// First mention in the thread, subscribe to thread and replybot.onNewMention(async (thread, message) => {  await thread.subscribe();  const response = await __generateAIResponse__(message.text);  await thread.post(response);});
// On receiving later thread messages, replybot.onSubscribedMessage(async (thread, message) => { const response = await __generateAIResponse__(message.text); await thread.post(response);});

Our Chat SDK AI bot example shows how to set up a bot that replies when mentioned, and describes how to set up a subscription inside bot.ts.

Get started now

To get started, follow our Next.js quickstart and deploy your first cross-platform bot in minutes.

Get started now

Contributors

Contributors include:nimeshnayaju

1 authors