Mindset AI Documentation
  • General
    • Welcome
    • AI and Security
      • AI Guidelines
      • Security Q&A
      • AI Buyers Guide
  • Platform
    • Overview
    • Features
      • Welcome workflow
        • How to configure the Welcome workflow
        • Welcome workflow best practices
      • Onboarding workflow
        • How to configure the Onboarding workflow
        • Onboarding best practices
        • How to configure Single Sign-On (SSO)
        • How to Configure Multi Factor Authentication (MFA)
      • Knowledge workflow
        • Content Discovery
          • How to configure Content Discovery
          • Setting up the Content Discovery carousels
          • ‘Trending’ carousel calculations
        • Knowledge Banks
          • How to configure a Content Knowledge Bank
          • Learn about Synced Knowledge Banks
          • How to create Speakers
          • How to exclude Content from being visible
          • How to process PDF files
          • How to process SCORM files
          • Knowledge Bank best practices
          • Prompts
            • How to configure Prompts
            • Prompts best practices
        • Events
          • How to configure External Events
          • How to Configure Live Streaming Events
        • Knowledge workflow FAQs
      • Agents
        • How to configure the Agent workflow
          • How to add an Agent Disclaimer message
        • How to create Agents
          • Settings
          • Personality
          • Policy
          • Capabilities
            • Capabilities best practices
          • Tools
          • LLM (Beta)
          • Design
          • Knowledge
          • Bias
          • Testing
          • Preview
          • Access
        • Language Translation within Agents
    • Design
      • Navigation
      • Branding
      • Thumbnail Design
      • Images
        • SVG Images
        • Selecting the Right Image for your Application
    • Accounts
      • How to configure Accounts
      • How to configure Account branding
      • How to invite end-users to an Account
    • Humans
  • Developers
    • Embed SDK
      • Embed an AI agent: step by step guide
      • How to embed an agent in your site
      • Testing your Embedded Agent
      • Authentication
    • Mindset API
      • Mindset Public APIs
      • HTTP API
        • API Key authentication
        • API Servers
        • api-authenticate-embedded-user
      • REST API
        • Contexts API
        • Context Files API
        • Labels API
  • Analytics
    • Overview
    • ThoughtSpot
      • ThoughtSpot FAQs
        • Adding a logo or image to a liveboard
        • There is data missing from liveboard
        • Exporting raw data
        • Exporting data to a csv file
        • How to add a note to a liveboard
        • How to pin in a liveboard
        • Editing individual data visualizations in a liveboard
        • Thoughtspot Alerts
    • Connecting a BI tool
  • Integrations
    • Overview
      • Choosing Data for your Agent
      • Supported Files
    • Content management
      • Google Drive
        • Google Drive Integration Set-Up
      • SharePoint
        • SharePoint Integration Set-Up
      • Hubspot
      • Podbean
      • Wistia
      • WordPress
      • Dropbox
    • Communication
      • Microsoft Teams
      • Slack
    • Customer Management and Payment
      • Hubspot
      • Stripe
  • Support
    • Contacting support
    • Taking a screenshot on any laptop
    • Resizing & compressing images
    • Performing a hard refresh
    • Application loading time
    • Raise a support ticket
    • Service Level Agreement (SLA)
  • Mindset AI Website
  • Book a Demo
Powered by GitBook
On this page
  • Introduction
  • Not for end users
  • Security warning
  • Getting started
  • You will need to know
  • Testing page starting point
  • Testing your embed agent in a playground page

Was this helpful?

  1. Developers
  2. Embed SDK

Testing your Embedded Agent

A working example for a developer wanting to embed an agent in web page.

PreviousHow to embed an agent in your siteNextAuthentication

Last updated 2 months ago

Was this helpful?

Introduction

Mindset's embedded agent assumes that all user authentication and management is handled externally, so it needs a host application to manage this.

We have created a very simple server side script which handles the authentication using query parameters passed in a URL, and then returns a working HTML page which loads an agent.

You are encouraged to view the source of this page and see how:

  • the agent is assigned to an element in the page

  • how the agent is configured with application, agent and user information

You will not see the code that uses your API key to create an authToken for the user. That is handled in the server side code, but the code is as described in

Not for end users

This page is an example implementation for developers to use as a reference.

It is not suitable for end users because the API Key needed should never be revealed to end users. It grants access to many application resources.

Security warning

This test page uses an API Key in its URL

This is inherently insecure. API keys should in normal use never be in anything run by an end user’s browser.

The API key has the same rights to all data in your application that an app admin has.

This functionality is provided for internal use by Mindset's partners developing their systems

Getting started

You will need to know

  • appUid - It is likely to be the main part of your domain name.

  • agentUid - You can get it from your Mindset App Admin UI (agents section)

  • Your API host server - also known as MINDSET-API-HOST

Your Mindset contact can help you with these pieces of information.

You will also need:

  • an API key. You can generate this yourself in the API Key management section of the admin UI.

If you cannot see this in the Admin UI you may need to ask Mindset to enable it for you

You should also pick an email address to use as a test user.

Note This merely has to be in the format of an email address. No emails will ever be sent to this address, and it will be visible in a modified form in some parts of the Admin UI

Testing page starting point

Open that URL in your browser : https://your-api-host-server/api-embed-agent-test-initform, then fill all INPUT fields with your own information, and click the submit button.

Testing your embed agent in a playground page

You should now see the playground page. The authentication token has been generated on our server side and we encourage you to open the source code tool of your browser in order to check the Mindset javascript used on the fronte end to display the embed agent in that testing page.

Your agent is not loaded yet. You must do some action in that playground to demonstrate how the Mindset SDK methods work:

  • Click on the initApp() button to load the Agent module in the sample web page.

  • Click on the agentStartThread() button to display the agent UI initially loaded with the question passed from the playground INPUT field.

  • Click again on the agentStartThread() button, but this time by passing another initial question.

To build your own implementation you can also follow the details described in

Embed an AI agent: step by step guide
Authentication
Screenshot of the testing page