> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindset.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK 3.0 HTML Tags and Methods Reference

> Complete reference for all attributes and parameters of SDK 3.0 tags and methods

## mindset.init() Method

The `mindset.init()` method initializes the Mindset AI SDK with your specific configuration.

<Card title="Quick Start Guide" icon="rocket" href="sdk3-frontend">
  See the Agent Front-end documentation for implementation examples
</Card>

### Parameters

<ParamField path="fetchAuthentication" type="function">
  A function that returns a Promise resolving to the authentication token for the user. This token authenticates the user with the Mindset AI server.

  **Only provide this parameter if your agent uses authenticated access** (default mode).
</ParamField>

<ParamField path="appUid" type="string" required>
  The unique identifier for your Mindset AI application. This is provided by the Mindset AI team.
</ParamField>

<ParamField path="theme" type="object">
  An object containing the color theme for the agent UI.

  <Card title="Theme Customization" icon="palette" href="sdk3-agentui-colour">
    See Agent UI Color Theme documentation
  </Card>
</ParamField>

<ParamField path="customFontTheme" type="object">
  An object containing the custom font theme for the agent UI. Specify custom fonts for the agent's text elements.

  <Card title="Font Customization" icon="font" href="sdk3-fonts">
    See Agent Fonts Customization documentation
  </Card>
</ParamField>

<ParamField path="enableVoice" default="false" type="boolean">
  Enable or disable voice interaction with the agent.

  <Card title="Voice Features" icon="microphone" href="/features/build/agent-voice">
    See Agent Voice documentation
  </Card>

  ### Examples
</ParamField>

<CodeGroup>
  ```javascript Authenticated Access theme={null}
  mindset.init({
      fetchAuthentication: getAuthToken, 
      appUid: "YOUR-APP-UID",
      theme: selectedTheme,
      customFontTheme: customFontTheme,
      enableVoice: true
  });
  ```

  ```javascript Anonymous Access theme={null}
  mindset.init({
      appUid: "YOUR-APP-UID",
      theme: selectedTheme,
      customFontTheme: customFontTheme,
      enableVoice: true
  });
  ```
</CodeGroup>

## `<mindset-agent>` Tag

The `<mindset-agent>` tag embeds a Mindset AI agent within your application.

<Card title="Implementation Guide" icon="code" href="sdk3-frontend">
  See Agent Front-end documentation for setup details
</Card>

### Attributes

<ParamField path="agentUid" type="string" required>
  The unique identifier for the agent you want to embed.

  You can also pass an `agentSessionUid` to load the agent with existing session context.

  <Card title="Session Management" icon="clock-rotate-left" href="sdk3-agent-knowledge-context-provisioning">
    See Agent and Knowledge Context Provisioning
  </Card>
</ParamField>

<ParamField path="initialQuestion" type="string">
  A question to pre-fill the chat input field when the agent loads. This question is also transmitted each time the user starts a new thread.
</ParamField>

<ParamField path="variables" type="string">
  A stringified JSON object containing key-value pairs of variables to pass to the agent. These variables customize agent behavior, particularly for external source URLs.

  **Format:** Must be a stringified JSON object
</ParamField>

<ParamField path="style" type="string">
  Inline CSS styles to apply to the agent element.

  ### Example
</ParamField>

```html theme={null}
<mindset-agent 
    agentUid="AGENT-UID"
    initialQuestion='What is your purpose?'
    style="display: block;">
</mindset-agent>
```

```javascript theme={null}
const mindsettag = document.getElementsByTagName('mindset-agent')[0];
mindsettag.setAttribute('variables', JSON.stringify({ 
    variablekey1: "variable1value" 
})); 
```

## `<mindset-container>` Tag

The `<mindset-container>` tag enables 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.

<Card title="Flexible UI Guide" icon="expand" href="https://docs.mindset.ai/deploy/sdk2/flexible-ui">
  See Agent Flexible UI documentation for implementation details
</Card>

### Attributes

This tag has no specific attributes.

### Example

```html theme={null}
<mindset-container>
    <mindset-agent 
        agentUid="AGENT-UID"
        style="display: block;">
    </mindset-agent>
</mindset-container>
```
