Knowledge Assist

This page contains the API documentation for the Knowledge Assist UI module. This module is used to show helpful articles and FAQ suggestions to agents during the course of a conversation.

Usage

Import the module in your HTML page using the following code:

<scriptsrc="https://www.gstatic.com/agent-assist-ui-modules/v1/knowledge_assist.js"></script>

Embed the module using the following tag:

<agent-assist-knowledge-assist>

Attributes

Property name Type Comment
features string Comma-separated list of Knowledge Assist features that should be rendered (ARTICLE_SUGGESTION, FAQ, and ARTICLE_SEARCH).

Usage

Attributes are string-based component properties which can be set in the following ways:

From your HTML template directly:

<element-selectorproperty-name="value">

From your JavaScript code:

varel=document.querySelector('element-selector');
el.setAttribute('property-name','value');

Inputs

Property name Type Comment
config KnowledgeAssistConfig Optional configurations for Knowledge Assist module.

Usage

Inputs are typically JavaScript objects or other complex property types which must be assigned on the element instance directly:

constel=document.querySelector('element-selector');
el.propertyName=value;

Types

See the following section for the custom types used by the component.

KnowledgeAssistConfig

interfaceKnowledgeAssistConfig{
articleLinkConfig:{
/**
 * Whether to open the article in a new tab, or as a popup. Defaults to new
 * tab.
 */
target?:"blank"|"popup";
/**
 * Options to configure the popup's size and location. See
 * https://developer.mozilla.org/en-US/docs/Web/API/Window/open#window_features.
 */
popupWindowOptions?:string;
/**
 * The field name on the document metadata if a separate article link source
 * is provided.
 */
linkMetadataKey?:string;
};
}

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月24日 UTC.