Skip to content
Dashboard

Chat SDK adds Novu support

Content Engineer
lib/bot.ts
import { Chat } from "chat";
import { createMemoryState } from "@chat-adapter/state-memory";
import { createNovuAdapter } from "@novu/chat-sdk-adapter";
const novu = createNovuAdapter();
const chat = new Chat({
userName: "support",
adapters: { novu },
state: createMemoryState(),
});
chat.onNewMention(async (thread, message) => {
await thread.post(`Hi! You said: ${message.text}`);
});
chat.onSubscribedMessage(async (thread, message) => {
await thread.post(`echo: ${message.text}`);
});
await chat.initialize();

Configure the adapter and connect it to the Novu system

npx novu connect --runtime chat-sdk

The Complete Guide to Chat SDK

Learn how Chat SDK works end-to-end: from core concepts to building your first bot to deploying it across Slack, Teams, and more.

Read the guide

Ready to deploy?