Widget
The prebuilt chat interface that puts a Qore agent on your web page: what it is, what it needs, and what it handles for you.
The widget is Qore's prebuilt chat interface for an agent, delivered in the @uptiqai/widgets-sdk package. You mount it on your own web page, and your users chat with the agent there. It handles conversation state, history and messaging for you.
The widget is the UI behind Embedded Chat, one of the ways to embed an agent. Set it up from Agent Config › Integrate Agent › Embedded Chat. See Integrate Agent.
Forms of the widget
The same package ships the widget in two technologies and two layouts, plus a headless option with no UI at all.
Chat Widget
ChatWidget
<uptiq-chat-widget>
A floating popover
Full Screen
FullScreenChatWidget
<uptiq-full-screen-chat-widget>
Full screen, with sidebar navigation
Headless Agent JS SDK
createHeadlessAgentInstance()
—
None: you build the UI; the SDK handles sockets, agent events and file uploads
React takes props as objects. The web component takes attributes as JSON strings with kebab-case names. Otherwise they map one to one.
What the widget does for you
A chat interface, as a floating popover or full screen
A conversation sidebar, and new chats
Message history kept across sessions
Real-time messaging with the agent
The agent's avatar on the trigger button
Theming to match your brand
What it needs
Two props are required.
config
serverUrl, the Qore API host; agentId; widgetKey; and optionally agentExecutorVersion
user
The signed-in person in your app: uid, firstName and email, and optionally lastName
The headless SDK also requires an instanceId, used for socket scoping.
The widget key
The widget authenticates with a widget key, created on the agent's Access & Security page or in step 1 of the Embedded Chat setup.
It's safe to ship in browser code, because it works only from the platform itself and the domains on the agent's Allowed Domains list.
It's sent as the
x-widget-keyheader.The same key type is used by the headless SDK, and by the Agent SDK in the browser.
Try Agent, which opens the Agent Playground, needs the agent to have a widget key.
An API key and secret, by contrast, are for server-to-server calls and must never reach a browser.
Allowed Domains
Allowed Domains lists the web origins where the agent's widget may run. A widget-key request is accepted only from a page on the list, or from the platform's own domain.
With the list empty, the widget runs nowhere outside the platform.
Enter each domain exactly as the browser sends it. A mismatch in protocol, subdomain or port is refused.
Step 2 of the Embedded Chat setup, Whitelist domains, adds to the same list.
Scope
Widget key
One agent. An agent can have several keys; each can be renamed or deactivated, and deactivation can't be undone
Allowed Domains
One agent, shared by all of its widget keys
A mounted widget
One agent, through agentId. Give each widget on a page its own instanceId to show several agents
Options
theme / theme
Palette overrides, such as primary, background, foreground and sidebar
instanceId / instance-id
Distinguishes several widgets on one page
defaultOpen / default-open
Opens the widget on mount
hideTrigger / hide-trigger
Full Screen only: hides the default launcher, so you open it from your own button
widgetRef
React only: open() and close() for programmatic control
defaultExecutionId / default-execution-id
Opens a specific conversation, to continue a previous chat
onExecutionChange, onClose
React only: callbacks when the conversation changes or the widget closes
authToken / auth-token
The signed-in person's identity token, for an agent with Authentication on
allowDeveloperMode / allow-developer-mode
Available on request. Shows a Developer Mode switch, which reveals Setup Identity Token
The full list, with types and examples, is on Integrate Agent, under Props / attributes reference.
Identity in the widget
user tells the agent who your app says the person is. authToken lets Qore verify it.
With Authentication on, the widget sends
authTokenwith new chats, follow-up turns, and permission or credential requests. The headless SDK'ssetAuthToken()replaces it after your app refreshes it.Qore exposes the verified token to the agent's MCP connections as
$auth.token. See MCP.The widget keeps the token only in session memory.
Setup Identity Token, under Developer Mode, lets you try the agent as a specific person by pasting their token. It lasts for the session and is never stored. A token passed as
authTokenreplaces one entered by hand.
Versions
The widget package version is released alongside an executor version. Pin the version that the Embedded Chat panel shows for your agent, so the widget and the executor stay in step. To get a newer widget, upgrade the agent's executor version first. See Runtime & Versioning.
Where widget activity shows up
Monitoring lists the agent's executions, including those from the embedded widget, alongside API calls and triggers.
Related
Embed Agent: choosing between the widget, the headless SDK and the Agent API
Integrate Agent: setup steps, props and examples
Access & Security: widget keys and Allowed Domains
Last updated
Was this helpful?

