Skip to main content

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.

portal.internal/engineering/assistant
New chat Library AgentsTodayWho owns the payments…Canary alarm follow-up
Who owns the payments service?Share

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.

Ask a follow-up…

Illustrative previewRendered with sample data — in your app, this component renders live against your organization's Glean instance.

Install the SDK

npm install @gleanwork/web-sdk

Render chat

  1. Create a container element with position: relative, display: block, and a defined width and height.

  2. 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:

OptionTypeDescription
agentIdstringThe 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.
initialMessagestringA message sent on the user's behalf to start the conversation.
chatIdstringOpaque ID that restores an existing chat session.
landingPage'chat' | 'agentLibrary'Initial view when the widget loads. Defaults to 'chat'.
promptIdstringOpens the widget with a saved Glean prompt.
customizationsChatCustomizationsToggle individual UI features (agent library, prompt library, feedback, chat menu, and more).

All components also accept the common Optionsbackend, authToken, theme, themeVariant, locale, and more.

info

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

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.