# SDK 3.0 HTML Tags and Methods Reference

> You're reading the Mindset v3 documentation. v3 is no longer sold; this is reference for existing customers. Mindset 4 docs are at /docs.

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.

- [Quick Start Guide](https://docs4.mindset.ai/v3/deploy/sdk3/sdk3-frontend): See the Agent Front-end documentation for implementation examples

### Parameters

- `fetchAuthentication` (function, path)

  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).

* `appUid` (string, required, path)

  The unique identifier for your Mindset AI application. This is provided by the Mindset AI team.

- `theme` (object, path)

  An object containing the color theme for the agent UI.
  - [Theme Customization](https://docs4.mindset.ai/v3/deploy/sdk3/sdk3-agentui-colour): See Agent UI Color Theme documentation

* `customFontTheme` (object, path)

  An object containing the custom font theme for the agent UI. Specify custom fonts for the agent's text elements.
  * [Font Customization](https://docs4.mindset.ai/v3/deploy/sdk3/sdk3-fonts): See Agent Fonts Customization documentation

- `enableVoice` (boolean, path, default false)

  Enable or disable voice interaction with the agent.
  - [Voice Features](https://docs4.mindset.ai/v3/features/build/agent-voice): See Agent Voice documentation
  ### Examples

**Authenticated Access**

```javascript
mindset.init({
    fetchAuthentication: getAuthToken, 
    appUid: "YOUR-APP-UID",
    theme: selectedTheme,
    customFontTheme: customFontTheme,
    enableVoice: true
});
```

**Anonymous Access**

```javascript
mindset.init({
    appUid: "YOUR-APP-UID",
    theme: selectedTheme,
    customFontTheme: customFontTheme,
    enableVoice: true
});
```

## `<mindset-agent>` Tag

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

- [Implementation Guide](https://docs4.mindset.ai/v3/deploy/sdk3/sdk3-frontend): See Agent Front-end documentation for setup details

### Attributes

- `agentUid` (string, required, path)

  The unique identifier for the agent you want to embed.

  You can also pass an `agentSessionUid` to load the agent with existing session context.
  - [Session Management](https://docs4.mindset.ai/v3/deploy/sdk3/sdk3-agent-knowledge-context-provisioning): See Agent and Knowledge Context Provisioning

* `initialQuestion` (string, path)

  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.

- `variables` (string, path)

  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

* `style` (string, path)

  Inline CSS styles to apply to the agent element.
  ### Example

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

```javascript
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.

- [Flexible UI Guide](https://docs4.mindset.ai/v3/deploy/sdk2/flexible-ui): See Agent Flexible UI documentation for implementation details

### Attributes

This tag has no specific attributes.

### Example

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