November 25, 2024

How to use Copilot Studio Actions for Your Custom Agents?

Autonomous Agents in Copilot Studio

A few days ago, during Microsoft Ignite CEO of MS announced Autonomous Agents availability. This is a next big step for the Copilot Studio platform. To make it possible after adding features related to Generative AI Microsoft has switched the way Agent will work.
Previously (starting from PVA’s) an Agent was operating on Topics. When the User was asking an Agent a question – it was looking for some matching trigger phrases to select the best fitting Topic for the answer. With the latest announcement that has changed. You still have the ability to use the old model. To decide which one to go with You need to go to Your Agent Settings and Open Generative AI Tab
Here You can choose Generative (preview option. What that will do is – now AI will look for the best fitting Topic, Action or Knowledge Source to make a best answer to Users request. It can be done based on Actions, Topics or Knowledge Sources that You have prepared, or it can be done based on Gen AI own knowledge source but be sure that You want to switch that feature on!

New Action and Trigger Features

Now Your Agent is fully AI powered. To give him some “skills” You can use Actions. Those are the steps that Agent will take to help Your Users. For example, an Action can be running a Power Automate Cloud Flow or go and look for a specific record in a specific Dataverse Table via List rows actions. Your Agent can also react to a specific event with Triggers. So, Your Agent can start when a new record was created.

Going back to actions. There are some attributes that are assigned to each action. Each of them will have Name and Description, Inputs and Outputs, some of them will let You decide which authentication to choose when using this action. You will be able to decide if an Agent should use its creator credentials or Users credentials.

When it comes to descriptions – it is very important to properly describe all of Your items like actions, triggers, knowledge sources and variables. These descriptions will be used as a instruction for the Agent when it looks for a proper step to take. So, think about them as a prompts for AI model. Let’s look at specific action details. We will look to List rows action.

  1. Here You can define the Name and Displayed name for Your new action
  2. Here You are describing the action. Remember AI will check that description when it looks for the way to respond to a User’s request!

Now we need to define some Inputs and Outputs for our Action.

List rows Action: Managing Variables and Filters

With a List rows action as Inputs, you will see some mandatory variables and some additional ones. First You need to decide how Agent will collect values for mandatory variables. You can extract them from Users answer (it is Agent who will ask for it) or You can use values like in our example. I want that action to work on a specific table on specific environment.
As a third variable for the action, we will use the Filter rows option. It is same as we would use that action in Power Automate. But here we need to decide how we will provide a value for that variable, and it’s not just the name or ID with which Agent should filter the table, actually it needs to be entire OData formula for the Query. So, for the AI to be able to build that query we need to use Description area for that variable. And we need to give the instruction for AI how to build that formula

So, we are pointing out here that AI should take Request ID provided by the User and Filter Expenses table by the column cr55b_expense1 (which is Expense ID column) using Request ID provided by the User.

And last but not least we need to decide how the Output and the answer should look like.

  1. Description – instruction for AI model how to create the message for a User
  2. How the message will be created. It might be done by Agent or You can create Your own message.

And in the end how does it work? User is asking the question

Activity Map: Analyzing Generative Agent Sessions

As You can see new session was started and we can look on Activity map. It is specific for those Generative Agents. It is not the Agent Creator orc trigger phrases that is deciding which action to take. That is why we can review each session after it was done how our Agent was selecting proper knowledge sources.

You can see that Agent was able to extract proper Request ID from entire User answer and use it as a part of Data formula for filtering the rows. You can also see that User has received more information than just only Request Status.

Summary

  1. We have created an Action for Autonomous Agent
  2. With its proper description Agent was able to choose that action in response to Users question
  3. Agent was able to extract Request ID from entire text provided by User
  4. Agent was able to find proper row in a selected table and respond to a User with its details.

With this Agent it was not trigger phrases for Topics that were used to prepare the answer for the Users request. It was Agent with its AI model who decided which way to go and which knowledge source to use.
You need to remember that those are features In Preview. And that means that some errors might occur.

Actions allow You to:

  1. Create Your Agents faster,
  2. Use End User Access rights when running queries to SharePoint or Dataverse tables
Microsoft was announcing Agents as an extension to standard Copilots. For example, for Microsoft 365 Copilot. But that is not the only way You can use them. Those Agents can be published as they were till now as standalone Agents. And You can use any channel You like.
If You would like to see that Agent in real life scenario, please check our video where we are using its help via Microsoft Teams. Both as a standalone app and as a Team Member!
[wp_add_post_tags]

See the latest insights from Netwise

How to use Copilot Studio Actions for Your Custom Agents

A few days ago, during Microsoft Ignite CEO of MS announced Autonomous Agents availability. This is a next big step for the Copilot Studio platform.

Read more
Interactive Experience Dashboards

Interactive dashboards in Power Platform – introduction

In today’s data-driven world, businesses face increasing pressure to make fast, informed decisions.

Read more

Updates from Power Platform Community Conference 2024

At the recent Power Platform Community conference in Las Vegas, Microsoft announced several exciting updates. So, what’s changing?

Read more