[post_published]

How to use Copilot Studio Actions for your Custom Agents?

Autonomous Agents in Copilot Studio

At the last Microsoft Ignite, Satya Nadella, CEO of Microsoft, unveiled the availability of Autonomous Agents, marking a significant leap for the Copilot Studio platform. With Generative AI, Microsoft has revolutionized the way digital agents operate.

The recent update to Agents in Copilot Studio redefines the capabilities of customer service chatbots. With just a few clicks, you can now create an intelligent virtual assistant that interacts with your users in natural language, improving their experience and providing better answers through AI. Let’s explore how you can achieve this.

Enabling Autonomous Agents in Copilot Studio

Historically, virtual agents (starting from PVAs) operated based on Topics. When a user asked a question, the agent would search for matching trigger phrases to select the most relevant Topic for the answer. With the introduction of the latest feature, that process has evolved. While the standard model remains available, you can now enable GenAI-powered Agents. To do this, navigate to Agent Settings in Copilot Studio and open the Generative AI tab, as shown below.
To activate intelligent Agents, select the Generative (preview) option. With this choice, your AI-powered agent will intelligently search for the best-fitting Topic, Action, or Knowledge Source to provide the most accurate response to the user’s request. Virtual Agents can base their answers on actions, topics, or knowledge sources you define, or they can utilize their built-in knowledge sources. You can configure this in the Knowledge section – but choose carefully. Depending on your use case, enabling general knowledge may or may not be the optimal choice.

New Action and Trigger features

With GenAI enabled, your agent is fully powered by AI. Now, it’s time to equip it with the skills it needs to effectively assist your users. This is where Actions come into play.

Actions allow you to:

  1. Create your Agents faster,
  2. Use End User Access rights when running queries to SharePoint or Dataverse tables.

An Action can execute a Power Automate Cloud Flow or search for a specific record in a Dataverse Table via List rows actions. You can also define Triggers (for example, “when a new record is created”) that your Agent can react to.

Each action has several attributes, including Name, Description, Inputs, and Outputs. Some attributes also allow you to specify the authentication type for the action, letting you decide whether the Agent uses its creator’s credentials or the user’s credentials.

It is absolutely critical to properly describe all parameters of your Agent, such as actions, triggers, knowledge sources, and variables. These descriptions serve as instructions for the AI Agent as it determines the appropriate step to take. Think of them as prompts for the AI model.

How to set up an Action for a GenAI Agent?

Let’s look at the details of setting up a specific action. In this example, we will define a ‘List rows’ action.

First, you need to specify the Name and Displayed name for your new Action. The highlighted field is where you will provide a detailed description of the Action. Remember, the AI will reference this description when deciding how to respond to a user’s request! You can also select the authentication method at this stage.

Next, you need to define the Inputs and Outputs for your Action. In the Inputs tab, you will see both mandatory and additional variables. You need to decide how the Agent will collect values for the mandatory variables.
Depending on your scenario, you can choose to extract the mandatory variables from the user’s answers (the Agent will ask for the required data) or use predefined values, as illustrated in our example below. In our specific case, we want this action to operate on a particular table within a specific environment.
As a third variable for our Action, we will use the Filter rows option. This is the same option you would use if setting up a flow in Power Automate. However, the setup here is a little more complex.
When providing a value for Filtering Rows, simply providing a name or ID is not enough for our Agent to filter the table. You need to provide the entire OData formula for the query.
Therefore, for the AI to correctly build the required query, you must precisely define the variable in the Description field. This will directly instruct the AI on how to construct the necessary formula

In our example, we are instructing the AI to take the Request ID provided by the user and use it to filter the Expenses table by column cr55b_expense1 (which represents the Expense ID column).

Last but not least, you need to decide what the Output of the answer will look like.

Here, the Description provides instructions for our AI model on how to create a response for the user. The second highlighted option allows you to choose how the message will be generated: the Agent can create it autonomously, or you can provide your own predefined message.

So, how does this look in practice? Here’s the output to a question asked by a user.

Analyzing Generative Agent sessions on the Activity Map

You can review every initiated session with a Generative Agent on your Activity Map. This functionality is specifically designed for Generative Agents. Since these Agents’ actions are not strictly predefined by the Agent Creator or trigger phrases, you can review each session after it ends to verify if your Agent selected the appropriate knowledge sources.
In the screenshot above, you can see that the Agent successfully extracted the correct Request ID from the user’s input and used it as part of the Data formula for filtering rows. The user also received more comprehensive information in response than just a simple status update.

In this example, we managed to:

  1. Create an Action for an Autonomous Agent
  2. Ensure that, with the proper description, the Agent was able to choose that action in response to the user’s question.
  3. Enable the Agent to extract the Request ID from the text provided by the user.
  4. Allow the Agent to find the proper row in a selected table and respond to a user with its details.
Importantly, we did not use trigger phrases for Topics to prepare our answers. The Agent, powered by the AI model, autonomously decided which path to take and which knowledge source to use.

Get started with AI-powered Agents

Microsoft announced Agents as an extension to standard Copilots, such as Microsoft 365 Copilot. However, there are other powerful ways you can use them. Previously, these virtual assistants were often standalone agents – and you can still publish them this way. Alternatively, you can define a custom Agent for any channel you use within your organization, ensuring it’s ready to help your users wherever they are.
It’s important to remember that this feature is still in Preview, so occasional errors may occur.
If you’d like to see this Agent in a real-life scenario, check out the video at the beginning of this article, where we demonstrate its capabilities via Microsoft Teams – both as a standalone app and as a Team Member.
And if you want to explore more or discover how these agents can benefit your organization, reach out to us – we’ll help you take the next step.

Copilot Studio

Discover the full potential of Copilot Studio and explore its capabilities.
[wp_add_post_tags]

See the latest insights from Netwise

CDP vs CRM: Understanding the key differences between the main customer management systems

In this article, we dive into the key differences between a Customer Data Platform (CDP) and Customer Relationship Management (CRM).

Read more

How Customer Data Platforms support a unified customer view

Discover how Customer Data Platforms turn data into a unified Customer 360° view, enabling real-time personalization with Customer Insights.

Read more

Creative use of relationship behaviors in Dynamics 365: How removing data from the Target field saved our project

In this article, we show how a unique client need led to a simple, creative solution beyond standard Dataverse features.

Read more