Revolutionizing AI Workflows: Multi-Agent Group Chat with Copilot Agent Plugins in Microsoft Semantic KernelĀ
Copilot Agent Plugins (CAPs) are revolutionizing how developers interact with Microsoft 365 data. By transforming natural language into seamless CRUD actions using Microsoft Graph and Semantic Kernel, CAPs enable the creation of intelligent, AI-driven solutions. This sample demonstrates a multi-agent group chat system where AI-powered agents collaborate across Contacts, Calendar, and Emailā with a standout Legal Secretary Agent ensuring compliance and multilingual support.Ā
šŗ Watch the full video: https://go.fabswill.com/capsagentsĀ Ā
Why Multi-Agent Systems MatterĀ
In the rapidly evolving AI landscape, a single assistant isn’t enough. Multi-agent systems provide a specialized, structured approach, leading to more accurate and efficient workflows. Here’s how each agent contributes:.Ā
- ā Chief of Staff Agent ā Orchestrates interactions, intelligently routing queries to specialized agents.
- ā Contacts Agent ā Retrieves and manages contact information.
- ā Calendar Agent ā Handles scheduling and event retrieval.
- ā Email Agent ā Fetches and composes emails with AI-powered context.
- ā Legal Secretary Agent ā Ensures responses adhere to compliance guidelines and provides translations.Ā
Each agent has a specific role, ensuring that requests are processed with precision and accountability. The Chief of Staff Agent intelligently routes queries and ensures appropriate execution.Ā
Technical BreakdownĀ
This .NET console application leverages Microsoft Semantic Kernel Plugins to execute OpenAPI-based workflows. Using a structured conversation flow, agents dynamically refine and evaluate prompts. Hereās how it works:Ā
- Kernel Setup and ConfigurationĀ
- Plugin IntegrationĀ
- Agent-Orchestrated FlowĀ
- Compliance and Multilingual SupportĀ
Architecture OverviewĀ
Technical Break down with ScreenshotsĀ
We want to ensure that these assemblies are in your project and because we are using the Agents framework which is experimental, we will need to set some āNoWarnās which you an do in the Program.cs and any class files but you can add them to your .csproj to cover all the files.
In our sample on the Semantic Kernel repository, we avoided creating a separate copy of the plugins and we used relative paths in the code to point to the original plugin locations, but for folks building a sample themselves, you can clone the repo, or copy the plugins we have hand rolled for you to your project explorer as we have below.Ā Ā
The key to CAPs is an extension method that is available to you from the kernel object as seen on line 304 in the screenshot below. The method takes as a parameters the name(s) of your plugins you have created or have in the directory, the location of the manifest file (.json) within those directories, and copilotAgentPluginParameters which is basically tuning we have to ensure consistent and proper results, you will see that at the end of the sample in the #regions section. This tuning helps the LLM to understand the complexity of the OpenAPI file for Microsoft Graph. If you are creating your own plugins to use with CAPs, and the OpenAPI spec is complex i.e., nested properties, filters, etc. then you āmayā need to also provide clarity to the LLM to reason over them.Ā Ā
Once that is completed, the rest is your standard configuration and kernel creation as well as setting up your Agents.Ā
In our sample we have 1 agent that can call the plugins, and the other agents are there in a support capacity. Below you see the ChiefOfStaff agent is designated as the one in charge thus have Kernel Arguments for access to the Plugins.Ā
For our supporting agents you will see that they take on the same set of properties except the Kernel Arguments, notice as well the Legal Secretary agent is more involved as it is not interacting with the Microsoft Graph but more for *compliance*, *safety*, and regional language.Ā
Finally, we can issue a prompt such as you see here and get these amazing responses from our sample that not only provides important timely feedback to the user but can also act autonomously on behalf of the user as well.Ā
Pay Dirt!Ā Ā
Letās do 2 prompts here in the interest of time. One will be a benign prompt, just to demonstrate how the Agents will make decisions whether to invoke a plugin or not? You will see it does not, even though it did interact with the agents in the loop. You will also notice that the Agents get invoked and finally the Legal Secretary gave a response in both English and FrenchĀ
In the next step, lets ask a really nebulous statement, pay attention that we have*not* provided many details about the individual [Keyser], nor have we framed specificity around the ask, we just said we wanted *Emails*. Note this time the 1st agent engaged is the Email Agent, if you recall its job is to make sure the prompt is tuned for the OpenAPI spec, then we get an authentication request as this one need permissions to the Microsoft GraphĀ
And now we can see results coming back using the same Agentic Flow in both English and FrenchĀ
Next Steps & Resources ā Build with CAPs Today!Ā
Copilot Agent Plugins (CAPs) empower developers to seamlessly integrate AI-driven workflows into Microsoft 365, transforming natural language into powerful CRUD actions using Microsoft Graph and Semantic Kernel. Now, it’s your turn to explore and build!Ā
This blog post VideoĀ
š¤ Go Autonomous ā Discover how multi-agent systems collaborate in Semantic Kernel & CAPs: https://go.fabswill.com/capsagentsĀ
Others you may be interested in too to get you along your journeyĀ
š¹ Get Started Quickly ā Follow our QuickStart Guide with GitHub ReadMe & Videos: https://aka.ms/m365caps-quickstartdemoĀ
š Learn the Basics ā New to Semantic Kernel and CAPs? Start here: https://go.fabswill.com/sk101Ā
š Build End-to-End ā Develop a full Semantic Kernel solution with CAPs: https://go.fabswill.com/capse2eĀ
š¾ Grab the Code! ā Find the plugins and source code on GitHub: https://aka.ms/m365capsĀ
š Join the Conversation! Have questions or want to share your builds? Connect with us on GitHub, Twitter, or LinkedIn and show us what you’re creating with CAPs!Ā
0 comments
Be the first to start the discussion.