Asyntai AI Chatbot

Adds an AI chat widget to a Payload site that answers visitors from published collection content.

Community 0 MIT v1.0.0

Installation

pnpm add payload-ai-chatbot

About

This plugin puts an Asyntai chat widget on your Next.js frontend and trains it on your Payload content. You list the collections to sync in the plugin options, and each document gets a public URL through a `url` function. The chatbot can then link visitors to the page that holds the answer. The widget is added with an `AsyntaiChatbot` React component in the root layout, imported from the `payload-ai-chatbot/rsc` export. The plugin adds an Asyntai settings global to the admin panel with a Connect button. Connecting opens a sign-in window on the Asyntai side and saves the widget ID back to the global. A switch in the same screen hides the widget without disconnecting it. Sync runs through `afterChange` and `afterDelete` collection hooks. When a document is published, its text is sent to the Asyntai knowledge base. Updates replace the old text, and unpublish or delete removes the item. Draft saves leave the published version live. Text is hashed, so unchanged content is not sent again. Sync needs an `ASYNTAI_API_KEY` environment variable or an `apiKey` option, and it is off until a key is set. Rich text from Lexical and Slate, along with arrays, groups, blocks and common scalar fields, is flattened to plain text. Relations, uploads, colours and slugs are left out. With `background: true`, sync runs after the save returns, which suits long-running servers but not serverless hosts. The plugin also creates a hidden link table to track which documents map to which knowledge items.

Package info

Package name
payload-ai-chatbot
Latest version
1.0.0
Unpacked size
178 kB
License
MIT
Last publish
Oct 12, 2026

Similar plugins

More in AI