Skip to main content
Mindset AI agents on SDK 3.0 use simpler visual option configuration and have additional configuration options. Please speak to your customer success manager to enable these options in your Agent Management Studio.

Important: SDK 3.0 Configuration Behavior

Before migrating, understand how SDK 3.0 configuration affects your existing agents:
Agent configuration changes affect all versions:
  • Agent configuration details (Purpose, Personality, Policy, LLM Choice) will affect live and deployed agents even when they are still deployed using SDK 2.0
  • MCP and context assignment changes (when not using agent sessions) will affect live and deployed agents even when they are still deployed using SDK 2.0
Options configuration is version-specific:
  • Options configuration will only apply to agents deployed using SDK 3.0 and will not impact agents deployed with SDK 2.0. Feel free to experiment before updating live agents to use SDK 3.0.
  • SDK 2.0 options will not be available while the Agent Management Studio is set to manage SDK 3.0 agents. If you need to make configuration changes to options for your active agents deployed using SDK 2.0, please speak with your customer success manager.

Migration Step

1

Replace the SDK Script

Update the script source to use SDK 3.0:
<script src="MINDSET-SERVER-URL/mindset-sdk3.umd.js"></script>

Complete Migration Example

Here’s what your complete SDK 3.0 implementation should look like:
<html>
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="https://MINDSET-SERVER-URL/mindset-sdk3.umd.js"></script>

        <script>
            async function getAuthToken() {
                const currentUserId = 'session123'
                const userAuthTokenServerUrl = `YOUR-BACKEND-API-RETURNING-AUTHTOKEN`
                
                try {
                    const headers = {
                        "accept": "application/json",
                        "Content-Type": "application/json"
                    };
                    const response = await fetch(userAuthTokenServerUrl, {
                        method: 'POST',
                        headers: headers,
                        body: JSON.stringify({"currentUserId": `${currentUserId}`})
                    });
                    if (!response.ok) {
                        throw new Error(`HTTP error! status: ${response.status}`);
                    }
                    const responseData = await response.json();
                    return responseData.authToken;
                } catch (error) {
                    console.log('Error fetching auth token:', error);
                    throw error;
                }
            }

            mindset.init({
                appUid: 'YOUR-APP-UID', 
                fetchAuthentication: getAuthToken
            });
        </script>   
    </head>

    <body>
        <div class="main-container">
            <h1>Mindset Embedded Agent</h1>
        
            <mindset-agent 
                agentUid='YOUR-AGENT-UID'
                style='width: 100%; height: 600px; display: block; background-color: rgb(255, 255, 255); overflow: hidden; border-radius: 12px;'>
            </mindset-agent>
        </div> 
    </body>
</html>

Need help with migration? Contact your customer success manager or reach out to [email protected].