Chat SDK now supports XChat
Mirrored from Vercel — AI for archival readability. Support the source by reading on the original site.

You can now build bots that hold end-to-end encrypted 1:1 and group conversations on XChat with the new XChat adapter for Chat SDK.
The adapter handles all encryption, key management, and signature verification automatically. Bots can also message users first, as long as the user has encrypted chat set up and follows the bot.
lib/bot.ts
import { Chat } from "chat";import { createXchatAdapter } from "@chat-adapter/x/chat";
const bot = new Chat({ userName: "mybot", adapters: { xchat: createXchatAdapter(), },});
bot.onDirectMessage(async (thread, message) => { await thread.post(`You said: ${message.text}`);});Reply to a direct message on XChat
XChat has no markdown rendering, so the adapter falls back automatically: URLs and @mentions render as tappable links, tables as ASCII code blocks, and cards as text with a link preview. Streaming works through message edits.
Read the XChat adapter documentation to get started.
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.