Extend Microsoft 365 Copilot with Copilot Studio custom agents

Custom engine agents are better suited for scenarios using richer capabilities such as bringing your own model, orchestrator and adding proactive support. From a Microsoft 365 Copilot extensibility standpoint, Copilot Studio allows you to now use things like topics
Extend Microsoft 365 Copilot with Copilot Studio custom agents
Table of Contents
In: Copilot for Microsoft 365, Agents

So friends, this one has been on my wish list for SO very long... and it's here! Last week Microsoft released the ability in Copilot Studio to extend Microsoft 365 Copilot with custom engine agents (custom agents).

In this blog post, we'll take a look at taking an existing custom engine agent in Copilot Studio, the experience we get when we publish it to Teams to date, and then we'll explore how we can further enable this for Microsoft 365 Copilot through the Teams + Microsoft 365 channel.

How have things changed?

So let's take a look at how things are different... To begin with, or since agents have been a thing in Microsoft 365, we would use declarative agents to extend Microsoft 365 Copilot. These agents carry a simpler set of capabilities and are focused on a couple of things including Graph grounding, use of Graph connectors, use of SharePoint and OneDrive, use of tools such as code interpreter and image generator. Declarative agents also allow us to enable Microsoft 365 Copilot with task capabilities using API plugins, or actions from Copilot Studio.

The slide above highlights some of the differences between custom engine agents and declarative agents. Declarative agents can be used for simpler scenarios where you're happy to use the Copilot language model and orchestrator and perhaps you're simply adding basic extensions. Custom engine agents are better suited for scenarios using richer capabilities such as bringing your own model, orchestrator and adding proactive support. From a Microsoft 365 Copilot extensibility standpoint, Copilot Studio allows you to now use things like topics and adaptive cards whilst extending Microsoft 365 Copilot and using Copilot as a channel.

Teams experience for CEAs built in Copilot Studio

So taking a look at the experience we've had to date with building CEAs in Copilot Studio and then publishing to Microsoft Teams, we've been able to do a few different things...

  1. We've been able to interact with our agent via a Teams app.
  1. We've been able to get a bit closer to the context of the task we're attempting to achieve by bringing our agents in-line in Teams chats and channels

There's two things to observe here. With the first option, we find ourselves in a scenario where we're likely to be context switching to work with our AI assistant. This isn't necessarily the best user experience for an LLM app or GenAI assistant. Think of how Copilot works nicely in some experiences in a sidecar. For this use case something more like this may be helpful. That said, it isn't the UX for every scenario and there's alternatives to reducing context switching here.

With the second option, we completely remove the need to context switch if the scenario is that someone asks us to do something via chat or channel post.

So, whats new?

Now, we can also publish our custom engine agents to Microsoft 365 Copilot. Let's take a look at the experience and let's see how this slots into a workflow where this is suddenly very helpful.

Let's start by prompting Microsoft 365 Copilot with this prompt: "Find appointments I need to book from my inbox".

Nice! Copilot found an appointment I still need to book for John Doe tomorrow. Let's reduce my need to context switch by calling on my agent which I was previously using in Teams, to action the task.

I've simply now @ tagged the relevant agent and asked it to book the appointment. Now it's actioned the task for me.

So, here I'm using a topic in my Copilot Studio CEA (custom engine agent) which does things like searching for the patient. Letting me know if it couldn't find the person, and asking for a specific name or further questions to identify the person. These are things we couldn't achieve as easily in declarative agents where it is more difficult to implement consistent validation following API calls etc. In that scenario we'd have to implement more deterministic scenarios with API calls and instructions. These are great for lots of scenarios. Some require more deterministic 'sub workflows' or scenarios where the value in AI is through the agent orchestrating the workflow to match/follow.

How do we publish a CEA to Microsoft 365 Copilot from Copilot Studio?

So let's take a look at my agent. It is already published to Microsoft Teams, now let's handle Microsoft 365 Copilot. Very simply, I'm going to select channels, then select Teams + Microsoft 365.

Now all I need to do is check the box to make the agent available in Microsoft 365 Copilot. If you've already submitted your agent as an app to integrated apps in Teams/Microsoft 365, you may need to re-publish your agent and approve the agent in integrated apps again to enable it for Microsoft 365 Copilot

Now check out your custom engine agent in Microsoft 365 Copilot and use the agents you use in various other channels, in the flow of work everywhere including Microsoft 365 Copilot! Yes, that means even in office applications and Microsoft 365 Copilot Chat.

There's more to come

The Microsoft 365 Copilot extensibility landscape is getting better and better. Stay tuned for more to come on LewisDoesDev surrounding Copilot extensibility and working with custom engine agents.

Comments
More from LewisDoesDev
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to LewisDoesDev.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.