Contact usRequest a demo

Creating Microsoft Copilot Studio agents for Unblu Spark

Microsoft Copilot Studio lets you create AI agents in a web interface. In Unblu Spark, these agents can be used in one of two ways:

Since Microsoft Copilot Studio is very versatile, there are various ways to create and configure an agent. This article describes one possible approach.

Prerequisites

Before you start working through this article, make sure you meet the following requirements:

  • Your organization has an environment in Microsoft Copilot Studio.

  • You have a Microsoft account that can access your organization’s environment.

Setting up an agent in Microsoft Copilot Studio

To set up an agent in Microsoft Copilot Studio that can act as a suggestion source, you must complete the following steps:

Each of these steps is outlined below. For further information and more detailed instructions on each step, refer to the Microsoft Copilot Studio documentation.

Create an agent

To create an agent in Microsoft Copilot Studio, complete the following steps:

  1. Select Agents in the left sidebar, then click New agent.

  2. Give your agent a name. Optionally give it a different icon and a description.

  3. To add knowledge sources, follow the steps outlined in the next section. You can skip this step for now and add knowledge sources later if you prefer.

  4. Click Create in the upper right-hand corner to complete the process.

Add knowledge sources to the agent

When Microsoft Copilot Studio creates your agent, it displays the agent’s Overview page. To add knowledge sources, click Knowledge at the top of the screen. Any knowledge sources you added while creating the agent are already listed on the page.

To add a knowledge source, proceed as follows:

  1. Click Add knowledge.

  2. In the modal dialog that appears, select the type of source you wish to add and follow the instructions in the Microsoft Copilot Studio documentation.

  3. Click Add to add the resource.

Repeat the steps above for all the knowledge sources you want the agent to use.

Once you’ve added a knowledge source, you can mark it as an official source. If you do so, the agent adds a remark to that effect at the beginning of messages based on the resource in question.

Disable general knowledge

By default, Microsoft Copilot Studio agents use all the resources they were trained on to generate suggestions. Since you have no control over these resources, using them may result in less appropriate responses.

To ensure only the knowledge sources you selected are used to generate suggestions, disable the option Allow the AI to use its own general knowledge in the agent’s Overview tab.

Configure the agent’s topics

This section is only a brief introduction to configuring topics. For more information, refer to Create and edit topics in the Microsoft Copilot Studio documentation.

In the context of Microsoft Copilot Studio, a topic represents part of an exchange between the agent and a user. When you create an agent, Microsoft Copilot Studio automatically creates a number of predefined custom and system topics for you. Whether you need the predefined topics or not depends on your specific use case for the agent. Delete or disable any topics you don’t need.

Publish the agent

To prepare your agent for publication, first set its authentication type to No authentication:

  1. Open the agent’s settings.

  2. In the sidebar on the left, click Security, then click Authentication in the main area.

  3. On the next screen, select the option No authentication and click Save.

Now you’re ready to publish the agent. To do so, close the agent’s settings and click Publish.

Now you can configure Unblu Spark to use the agent as a suggestion source.

Configuring Microsoft Copilot agents in Unblu Spark

You can add a Microsoft Copilot agent to Unblu Spark as a suggestion source or dialog bot using the Account Configuration interface or the Unblu web API.

In both cases, you need the following information:

  • The Direct Line API 3.0 endpoint that Unblu Spark uses to communicate with the agent. The endpoint is <directLineBaseURI>/v3/directline. Replace <directLineBaseURI> with the appropriate Direct Line baseURI for your Microsoft Copilot agent.

    Note that the endpoint doesn’t distinguish one agent from another. That’s what the authentication token’s for, as described below.

  • An authentication token. This identifies a specific agent.

    The authentication token comes from Microsoft Copilot Studio. To get one for your Copilot agent, open the agent’s settings, click Security in the left sidebar, then select Web channel security. You can use either of the two secrets listed as the agent’s authentication token.

  • The Microsoft Copilot agent ID and the Microsoft environment ID. To retrieve these, click the settings icon Settings icon and select Session details. The values are listed under the heading Copilot Studio details as Copilot Id and Environment ID, respectively.

If you’re using Copilot’s generative AI abilities, make sure you set the timeout such that Copilot has enough time to generate a suggestion. In these circumstances, consider setting the timeout to at least 10000 ms.

You must also set several configuration properties in Unblu Spark:

  • com.unblu.copilot.activityReceptionMethod specifies how Unblu Spark is informed of activity on the Copilot agent’s part. You can configure Unblu Spark to expect responses using HTTP or WebSockets.

    • If you choose HTTP, Unblu polls the agent for new activities.

    • If you choose WebSockets, Unblu opens a WebSocket connection to the agent that the latter can then use to notify Unblu Spark of new activities. (Agents generate a lot of activities, not just when they’ve created a suggestion.)

Once you’ve added the Microsoft Copilot agent to Unblu Spark as a suggestion source, you can use it in conversation templates like any other suggestion source. For more information, refer to Enabling suggestions.

See also