SDK 2 HTML tags and methods details
This page covers in detail all attributes and parameters of the tags and methods used in SDK 2.
<mindset-container> tag
The <mindset-container> tag is used to enable the flexible UI mode for Mindset AI agents. It acts as a wrapper for the <mindset-agent> tag, allowing you to customize the appearance and behavior of the embedded agent.
Please see the Agent flexible UI documentation for more details.
There is no specific attribute for that tag.
Example
<mindset-agent> tag
The <mindset-agent> tag is used to embed a Mindset AI agent within your application.
Please see the Agent Front-end documentation for more details.
Attributes
-
agentUid (string, required): The unique identifier for the agent you want to embed. An
agentSessionUid
can also be passed to the agentUid parameter, in this case the agent will be loaded with the session context (See Agent and Knowledge Context Provisioning for more details). -
initialQuestion (string, optional): A question to pre-fill the chat input field when the agent is loaded. That question is also transmitted each time a new thread is initiated by the user.
-
variables (string of {key: “value”}, optional): An object containing key-value pairs of variables to be passed to the agent. (Has to be a stringified JSON object). These variables can be used to customize the agent behavior, particularly to customize the external source URL.
-
style (string, optional): Inline CSS styles to apply to the agent.
Example
mindset.init() method
The mindset.init()
method is used to initialize the Mindset SDK with your specific configuration.
Please see the Agent Front-end documentation for learning with examples.
parameters
-
fetchAuthentication (function, required): A function that returns a Promise resolving to the authentication token for the user. This token is used to authenticate the user with the Mindset AI server.
-
appUid (string, required): The unique identifier for your Mindset application. This is provided by the Mindset AI team.
-
theme (object, optional): An object containing the color theme for the agent UI (See Agent UI color theme for more details).
-
customFontTheme (object, optional): An object containing the custom font theme for the agent UI. (See Agent fonts customization for more details). This allows you to specify custom fonts for the agent’s text elements.