How to Call a Copilot Studio Agent from Code to Orchestrate Multi-Agent Systems

Conversational AI is advancing rapidly, and more and more companies are seeking solutions that allow them to orchestrate different agents based on user intent.

One of the most powerful new developments in this area is the ability to integrate agents created in Microsoft Copilot Studio directly into web or native applications using the Microsoft 365 Agents SDK.

In this article, we explain how to call a Copilot Studio agent from code and the benefits it brings to organizations looking to build an intelligent ecosystem of interoperable agents.

Why Integrate Copilot Studio Agents?

Microsoft Copilot Studio is a SaaS platform that allows business users and makers to create conversational agents easily. These agents can then be shared with development teams, who can integrate them into their own custom applications.

Thanks to the Agents SDK, developers can work not only with agents created in Copilot Studio but also with other agents built in Azure AI Foundry or other environments. This allows companies to dynamically decide which agent best responds to a request based on detected intent.

In summary:

  • One or more agents can be referenced from an application built with the SDK.
  • Copilot Studio agents can be invoked directly from web or native applications.

This opens the door to a flexible, orchestrated agent architecture, regardless of where the agents were created.

How to Call a Copilot Studio Agent from Code

To get started, you need to use the Copilot Studio client library, currently available for .NET, JavaScript, and Python.

1. Prepare the Agent

Create an agent in Copilot Studio and publish it. Under Settings → Advanced → Metadata, you will use the Schema name and Environment Id.

2. Register the Application in Entra ID (Azure AD)

Register your application in Azure Entra ID. You will need the Application (client) ID and Directory (tenant) ID.

3. API Permissions

Grant the necessary permissions for the Power Platform API:

    • In your application: API permissions → Add a permission → APIs my organization uses
    • Search for Power Platform API. Under Delegated permissions, select CopilotStudio → CopilotStudio.Copilots.Invoke.
Copilot Studio agents

In short, the SDK allows you to establish a connection with a Copilot Studio agent and send messages from an application. This lets you quickly test conversation flows and integrate the agent with others.

Copilot Studio agents

Benefits of Orchestrating Agents with Copilot Studio

Integrating Copilot Studio agents into custom applications not only facilitates user interaction but also enables:

  • Centralized agent management: All agents, regardless of where they were created, can work together.
  • Dynamic agent selection: The system decides which agent responds best based on user intent.
  • Agile scaling: Business teams create agents, and development teams integrate them within hours.
  • Maximized AI ROI: Both low-code business tools and advanced development integrations are leveraged.

Conclusion

The ability to call a Copilot Studio agent from code opens a new horizon for companies seeking richer, more flexible, and orchestrated conversational experiences.

Thanks to the Microsoft 365 Agents SDK, agents from different sources can be unified under a single system, optimizing request resolution and enhancing the user experience.

At Bravent, we support organizations in adopting Copilot Studio and integrating it with other agents, helping them create intelligent, scalable conversational solutions.

María Soto Castro

María Soto Castro

Head of Innovation - Bravent

👉 Want to implement an orchestrated agent system in your company?

Contact us at info@bravent.net, and we’ll help you take the next step toward conversational AI.

    Privacy

    This website uses cookies so that we can offer you the best possible user experience. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website or helping our team understand which sections of the website you find most interesting and useful.

    Strictly Necessary Cookies

    Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

    Third party cookies

    This website uses analytical cookies to collect anonymous information such as the number of visitors to the site, or the most popular pages.

    Leaving this cookie active allows us to improve our website.