Building Copilot agents with Code
Education
Introduction
Recently, during the Co-Pilot Wave 2 presentation led by Satya Nadella and Jared Spataro, an array of exciting features for end-users was revealed. A standout introduction was the concept of Co-Pilot Agents—specialized chat agents designed for Microsoft 365. While end-users can create agents using Co-Pilot, and low-code developers can build them via Co-Pilot Studio, traditional developers also have a code-first approach to construct and expand these agents using familiar tools.
In this article, we’ll delve into the primary concepts surrounding Co-Pilot Agents from a code-first perspective and familiarize you with the new terminology. If you’ve been keeping up with Microsoft’s updates, particularly from Microsoft Build or community calls, you may have an understanding of the developments, but it’s essential to note that the naming has evolved. For instance, Co-Pilot extensions are now termed agents, and custom engine Co-Pilots have similarly been renamed.
Co-Pilot Agents Overview
The chat experience for Co-Pilot agents exists across several applications including Microsoft Teams, Outlook, Excel, and PowerPoint, through a chat interface known as the "Bis Chat User Interface." Notably, this interface allows for enhanced interactions due to features like response streaming, feedback, and reference marks.
Users can build agents internally through the Bis Chat User Interface. These are referred to as declarative agents, characterized by their lack of imperative code. Instead, these agents utilize information that Microsoft 365 Co-Pilot can implement by allowing users to enter directives and select specific knowledge bases, such as SharePoint sites or Graph connectors.
Low-code developers utilize Co-Pilot Studio to create agents, making use of additional functionalities. Meanwhile, traditional developers can build agents in coding environments like Visual Studio or Visual Studio Code. These coded agents allow for scalability and can be distributed through enterprise app catalogs or the Microsoft 365 App Store.
Regardless of the development pathway chosen, all agents appear uniformly within Co-Pilot. The "immersive experience" engages users in a branded chat directly with the agent. A notable new feature is the “in-context experience,” where a user can mention an agent in Bis Chat—even in group settings.
Extending Microsoft 365 Co-Pilot
Microsoft 365 Co-Pilot comes preloaded with orchestration language models and is grounded in various Microsoft 365 content. Developers can enhance these capabilities by writing declarative agents that provide specific instructions in natural language and dictate what information should be included in chat interactions. Furthermore, custom plugins can be created to call external REST services, integrating them with applications.
Developers aiming to create their own chatbots can choose the build path, utilizing any large language model orchestration and tools of their preference, while still using the Bis Chat User Interface for user interactions. The Teams AI Library SDK offers a way for professional developers to fully engage with users through Bis Chat, adding in features like reference links and feedback.
Additional Resources
To aid developers in delving deeper, videos focusing on custom engine agents and declarative agents are available, featuring extensive demos and code reviews. Moreover, a virtual workshop named Co-Pilot Developer Camp will run hands-on labs for participants to develop both types of agents. Paths A (for extend) and B (for build) will guide you through creating these agents, exposing you to API plugins and Azure AI Studio.
For more detailed insights, please explore the resources listed at aka.ms/copilotdevcamp.
Keywords
- Co-Pilot Agents
- Declarative Agents
- Microsoft 365
- Bis Chat User Interface
- Custom Engine Agents
- Teams AI Library
- REST Services
- Azure AI Studio
FAQ
1. What are Co-Pilot Agents?
Co-Pilot Agents are specialized chat agents designed for Microsoft 365 applications that provide tailored AI chat experiences within the Bis Chat User Interface.
2. How can users create Co-Pilot Agents?
Users can create agents directly in the Bis Chat User Interface as declarative agents or utilize Co-Pilot Studio for low-code development.
3. What is the difference between declarative agents and custom engine agents?
Declarative agents are built using natural language instructions without imperative code, while custom engine agents require coding and can be constructed in environments like Visual Studio.
4. What resources are available for developers to learn more about building Co-Pilot Agents?
Developers can access educational videos focused on agent creation and participate in workshops like Co-Pilot Developer Camp for hands-on labs.
5. Where can I find more materials related to developing Co-Pilot Agents?
Additional resources are available at aka.ms/copilotdevcamp.