Documentation
Quick Start
A practical guide to the intended AnChat workflow: create an assistant, connect knowledge, and add chat to your website.
Introduction
AnChat is designed to answer customer questions using content supplied by a business. An assistant brings together knowledge sources, a customer-facing identity, and instructions for how to respond.
Assistant
The configured identity and behavior.
Knowledge
The information answers should draw from.
Installation
Where visitors open the conversation.
Create your first assistant
1. Create an assistant
Choose a useful name and a specific role, such as answering questions about your product catalog. In the planned workspace, each assistant has an ID used during installation.
2. Add knowledge
Start with an accurate FAQ, a few website pages, or approved PDF and document content. Remove outdated information and keep the initial scope focused.
3. Test a conversation
Ask common customer questions and check answers against the original sources. Include a question the assistant cannot answer, then review its fallback.
4. Install the widget
Use the assistant ID in the widget snippet or React component below once production integration becomes available.
Widget installation
The intended JavaScript integration uses a script tag. Add it once, near the end of the HTML body, and replace the example ID with the intended assistant ID.
<script
src="https://anchat.site/widget.js"
data-assistant="assistant_xxx"
></script>You will need permission to edit the website’s HTML or custom-code settings. A dedicated WordPress or Shopify installation is on the roadmap.
Widget configuration
The preview snippet has two fields. The assistant’s appearance and behavior are intended to be managed in the AnChat workspace rather than hard-coded on every page.
| Field | Purpose |
|---|---|
| src | Planned widget script URL. |
| data-assistant | Identifies the assistant for this installation. |
An assistant ID is intended to be a public installation identifier. It must not be treated as an API secret or used as a substitute for authorization.
Widget events
Event hooks for actions such as opening the widget or completing a conversation are being considered. Event names, payloads, and lifecycle guarantees have not been finalized.
Wait for the published event reference before wiring analytics or business workflows to widget events.
React installation
A React component is planned for applications that prefer a component-level integration. The proposed package name is @anchat/react; it is not an available SDK in this preview.
import { AnChat } from "@anchat/react";
export default function App() {
return <AnChat assistantId="assistant_xxx" />;
}Components and Next.js
The proposed AnChat component accepts an assistantId. Additional props, styling APIs, and lifecycle methods will be documented with the SDK release.
For Next.js App Router, the intended approach is a small Client Component for the interactive widget inside an otherwise server-rendered page. Browser-dependent widget code should not run during server rendering.
Keep any future private API keys on the server. Public widget configuration and administrative API credentials serve different purposes.
API authentication
Coming soon · proposed Pro planREST API authentication, token creation, scopes, and rotation procedures have not been released. No production API base URL or working credentials are provided here.
When available, private credentials should be used from a server environment and stored outside client bundles. Do not place secrets in public widget attributes.
Assistants API
The planned assistant resource represents an assistant’s identity and configuration. Create, read, and update endpoints, request schemas, and error formats will be published when the API is ready.
The proposed Pro plan includes up to 10 assistants. API rate limits and per-resource constraints are not yet specified.
Messages API
The planned messaging interface would allow a custom application to exchange messages with an assistant. Streaming, conversation identifiers, retention, and usage accounting will be documented before release.
The interactive demo uses local sample responses. It does not make calls to an AnChat API.
Explore the demo