Skip to main content

Onsite Chat Quickstart

The Response Chat Widget is a production-ready, AI-powered chat widget you drop into any web application. This page gets it on your site and talking to a backend.

1. Embed the widget

The widget ships as a UMD bundle. Include React, the stylesheet, and the bundle, then mount it into any container:
Pin a version in the CDN URL — replace vX.Y.Z with a real release. Pointing at a floating “latest” means a widget upgrade ships to your production site without you deploying anything.
mount() returns a control surface:
provider accepts openai, anthropic, or gemini.

2. Wire up your backend

With messageEndpoint set, the widget POSTs JSON in this shape:
Your endpoint should return an object the widget can render. If your API has a different shape, you don’t need to change it — override both directions:

Threads

Provide threadEndpoint and threadId to load history. The widget issues GET {endpoint}?threadId={id} with optional bearer auth. Full CRUD is available via threadCreateEndpoint, threadUpdateEndpoint, and threadDeleteEndpoint, with buildThreadRequest, buildThreadUrl, buildThreadUpdateUrl, and buildThreadDeleteUrl for custom URL shapes.

3. Run it locally first

Node.js 20.17.0+ is required and enforced in CI.
Start against the mock server. It exercises streaming, tool visualization, and citations without spending API credits or needing a working backend.

4. Show commerce records

The widget header carries tabs for Chat, Orders, Products, Subscriptions, Returns, and Exchanges, driven by the records prop:
Each category renders status badges, metrics, and summary cards automatically. Orders, returns, exchanges, and subscriptions have a List mode; products support List and Carousel.
Omit records entirely and sample data is shown, so the UI never looks empty in a demo. Make sure you pass real data before going to production — otherwise customers see the samples.

Feature flags

Other capabilities: reactions, transcript export, programmable actions, responsive fullscreen with iPhone safe-area handling, and built-in locale packs with translation overrides and automatic RTL layout.

Next steps

Widget reference

Configuration, revenue capture v2, and deployment.

Response Public API

Build the agent behind the chat.