Partilhar via


Copilot Studio

A integração do Copilot Studio permite-lhe usar agentes do Copilot Studio dentro do Agent Framework.

O exemplo seguinte mostra como criar um agente usando o Copilot Studio:

using System;
using Azure.Identity;
using Microsoft.Agents.AI;
using Microsoft.Agents.AI.CopilotStudio;

// Create a Copilot Studio agent using the IChatClient pattern
// Requires: dotnet add package Microsoft.Agents.AI.CopilotStudio --prerelease
var copilotClient = new CopilotStudioChatClient(
    environmentId: "<your-environment-id>",
    agentIdentifier: "<your-agent-id>",
    credential: new AzureCliCredential());

AIAgent agent = copilotClient.AsAIAgent(
    instructions: "You are a helpful enterprise assistant.");

Console.WriteLine(await agent.RunAsync("What are our company policies on remote work?"));

Observação

O suporte a Python para agentes do Copilot Studio está a chegar em breve.

Próximos passos