diff --git a/src/frontend/src/content/docs/integrations/cloud/azure/azure-ai-foundry/azure-ai-foundry-host.mdx b/src/frontend/src/content/docs/integrations/cloud/azure/azure-ai-foundry/azure-ai-foundry-host.mdx index eb0d27c5b..33e09fb6c 100644 --- a/src/frontend/src/content/docs/integrations/cloud/azure/azure-ai-foundry/azure-ai-foundry-host.mdx +++ b/src/frontend/src/content/docs/integrations/cloud/azure/azure-ai-foundry/azure-ai-foundry-host.mdx @@ -464,6 +464,36 @@ In publish mode, Aspire creates an `AzureHostedAgentResource` and publishes the For C# AppHosts, the parameterless `AsHostedAgent()` overload reuses an existing Foundry project from the app model or creates one automatically. TypeScript AppHosts pass the project resource explicitly. +### Select a hosted agent protocol + +`AsHostedAgent` defaults to the Responses protocol version `2.0.0`. If your hosted agent implements a different protocol or protocol version, use `AsHostedAgentWithProtocol` or pass a protocol and version explicitly. For example, some Microsoft Agent Framework (MAF) agents use the Invocations protocol: + + + + +```csharp +builder.AddPythonApp("agent-python", "../agent", "main:app") + .WithReference(project) + .WithReference(chat) + .AsHostedAgent(project, HostedAgentProtocol.Invocations, "1.0.0"); +``` + + + + +```typescript +await builder + .addPythonApp('agent-python', '../agent', 'main:app') + .withReference(project) + .withReference(chat) + .asHostedAgentWithProtocol(project, HostedAgentProtocol.Invocations, '1.0.0'); +``` + + + + +The defaulted `asHostedAgent` entry point and the explicit `asHostedAgentWithProtocol` entry point are both exported to polyglot AppHosts, so existing AppHosts that call `asHostedAgent(project, options?)` continue to work unchanged with the Responses `2.0.0` default. Reach for `asHostedAgentWithProtocol` only when you need a protocol or version other than the default. + ### Add and publish a prompt agent For prompt-only scenarios, use `AddPromptAgent` on a Foundry project: