Glean Chat
Glean Chat delivers personalized answers grounded in your company's content, people, and activity — with citations back to the source. Responses are automatically tailored to what each signed-in user is allowed to see. A complete list of Glean Chat's capabilities can be found in our Chat documentation.
The payments service is owned by the Payments Platform team.
Priya Natarajan is the tech lead, and Marcus Webb is on call this week — the deploy and rollback runbook lives in the Engineering Wiki.
Illustrative previewRendered with sample data — in your app, this component renders live against your organization's Glean instance.
Install the SDK
- npm
- Script tag
npm install @gleanwork/web-sdk
Include the JavaScript library in the <head> section of your page. Replace GLEAN_APP_DOMAIN with your company's Glean web app domain (typically app.glean.com or your-company.glean.com if you use a custom subdomain).
<script
defer
src="https://{GLEAN_APP_DOMAIN}/embedded-search-latest.min.js"
></script>
The Glean web app domain differs from your company's Glean backend domain
(find yours at app.glean.com/admin/about-glean under "Server instance (QE)").
The same methods are available on window.GleanWebSDK once the glean:ready event fires.
Render chat
-
Create a container element with
position: relative,display: block, and a definedwidthandheight. -
Render Glean Chat into your container:
import { renderChat } from '@gleanwork/web-sdk';
renderChat(document.getElementById('chat'), {
backend: 'https://{your}-be.glean.com/',
});
For the full surface, see the renderChat API documentation.
Options
The most commonly used ChatOptions:
| Option | Type | Description |
|---|---|---|
agentId | string | The ID of the Glean Agent to chat with. |
agent | 'DEFAULT' | 'GPT' | 'FAST' | 'ADVANCED' | Response engine. FAST and ADVANCED use the agentic engine; DEFAULT and GPT are being deprecated in their favor. |
initialMessage | string | A message sent on the user's behalf to start the conversation. |
chatId | string | Opaque ID that restores an existing chat session. |
landingPage | 'chat' | 'agentLibrary' | Initial view when the widget loads. Defaults to 'chat'. |
promptId | string | Opens the widget with a saved Glean prompt. |
customizations | ChatCustomizations | Toggle individual UI features (agent library, prompt library, feedback, chat menu, and more). |
All components also accept the common Options — backend, authToken, theme, themeVariant, locale, and more.
To chat with a specific Glean Agent, pass its ID
via the agentId chat option. The older applicationId parameter (for AI
Applications built with the deprecated AI App Builder) is still accepted for
existing apps, but new integrations should use agentId — apps were
migrated to agents.
Examples
Separate pages for chat and search
Dedicated routes for Search and Chat — a Search page with the Glean Search component, a Chat page with the Glean Chat component, and automatic redirection to the Chat page when starting a new conversation. View the complete demo in our CodeSandbox example.
Unified page
Search and Chat combined on a single route, toggled with a mode query parameter (search or chat). View the complete demo in our CodeSandbox example.