Skip to main content
The Agentic Trust widget is available as a hosted script for any HTML site, an npm package (@agentictrust/ui) for React apps, and works with Next.js App Router out of the box. It renders a chat interface on your site, connects to your project’s API, and streams AI responses in real time.

Install

Include the widget script and initialize it — no build step required.1. Add the script
2. Initialize
initAsync fetches the widget configuration from the server before rendering, so the widget reflects your dashboard settings (colors, position, branding). init uses defaults and renders immediately.3. VerifyReload your page. A chat bubble appears in the bottom-right corner (default position). Click it to open the chat panel.

Configuration options

Pass these properties to init, initAsync, or Widget:

SPA navigation

When the agent decides to navigate the user to a different page, it calls the navigate function you provide. This keeps your SPA’s router in control instead of triggering a full page reload.
The widget waits for the route change to complete before capturing the new page context and responding to the agent. Both synchronous (() => void) and async (() => Promise<void>) functions are accepted.
If you don’t pass navigate, the widget falls back to window.location.href which triggers a full page reload. The conversation state is preserved in localStorage and the agent continues automatically after the page loads.

Full example

The widget script is cached for 1 hour with a stale-while-revalidate window of 1 day. Users always get a fast load with automatic background updates.