Skip to main content
Workspace admin

The chat widget snippet

The widget is the query endpoints with a chat interface already built. You paste two tags into your page; visitors ask questions and see the same grounded answers and citations they would in the workspace.

Elie generates the snippet for you — to produce one, and to issue the token it needs, follow Developer access and widget tokens. This page is the reference for what that snippet contains.

The snippet

<div id="ask-elie-chat"></div>
<script src="https://api.dev.askelie.com/widget/ask-elie-chat-widget.min.js"></script>
<script>
AskElieChat.mount('#ask-elie-chat', {
apiBaseUrl: 'https://api.dev.askelie.com',
kbId: 'kb_01J…',
token: '…',
brandColor: '#005597',
position: 'bottom-right'
});
</script>

Mount options

OptionRequiredWhat it does
apiBaseUrlYesYour Elie API base — the workspace domain with tenant replaced by api.
kbIdYesWhich knowledge base the widget asks.
tokenYesThe scoped token. Only works from a domain on its list.
brandColorNoLauncher and header colour, as #rgb or #rrggbb.
positionNobottom-right or bottom-left. Nothing else is honoured.
titleNoPanel header text. Defaults to Ask.

The token expires — plan for it

A scoped token lasts only as long as the platform limit allows — 60 minutes by default — so a snippet pasted into a page stops working within the hour. That makes this shape right for a demo, a pilot page or an internal site somebody refreshes, and wrong for a public site left unattended.

For a public site, have your own server hand the page a fresh token: generate the snippet with a placeholder and fill token in from your backend when the page renders. Your backend still cannot issue tokens on its own today — see the limits on the Knowledge Base API overview.

Nothing about the widget widens access. The domains you list decide which pages may load it; what it can read is decided in Elie, and restricted documents stay invisible.

Next

Steps verified against elie-tenant-ui 0.1.2 on . Something wrong with this page?