Connect to a Microsoft Foundry agent (preview)

Note

This article describes features used in agents or agent flows powered by the standard harness.

[This article is prerelease documentation and is subject to change.]

You can connect a Microsoft Foundry Agent to your custom agent, allowing it to call this agent to respond to a user or a trigger.

Important

This article contains Microsoft Copilot Studio preview documentation and is subject to change.

Preview features aren't meant for production use and may have restricted functionality. These features are available before an official release so that you can get early access and provide feedback.

If you're building a production-ready agent, see Microsoft Copilot Studio Overview.

Prerequisites

Before you connect a Microsoft Foundry agent to Copilot Studio, the Foundry agent must have the Activity protocol endpoint enabled. A newly created Foundry agent exposes only the Responses and A2A protocol endpoints by default. If the Activity endpoint isn't enabled, the connection to Copilot Studio fails at runtime with a 400 error. Learn more in Enable incoming A2A on a Foundry agent.

You can currently enable the Activity endpoint only programmatically, by using the REST API or the Python SDK. There's no option to enable it from the Microsoft Foundry portal. Learn more about the enablement procedure in Configure and share your agent.

After you enable the Activity endpoint, the Foundry portal's Endpoints section for the agent continues to show only Responses and A2A. This UI omission is expected and doesn't mean the change failed. The connection to Copilot Studio works after the update is applied.

Connect to a Microsoft Foundry agent

  1. Go to the Agents page for your main agent and select Add an agent.

  2. Under Connect to an external agent, select Microsoft Foundry from the available agent types.

  3. Select the desired connection from the list of available connections or create a new connection between Microsoft Foundry and your Copilot Studio agent. To create a new connection, you need to provide the Foundry project endpoint URL.

    Note

    When connecting to Microsoft Foundry agents from Copilot Studio, you can only connect to agents created in the new Microsoft Foundry portal. Connecting to an agent created in the previous portal leads to an error indicating 404 - Version not found.

  4. Once your connection is created, select Next.

  5. Enter an appropriate Name and Description for your SDK agent. The description should describe the purpose of your Microsoft Foundry agent, allowing your main agent to understand when it should be used. For more information, see writing effective metadata.

  6. Enter the Agent Id for the Microsoft Foundry agent you want to connect to.

  7. Adjust the description (if needed) to make it more contextual for the main agent. For example, make the description more specific if you have other tools or agents where the descriptions might overlap. Update the description to ensure Copilot Studio can understand when to invoke this agent.

  8. Select Add Agent.

  9. Once your agent is created, you can test your agent immediately. If you need to adjust the Agent Id later, you can do so from the details page, by selecting your agent from the Agents list.

Note

  • If your first test call to the connected Foundry agent fails with an error similar to "The connector 'Azure AI Foundry Agent Service' returned an HTTP error with code 400. Inner Error: Agent <name> endpoint does not support activity. Please update the agent endpoint to support this protocol.", the Foundry agent doesn't have the Activity protocol endpoint enabled. See Prerequisites in this article, then enable the Activity endpoint by following Configure and share your agent in the Microsoft Foundry documentation.

  • You're responsible for carefully reviewing and testing connected agents in the context of your specific use cases, and making all appropriate decisions and customizations. When you connect to agents outside of Copilot Studio, you're responsible for the use of such agents. Considerations include ensuring:

    • Data flows, data handling, and data sharing between agents are appropriate for your use case and meet relevant requirements and laws.
    • Agents meet appropriate quality, reliability, security, and trustworthiness standards.
    • Appropriate permissions, boundaries, and approvals are provisioned, if prudent for your use case.
    • Proper observability, identity and traceability, and human oversight functions are in place.