From 26a24503b627f31bd8227a4394b8317f211743d6 Mon Sep 17 00:00:00 2001 From: "aspire-repo-bot[bot]" <268009190+aspire-repo-bot[bot]@users.noreply.github.com> Date: Wed, 12 Aug 2026 02:37:35 +0000 Subject: [PATCH 1/4] docs: document asHostedAgentWithProtocol for polyglot hosted agents --- .../azure-ai-foundry-host.mdx | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) 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..07286b528 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` (C#) and `asHostedAgent` (polyglot) default to the Responses protocol version `2.0.0`. If your hosted agent implements a different protocol or protocol version — for example, the Invocations protocol used by some Microsoft Agent Framework (MAF) agents — use `asHostedAgentWithProtocol` in polyglot app hosts or pass a protocol and version explicitly in C#: + + + + +```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 app hosts, 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: From 834ff1ff21a6b6b7a885a8ce7d615a6c4e3b3473 Mon Sep 17 00:00:00 2001 From: David Pine <7679720+IEvangelist@users.noreply.github.com> Date: Tue, 11 Aug 2026 22:23:04 -0500 Subject: [PATCH 2/4] Fix AppHost terminology in hosted agent docs Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 32c349b4-907d-42e9-aad8-2f0edc267779 --- .../cloud/azure/azure-ai-foundry/azure-ai-foundry-host.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 07286b528..090499590 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 @@ -466,7 +466,7 @@ For C# AppHosts, the parameterless `AsHostedAgent()` overload reuses an existing ### Select a hosted agent protocol -`AsHostedAgent` (C#) and `asHostedAgent` (polyglot) default to the Responses protocol version `2.0.0`. If your hosted agent implements a different protocol or protocol version — for example, the Invocations protocol used by some Microsoft Agent Framework (MAF) agents — use `asHostedAgentWithProtocol` in polyglot app hosts or pass a protocol and version explicitly in C#: +`AsHostedAgent` (C#) and `asHostedAgent` (polyglot) default to the Responses protocol version `2.0.0`. If your hosted agent implements a different protocol or protocol version — for example, the Invocations protocol used by some Microsoft Agent Framework (MAF) agents — use `asHostedAgentWithProtocol` in polyglot AppHosts or pass a protocol and version explicitly in C#: @@ -492,7 +492,7 @@ await builder -The defaulted `asHostedAgent` entry point and the explicit `asHostedAgentWithProtocol` entry point are both exported to polyglot app hosts, 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. +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 From a05775c571ed33341b796c6b343a383a864ce618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Ros?= Date: Wed, 12 Aug 2026 10:16:13 -0700 Subject: [PATCH 3/4] Apply suggestion from @sebastienros --- .../cloud/azure/azure-ai-foundry/azure-ai-foundry-host.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 090499590..b9614e74f 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 @@ -472,7 +472,7 @@ For C# AppHosts, the parameterless `AsHostedAgent()` overload reuses an existing ```csharp -builder.AddPythonApp("agent-python", "..\\agent", "main:app") +builder.AddPythonApp("agent-python", "../agent", "main:app") .WithReference(project) .WithReference(chat) .AsHostedAgent(project, HostedAgentProtocol.Invocations, "1.0.0"); From 5316c7f573d11792bbf3c54f01f49d550a594d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Ros?= Date: Fri, 14 Aug 2026 10:12:52 -0700 Subject: [PATCH 4/4] Apply suggestion from @alistairmatthews Co-authored-by: Alistair Matthews --- .../cloud/azure/azure-ai-foundry/azure-ai-foundry-host.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 b9614e74f..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 @@ -466,7 +466,7 @@ For C# AppHosts, the parameterless `AsHostedAgent()` overload reuses an existing ### Select a hosted agent protocol -`AsHostedAgent` (C#) and `asHostedAgent` (polyglot) default to the Responses protocol version `2.0.0`. If your hosted agent implements a different protocol or protocol version — for example, the Invocations protocol used by some Microsoft Agent Framework (MAF) agents — use `asHostedAgentWithProtocol` in polyglot AppHosts or pass a protocol and version explicitly in C#: +`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: