Stay organized with collections
Save and categorize content based on your preferences.
This page contains the API documentation for the Generative knowledge assist UI module, also called Knowledge Assist V2. This module is used by agents to query their company's knowledge bases and receive generative AI-powered answers.
Usage
Import the module in your HTML page using the following code:
See the following section for the custom types used by the component.
KnowledgeAssistV2Config
interfaceKnowledgeAssistV2Config{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;};showCopyAnswer:boolean;showPasteAnswer:boolean;}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eThis page documents the API for the Generative Knowledge Assist UI module (Knowledge Assist V2), which helps agents query knowledge bases and receive AI-powered answers.\u003c/p\u003e\n"],["\u003cp\u003eThe module can be imported into an HTML page using a provided script tag and embedded using the \u003ccode\u003e<agent-assist-knowledge-assist-v2>\u003c/code\u003e tag.\u003c/p\u003e\n"],["\u003cp\u003eThe module accepts string-based attributes like \u003ccode\u003esession-id\u003c/code\u003e and \u003ccode\u003eparent\u003c/code\u003e, which can be set directly in the HTML template or via JavaScript.\u003c/p\u003e\n"],["\u003cp\u003eThe module also takes a \u003ccode\u003econfig\u003c/code\u003e input, of type \u003ccode\u003eKnowledgeAssistV2Config\u003c/code\u003e, which allows customization of the module, such as how articles are opened and whether copy/paste functions are available.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eKnowledgeAssistV2Config\u003c/code\u003e allows configuring article links, controlling whether to open in a new tab or popup, and enabling copy/paste answer features.\u003c/p\u003e\n"]]],[],null,["# Knowledge assist\n\nThis page contains the API documentation for the [Generative knowledge assist](/agent-assist/docs/generative-knowledge-assist) UI module, also called Knowledge Assist V2. This module is used by agents to query their company's knowledge bases and receive generative AI-powered answers.\n\nUsage\n-----\n\nImport the module in your HTML page using the following code: \n\n \u003cscript src=\"https://www.gstatic.com/agent-assist-ui-modules/v2/knowledge_assist.js\"\u003e\u003c/script\u003e\n\nEmbed the module using the following tag: \n\n \u003cagent-assist-knowledge-assist-v2\u003e\n\nAttributes\n----------\n\n### Usage\n\nAttributes are string-based component properties which can be set in the following ways:\n\nFrom your HTML template directly: \n\n \u003celement-selector property-name=\"value\"\u003e\n\nFrom your JavaScript code: \n\n var el = document.querySelector('element-selector');\n el.setAttribute('property-name', 'value');\n\nInputs\n------\n\n### Usage\n\nInputs are typically JavaScript objects or other complex property types which must be assigned on the element instance directly: \n\n const el = document.querySelector('element-selector');\n el.propertyName = value;\n\nTypes\n-----\n\nSee the following section for the custom types used by the component.\n\n### KnowledgeAssistV2Config\n\n interface KnowledgeAssistV2Config {\n articleLinkConfig: {\n /**\n * Whether to open the article in a new tab, or as a popup. Defaults to new\n * tab.\n */\n target?: \"blank\" | \"popup\";\n /**\n * Options to configure the popup's size and location. See\n * https://developer.mozilla.org/en-US/docs/Web/API/Window/open#window_features.\n */\n popupWindowOptions?: string;\n /**\n * The field name on the document metadata if a separate article link source\n * is provided.\n */\n linkMetadataKey?: string;\n };\n showCopyAnswer: boolean;\n showPasteAnswer: boolean;\n }"]]