Chatbot Widget

Phase 5 — Production Runtime, Security & Monitoring

Embeddable Chatbot Widget

A reusable chatbot widget that can be embedded into any website with a single <script> tag. The blue button in the bottom-right corner is the live widget running on this page.

How to embed

Add the following snippet to the <body> of any webpage:

<script
  src="https://your-widget-domain.com/widget.js"
  data-widget-id="YOUR_WIDGET_ID"
></script>

Optional attributes

AttributeValuesDefault
data-widget-idAny valid widget IDrequired
data-positionbottom-right | bottom-leftbottom-right

API Reference

POST /api/chat/message
Send a user message and receive a bot reply.
// Request body
{
  "widgetId": "string",   // required
  "sessionId": "string",  // optional
  "message": "string"     // required, max 2000 chars
}

// Response
{
  "reply": "string",
  "sessionId": "string",
  "messageId": "string",
  "timestamp": 1234567890
}
GET /api/widget/config?widgetId=xxx
Retrieve the public configuration for a widget ID.

Phase Roadmap

✓Phase 1 — Standalone widget with mock responses
✓Phase 2 — CMS integration — widget embed via script tag
✓Phase 3 — Secure integration — signed tokens, origin allowlist, rate limiting
✓Phase 4 — RAG/LLM integration — knowledge ingestion, vector search, AI responses
✓Phase 5 — CMS Admin UI, production runtime, structured logging, health checks, monitoring hooks, LLM usage tracking
Chatbot Widget · Phase 5