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/7] 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/7] 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/7] 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/7] 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: From d6802557a9c9252d95a86b75729157086031d54b Mon Sep 17 00:00:00 2001 From: David Pine <7679720+IEvangelist@users.noreply.github.com> Date: Mon, 17 Aug 2026 10:54:08 -0500 Subject: [PATCH 5/7] Clarify hosted agent protocol APIs Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../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 33e09fb6c..db94a7994 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` 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: +`AsHostedAgent` defaults to the Responses protocol version `2.0.0`. If your hosted agent implements a different protocol or protocol version, use the C# `AsHostedAgent(project, protocol, version)` overload or the polyglot/TypeScript `asHostedAgentWithProtocol` export. For example, some Microsoft Agent Framework (MAF) agents use the Invocations protocol: From 14b753c89092e641353b8de0c7b18a2e82486048 Mon Sep 17 00:00:00 2001 From: David Pine <7679720+IEvangelist@users.noreply.github.com> Date: Mon, 17 Aug 2026 11:19:47 -0500 Subject: [PATCH 6/7] Correct hosted agent protocol guidance Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../azure-ai-foundry-host.mdx | 21 ++----------------- 1 file changed, 2 insertions(+), 19 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 db94a7994..1b21352b0 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,10 +466,7 @@ For C# AppHosts, the parameterless `AsHostedAgent()` overload reuses an existing ### 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 the C# `AsHostedAgent(project, protocol, version)` overload or the polyglot/TypeScript `asHostedAgentWithProtocol` export. For example, some Microsoft Agent Framework (MAF) agents use the Invocations protocol: - - - +`AsHostedAgent` defaults to the Responses protocol version `2.0.0`. In C#, if your hosted agent implements a different protocol or protocol version, use the `AsHostedAgent(project, protocol, version)` overload. For example, some Microsoft Agent Framework (MAF) agents use the Invocations protocol: ```csharp builder.AddPythonApp("agent-python", "../agent", "main:app") @@ -478,21 +475,7 @@ builder.AddPythonApp("agent-python", "../agent", "main:app") .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. +Polyglot AppHosts expose `asHostedAgent(project, options?)`; existing callers continue to use the Responses protocol version `2.0.0` by default. ### Add and publish a prompt agent From 0adc054806b2af436de37075e209ac2ac0f22667 Mon Sep 17 00:00:00 2001 From: David Pine <7679720+IEvangelist@users.noreply.github.com> Date: Mon, 17 Aug 2026 11:32:02 -0500 Subject: [PATCH 7/7] Restore CI-validated hosted agent protocol docs The executable CI validation for microsoft/aspire#18980 compiled the TypeScript AppHost with HostedAgentProtocol and asHostedAgentWithProtocol, proving the generated runtime surface supports both APIs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../azure-ai-foundry-host.mdx | 21 +++++++++++++++++-- 1 file changed, 19 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 1b21352b0..db94a7994 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,10 @@ For C# AppHosts, the parameterless `AsHostedAgent()` overload reuses an existing ### Select a hosted agent protocol -`AsHostedAgent` defaults to the Responses protocol version `2.0.0`. In C#, if your hosted agent implements a different protocol or protocol version, use the `AsHostedAgent(project, protocol, version)` overload. For example, some Microsoft Agent Framework (MAF) agents use the Invocations protocol: +`AsHostedAgent` defaults to the Responses protocol version `2.0.0`. If your hosted agent implements a different protocol or protocol version, use the C# `AsHostedAgent(project, protocol, version)` overload or the polyglot/TypeScript `asHostedAgentWithProtocol` export. For example, some Microsoft Agent Framework (MAF) agents use the Invocations protocol: + + + ```csharp builder.AddPythonApp("agent-python", "../agent", "main:app") @@ -475,7 +478,21 @@ builder.AddPythonApp("agent-python", "../agent", "main:app") .AsHostedAgent(project, HostedAgentProtocol.Invocations, "1.0.0"); ``` -Polyglot AppHosts expose `asHostedAgent(project, options?)`; existing callers continue to use the Responses protocol version `2.0.0` by default. + + + +```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