From 53026d56e7db8ed56c976fef8b971fe91bbbd7a9 Mon Sep 17 00:00:00 2001 From: Ben Thomas <25218250+alliscode@users.noreply.github.com> Date: Fri, 5 Jun 2026 11:55:59 -0700 Subject: [PATCH 1/4] Add 'Deploying to Foundry (azd spec)' sections to all Foundry hosted agent samples This commit adds comprehensive deployment documentation to all 13 .NET Foundry hosted agent samples that were missing it. Each sample now includes: - Instructions to initialize an azd project from the sample's agent.manifest.yaml - Steps to deploy using 'azd deploy' - Example environment variable overrides for customization - Link to the official Foundry deployment guide Samples updated: - Hosted-LocalTools - Hosted-Files - Hosted-FoundryAgent - Hosted-McpTools - Hosted-Observability - Hosted-MemoryAgent - Hosted-TextRag - Hosted-ToolboxMcpSkills - Hosted-AzureSearchRag - Hosted-AgentSkills - Hosted-Workflow-Handoff - Hosted-Workflow-Simple - Hosted-Invocations-EchoAgent Each section includes the correct agent name from the sample's manifest and points to the correct GitHub URL for initializing the azd project. Fixes: https://github.com/microsoft/agent-framework/issues/6308 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Hosted-Invocations-EchoAgent/README.md | 28 +++++++++++++++++++ .../responses/Hosted-AgentSkills/README.md | 26 +++++++++++++++++ .../responses/Hosted-AzureSearchRag/README.md | 28 +++++++++++++++++++ .../Hosted-ChatClientAgent/README.md | 26 +++++++++++++++++ .../responses/Hosted-Files/README.md | 28 +++++++++++++++++++ .../responses/Hosted-FoundryAgent/README.md | 26 +++++++++++++++++ .../responses/Hosted-LocalTools/README.md | 28 +++++++++++++++++++ .../responses/Hosted-McpTools/README.md | 28 +++++++++++++++++++ .../responses/Hosted-MemoryAgent/README.md | 28 +++++++++++++++++++ .../responses/Hosted-Observability/README.md | 28 +++++++++++++++++++ .../responses/Hosted-TextRag/README.md | 28 +++++++++++++++++++ .../Hosted-ToolboxMcpSkills/README.md | 28 +++++++++++++++++++ .../Hosted-Workflow-Handoff/README.md | 28 +++++++++++++++++++ .../Hosted-Workflow-Simple/README.md | 28 +++++++++++++++++++ 14 files changed, 386 insertions(+) diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/invocations/Hosted-Invocations-EchoAgent/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/invocations/Hosted-Invocations-EchoAgent/README.md index 5fcfddab227..404f88d0743 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/invocations/Hosted-Invocations-EchoAgent/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/invocations/Hosted-Invocations-EchoAgent/README.md @@ -71,6 +71,34 @@ curl -X POST http://localhost:8088/invocations \ -d "Hello from Docker!" ``` +## Deploying to Foundry (azd spec) + +This sample includes an `azd` manifest (`agent.manifest.yaml`) and hosted agent spec (`agent.yaml`) for deployment to Foundry. + +Initialize an `azd` project from this sample's manifest: + +```bash +mkdir hosted-invocations-echo-agent && cd hosted-invocations-echo-agent +azd ai agent init -m https://github.com/microsoft/agent-framework/blob/main/dotnet/samples/04-hosting/FoundryHostedAgents/invocations/Hosted-Invocations-EchoAgent/agent.manifest.yaml +``` + +Then deploy: + +```bash +azd deploy +``` + +If you need to override defaults, set deployment-time environment variables in the `azd` environment before deploying: + +```bash +azd env set AGENT_NAME hosted-invocations-echo-agent +azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-4o +``` + +For end-to-end hosted agent deployment guidance, see the [official deployment guide](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/deploy-hosted-agent). + +--- + ## NuGet package users If you are consuming the Agent Framework as a NuGet package (not building from source), use the standard `Dockerfile` instead of `Dockerfile.contributor`. See the commented section in `Hosted-Invocations-EchoAgent.csproj` for the `PackageReference` alternative. diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AgentSkills/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AgentSkills/README.md index 28917a19e01..33a872ce649 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AgentSkills/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AgentSkills/README.md @@ -107,3 +107,29 @@ azd env set SKILL_NAMES "support-style,escalation-policy" The deployed agent's Managed Identity needs **Azure AI User** on the Foundry project to download skills at startup. > The `skills/` source folder is **not** deployed to Foundry — only the downloaded skills are used at runtime. The provisioning step must have been run against the same Foundry project before the agent can download the skills. + +## Deploying to Foundry (azd spec) + +This sample includes an `azd` manifest (`agent.manifest.yaml`) and hosted agent spec (`agent.yaml`) for deployment to Foundry. + +Initialize an `azd` project from this sample's manifest: + +```bash +mkdir hosted-agent-skills && cd hosted-agent-skills +azd ai agent init -m https://github.com/microsoft/agent-framework/blob/main/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AgentSkills/agent.manifest.yaml +``` + +Then deploy: + +```bash +azd deploy +``` + +If you need to override defaults, set deployment-time environment variables in the `azd` environment before deploying: + +```bash +azd env set AGENT_NAME hosted-agent-skills +azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-4o +``` + +For end-to-end hosted agent deployment guidance, see the [official deployment guide](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/deploy-hosted-agent). diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AzureSearchRag/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AzureSearchRag/README.md index ede4db10103..f82ee30e5a3 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AzureSearchRag/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AzureSearchRag/README.md @@ -174,6 +174,34 @@ The model receives the top three search results as additional context and cites Replace the seed documents (or point the sample at an existing index with your own content) to ground the agent in your own knowledge base. +## Deploying to Foundry (azd spec) + +This sample includes an `azd` manifest (`agent.manifest.yaml`) and hosted agent spec (`agent.yaml`) for deployment to Foundry. + +Initialize an `azd` project from this sample's manifest: + +```bash +mkdir hosted-azure-search-rag && cd hosted-azure-search-rag +azd ai agent init -m https://github.com/microsoft/agent-framework/blob/main/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AzureSearchRag/agent.manifest.yaml +``` + +Then deploy: + +```bash +azd deploy +``` + +If you need to override defaults, set deployment-time environment variables in the `azd` environment before deploying: + +```bash +azd env set AGENT_NAME hosted-azure-search-rag +azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-4o +``` + +For end-to-end hosted agent deployment guidance, see the [official deployment guide](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/deploy-hosted-agent). + +--- + ## NuGet package users If you are consuming the Agent Framework as a NuGet package (not building from source), use the standard `Dockerfile` instead of `Dockerfile.contributor`. See the commented section in `HostedAzureSearchRag.csproj` for the `PackageReference` alternative. diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ChatClientAgent/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ChatClientAgent/README.md index ace88925728..4e11ed80231 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ChatClientAgent/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ChatClientAgent/README.md @@ -104,6 +104,32 @@ curl -X POST http://localhost:8088/responses \ -d '{"input": "Hello!", "model": "hosted-chat-client-agent"}' ``` +## Deploying to Foundry (azd spec) + +This sample includes an `azd` manifest (`agent.manifest.yaml`) and hosted agent spec (`agent.yaml`) for deployment to Foundry. + +Initialize an `azd` project from this sample's manifest: + +```bash +mkdir hosted-chat-client-agent && cd hosted-chat-client-agent +azd ai agent init -m https://github.com/microsoft/agent-framework/blob/main/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ChatClientAgent/agent.manifest.yaml +``` + +Then deploy: + +```bash +azd deploy +``` + +If you need to override defaults, set deployment-time environment variables in the `azd` environment before deploying: + +```bash +azd env set AGENT_NAME hosted-chat-client-agent +azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-4o +``` + +For end-to-end hosted agent deployment guidance, see the [official deployment guide](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/deploy-hosted-agent). + ## NuGet package users If you are consuming the Agent Framework as a NuGet package (not building from source), use the standard `Dockerfile` instead of `Dockerfile.contributor` — it performs a full `dotnet restore` and `dotnet publish` inside the container. See the commented section in `HostedChatClientAgent.csproj` for the `PackageReference` alternative. diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Files/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Files/README.md index 729aca5c5f0..80b68abe2ef 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Files/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Files/README.md @@ -112,6 +112,34 @@ docker run --rm -p 8088:8088 \ The bundled `resources/` folder is part of the published output and ships inside the image. +## Deploying to Foundry (azd spec) + +This sample includes an `azd` manifest (`agent.manifest.yaml`) and hosted agent spec (`agent.yaml`) for deployment to Foundry. + +Initialize an `azd` project from this sample's manifest: + +```bash +mkdir hosted-files && cd hosted-files +azd ai agent init -m https://github.com/microsoft/agent-framework/blob/main/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Files/agent.manifest.yaml +``` + +Then deploy: + +```bash +azd deploy +``` + +If you need to override defaults, set deployment-time environment variables in the `azd` environment before deploying: + +```bash +azd env set AGENT_NAME hosted-files +azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-4o +``` + +For end-to-end hosted agent deployment guidance, see the [official deployment guide](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/deploy-hosted-agent). + +--- + ## NuGet package users If consuming the Agent Framework as a NuGet package, use the standard `Dockerfile` instead of `Dockerfile.contributor` and switch the `ProjectReference` entries in `HostedFiles.csproj` to `PackageReference` (commented section in the csproj). diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-FoundryAgent/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-FoundryAgent/README.md index 8265a806322..3aa80756eee 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-FoundryAgent/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-FoundryAgent/README.md @@ -107,6 +107,32 @@ curl -X POST http://localhost:8088/responses \ -d '{"input": "Hello!", "model": ""}' ``` +## Deploying to Foundry (azd spec) + +This sample includes an `azd` manifest (`agent.manifest.yaml`) and hosted agent spec (`agent.yaml`) for deployment to Foundry. + +Initialize an `azd` project from this sample's manifest: + +```bash +mkdir hosted-foundry-agent && cd hosted-foundry-agent +azd ai agent init -m https://github.com/microsoft/agent-framework/blob/main/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-FoundryAgent/agent.manifest.yaml +``` + +Then deploy: + +```bash +azd deploy +``` + +If you need to override defaults, set deployment-time environment variables in the `azd` environment before deploying: + +```bash +azd env set AGENT_NAME hosted-foundry-agent +azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-4o +``` + +For end-to-end hosted agent deployment guidance, see the [official deployment guide](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/deploy-hosted-agent). + ## NuGet package users If you are consuming the Agent Framework as a NuGet package (not building from source), use the standard `Dockerfile` instead of `Dockerfile.contributor` — it performs a full `dotnet restore` and `dotnet publish` inside the container. See the commented section in `HostedFoundryAgent.csproj` for the `PackageReference` alternative. diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-LocalTools/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-LocalTools/README.md index 8016ff7ae98..8ad876e21e7 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-LocalTools/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-LocalTools/README.md @@ -108,6 +108,34 @@ The agent has a single tool `GetAvailableHotels` defined as a C# method with `[D The tool searches a mock database of 6 Seattle hotels and returns formatted results with name, location, rating, and pricing. +## Deploying to Foundry (azd spec) + +This sample includes an `azd` manifest (`agent.manifest.yaml`) and hosted agent spec (`agent.yaml`) for deployment to Foundry. + +Initialize an `azd` project from this sample's manifest: + +```bash +mkdir hosted-local-tools && cd hosted-local-tools +azd ai agent init -m https://github.com/microsoft/agent-framework/blob/main/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-LocalTools/agent.manifest.yaml +``` + +Then deploy: + +```bash +azd deploy +``` + +If you need to override defaults, set deployment-time environment variables in the `azd` environment before deploying: + +```bash +azd env set AGENT_NAME hosted-local-tools +azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-4o +``` + +For end-to-end hosted agent deployment guidance, see the [official deployment guide](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/deploy-hosted-agent). + +--- + ## NuGet package users If you are consuming the Agent Framework as a NuGet package (not building from source), use the standard `Dockerfile` instead of `Dockerfile.contributor`. See the commented section in `HostedLocalTools.csproj` for the `PackageReference` alternative. diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-McpTools/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-McpTools/README.md index 3773d9760dd..f0f0be9e748 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-McpTools/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-McpTools/README.md @@ -78,6 +78,34 @@ docker run --rm -p 8088:8088 \ hosted-mcp-tools ``` +## Deploying to Foundry (azd spec) + +This sample includes an `azd` manifest (`agent.manifest.yaml`) and hosted agent spec (`agent.yaml`) for deployment to Foundry. + +Initialize an `azd` project from this sample's manifest: + +```bash +mkdir mcp-tools && cd mcp-tools +azd ai agent init -m https://github.com/microsoft/agent-framework/blob/main/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-McpTools/agent.manifest.yaml +``` + +Then deploy: + +```bash +azd deploy +``` + +If you need to override defaults, set deployment-time environment variables in the `azd` environment before deploying: + +```bash +azd env set AGENT_NAME mcp-tools +azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-4o +``` + +For end-to-end hosted agent deployment guidance, see the [official deployment guide](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/deploy-hosted-agent). + +--- + ## NuGet package users Use the standard `Dockerfile` instead of `Dockerfile.contributor`. See the commented section in `HostedMcpTools.csproj` for the `PackageReference` alternative. diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-MemoryAgent/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-MemoryAgent/README.md index d9b3a118259..d8820096a07 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-MemoryAgent/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-MemoryAgent/README.md @@ -139,6 +139,34 @@ The script publishes the project, builds the image, runs the container with two `HOSTED_USER_ISOLATION_KEY` values, drives a multi-turn conversation per user, asserts that each user only sees their own memories, and exits non-zero on failure. +## Deploying to Foundry (azd spec) + +This sample includes an `azd` manifest (`agent.manifest.yaml`) and hosted agent spec (`agent.yaml`) for deployment to Foundry. + +Initialize an `azd` project from this sample's manifest: + +```bash +mkdir hosted-memory-agent && cd hosted-memory-agent +azd ai agent init -m https://github.com/microsoft/agent-framework/blob/main/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-MemoryAgent/agent.manifest.yaml +``` + +Then deploy: + +```bash +azd deploy +``` + +If you need to override defaults, set deployment-time environment variables in the `azd` environment before deploying: + +```bash +azd env set AGENT_NAME hosted-memory-agent +azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-4o +``` + +For end-to-end hosted agent deployment guidance, see the [official deployment guide](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/deploy-hosted-agent). + +--- + ## NuGet package users If you are consuming the Agent Framework as a NuGet package (not building from source), use the diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Observability/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Observability/README.md index 889eacca82b..e51959c6f55 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Observability/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Observability/README.md @@ -104,6 +104,34 @@ docker run --rm -p 8088:8088 \ Once deployed, telemetry flows to the Application Insights instance attached to your Foundry project. In the Foundry UI, the **Traces** tab next to **Playground** lists conversations and lets you drill into the span tree for any request. +## Deploying to Foundry (azd spec) + +This sample includes an `azd` manifest (`agent.manifest.yaml`) and hosted agent spec (`agent.yaml`) for deployment to Foundry. + +Initialize an `azd` project from this sample's manifest: + +```bash +mkdir hosted-observability && cd hosted-observability +azd ai agent init -m https://github.com/microsoft/agent-framework/blob/main/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Observability/agent.manifest.yaml +``` + +Then deploy: + +```bash +azd deploy +``` + +If you need to override defaults, set deployment-time environment variables in the `azd` environment before deploying: + +```bash +azd env set AGENT_NAME hosted-observability +azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-4o +``` + +For end-to-end hosted agent deployment guidance, see the [official deployment guide](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/deploy-hosted-agent). + +--- + ## NuGet package users If consuming the Agent Framework as a NuGet package, use the standard `Dockerfile` instead of `Dockerfile.contributor`. See the commented section in `HostedObservability.csproj` for the `PackageReference` alternative. diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-TextRag/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-TextRag/README.md index 5e4e5140c0f..c45b3f91012 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-TextRag/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-TextRag/README.md @@ -111,6 +111,34 @@ The `TextSearchProvider` runs a mock search **before each model invocation**: The model receives the search results as additional context and cites the source in its response. In production, replace `MockSearchAsync` with a call to Azure AI Search or your preferred search provider. +## Deploying to Foundry (azd spec) + +This sample includes an `azd` manifest (`agent.manifest.yaml`) and hosted agent spec (`agent.yaml`) for deployment to Foundry. + +Initialize an `azd` project from this sample's manifest: + +```bash +mkdir hosted-text-rag && cd hosted-text-rag +azd ai agent init -m https://github.com/microsoft/agent-framework/blob/main/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-TextRag/agent.manifest.yaml +``` + +Then deploy: + +```bash +azd deploy +``` + +If you need to override defaults, set deployment-time environment variables in the `azd` environment before deploying: + +```bash +azd env set AGENT_NAME hosted-text-rag +azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-4o +``` + +For end-to-end hosted agent deployment guidance, see the [official deployment guide](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/deploy-hosted-agent). + +--- + ## NuGet package users If you are consuming the Agent Framework as a NuGet package (not building from source), use the standard `Dockerfile` instead of `Dockerfile.contributor`. See the commented section in `HostedTextRag.csproj` for the `PackageReference` alternative. diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ToolboxMcpSkills/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ToolboxMcpSkills/README.md index 0c6b5ba60ed..e630881ecee 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ToolboxMcpSkills/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ToolboxMcpSkills/README.md @@ -98,6 +98,34 @@ Using the Azure Developer CLI: azd ai agent invoke --local "What skills do you have available?" ``` +## Deploying to Foundry (azd spec) + +This sample includes an `azd` manifest (`agent.manifest.yaml`) and hosted agent spec (`agent.yaml`) for deployment to Foundry. + +Initialize an `azd` project from this sample's manifest: + +```bash +mkdir hosted-toolbox-mcp-skills && cd hosted-toolbox-mcp-skills +azd ai agent init -m https://github.com/microsoft/agent-framework/blob/main/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ToolboxMcpSkills/agent.manifest.yaml +``` + +Then deploy: + +```bash +azd deploy +``` + +If you need to override defaults, set deployment-time environment variables in the `azd` environment before deploying: + +```bash +azd env set AGENT_NAME hosted-toolbox-mcp-skills +azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-4o +``` + +For end-to-end hosted agent deployment guidance, see the [official deployment guide](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/deploy-hosted-agent). + +--- + ## NuGet package users If you are consuming the Agent Framework as a NuGet package (not building from source), use the standard `Dockerfile` instead of `Dockerfile.contributor`. See the commented section in `HostedToolboxMcpSkills.csproj` for the `PackageReference` alternative. diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Handoff/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Handoff/README.md index 643af745512..341564ad738 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Handoff/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Handoff/README.md @@ -121,6 +121,34 @@ User message The triage agent receives every message and hands off to the appropriate specialist. Specialists route back to the triage agent after responding, allowing for multi-turn conversations. +## Deploying to Foundry (azd spec) + +This sample includes an `azd` manifest (`agent.manifest.yaml`) and hosted agent spec (`agent.yaml`) for deployment to Foundry. + +Initialize an `azd` project from this sample's manifest: + +```bash +mkdir triage-workflow && cd triage-workflow +azd ai agent init -m https://github.com/microsoft/agent-framework/blob/main/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Handoff/agent.manifest.yaml +``` + +Then deploy: + +```bash +azd deploy +``` + +If you need to override defaults, set deployment-time environment variables in the `azd` environment before deploying: + +```bash +azd env set AGENT_NAME triage-workflow +azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-4o +``` + +For end-to-end hosted agent deployment guidance, see the [official deployment guide](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/deploy-hosted-agent). + +--- + ## NuGet package users Use the standard `Dockerfile` instead of `Dockerfile.contributor`. See the commented section in `HostedWorkflowHandoff.csproj` for the `PackageReference` alternative. diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Simple/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Simple/README.md index d91d27445d6..27e5307a8ed 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Simple/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Simple/README.md @@ -104,6 +104,34 @@ Input text Each agent in the chain receives the output of the previous agent. The final result demonstrates how meaning is preserved (or subtly shifted) through multiple translation hops. +## Deploying to Foundry (azd spec) + +This sample includes an `azd` manifest (`agent.manifest.yaml`) and hosted agent spec (`agent.yaml`) for deployment to Foundry. + +Initialize an `azd` project from this sample's manifest: + +```bash +mkdir hosted-workflows && cd hosted-workflows +azd ai agent init -m https://github.com/microsoft/agent-framework/blob/main/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Simple/agent.manifest.yaml +``` + +Then deploy: + +```bash +azd deploy +``` + +If you need to override defaults, set deployment-time environment variables in the `azd` environment before deploying: + +```bash +azd env set AGENT_NAME hosted-workflows +azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-4o +``` + +For end-to-end hosted agent deployment guidance, see the [official deployment guide](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/deploy-hosted-agent). + +--- + ## NuGet package users Use the standard `Dockerfile` instead of `Dockerfile.contributor`. See the commented section in `HostedWorkflowSimple.csproj` for the `PackageReference` alternative. From 2ea785ceecda273529f63c271887d0612774ddb5 Mon Sep 17 00:00:00 2001 From: Ben Thomas Date: Fri, 5 Jun 2026 12:41:43 -0700 Subject: [PATCH 2/4] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../responses/Hosted-Workflow-Simple/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Simple/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Simple/README.md index 27e5307a8ed..d3fbd5495b0 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Simple/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Simple/README.md @@ -124,7 +124,7 @@ azd deploy If you need to override defaults, set deployment-time environment variables in the `azd` environment before deploying: ```bash -azd env set AGENT_NAME hosted-workflows +azd env set AGENT_NAME hosted-workflow-simple azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-4o ``` From ba342042541f3fa53c18230031d4b98d4165f122 Mon Sep 17 00:00:00 2001 From: Ben Thomas <25218250+alliscode@users.noreply.github.com> Date: Mon, 8 Jun 2026 14:51:37 -0700 Subject: [PATCH 3/4] docs(samples): fix Foundry hosted README consistency Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../responses/Hosted-AgentSkills/README.md | 2 ++ .../responses/Hosted-Workflow-Simple/README.md | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AgentSkills/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AgentSkills/README.md index 33a872ce649..255289199bd 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AgentSkills/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AgentSkills/README.md @@ -98,6 +98,8 @@ Because skills are loaded on demand, the canary token in a response also proves ## Deploying the Agent to Foundry +### Deploying to Foundry (azd spec) + When deploying to Foundry, make sure `SKILL_NAMES` is set in your `azd` environment so it gets injected into the hosted container per [`agent.manifest.yaml`](agent.manifest.yaml): ```bash diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Simple/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Simple/README.md index d3fbd5495b0..3044b84bdaf 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Simple/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Simple/README.md @@ -5,7 +5,7 @@ A hosted agent that demonstrates **multi-agent workflow orchestration**. Three t ## Prerequisites - [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) -- An Azure AI Foundry project with a deployed model (e.g., `gpt-4o`) +- An Azure AI Foundry project with a deployed model (e.g., `hosted-workflow-simple`) - Azure CLI logged in (`az login`) ## Configuration @@ -22,7 +22,7 @@ Edit `.env` and set your Azure AI Foundry project endpoint: AZURE_AI_PROJECT_ENDPOINT=https://.services.ai.azure.com/api/projects/ ASPNETCORE_URLS=http://+:8088 ASPNETCORE_ENVIRONMENT=Development -AZURE_AI_MODEL_DEPLOYMENT_NAME=gpt-4o +AZURE_AI_MODEL_DEPLOYMENT_NAME=hosted-workflow-simple ``` > **Note:** `.env` is gitignored. The `.env.example` template is checked in as a reference. From ac32977d614dda6abb633f1bc4d84f9f857a6c55 Mon Sep 17 00:00:00 2001 From: Ben Thomas <25218250+alliscode@users.noreply.github.com> Date: Mon, 8 Jun 2026 14:54:42 -0700 Subject: [PATCH 4/4] docs(samples): address PR 6365 README review comments Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../responses/Hosted-AgentSkills/README.md | 4 +--- .../responses/Hosted-ToolboxMcpSkills/README.md | 2 +- .../responses/Hosted-Workflow-Simple/README.md | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AgentSkills/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AgentSkills/README.md index 255289199bd..01239efef5f 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AgentSkills/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-AgentSkills/README.md @@ -98,8 +98,6 @@ Because skills are loaded on demand, the canary token in a response also proves ## Deploying the Agent to Foundry -### Deploying to Foundry (azd spec) - When deploying to Foundry, make sure `SKILL_NAMES` is set in your `azd` environment so it gets injected into the hosted container per [`agent.manifest.yaml`](agent.manifest.yaml): ```bash @@ -110,7 +108,7 @@ The deployed agent's Managed Identity needs **Azure AI User** on the Foundry pro > The `skills/` source folder is **not** deployed to Foundry — only the downloaded skills are used at runtime. The provisioning step must have been run against the same Foundry project before the agent can download the skills. -## Deploying to Foundry (azd spec) +### Deploying to Foundry (azd spec) This sample includes an `azd` manifest (`agent.manifest.yaml`) and hosted agent spec (`agent.yaml`) for deployment to Foundry. diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ToolboxMcpSkills/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ToolboxMcpSkills/README.md index e630881ecee..707f37fb582 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ToolboxMcpSkills/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-ToolboxMcpSkills/README.md @@ -119,7 +119,7 @@ If you need to override defaults, set deployment-time environment variables in t ```bash azd env set AGENT_NAME hosted-toolbox-mcp-skills -azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-4o +azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-5 ``` For end-to-end hosted agent deployment guidance, see the [official deployment guide](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/deploy-hosted-agent). diff --git a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Simple/README.md b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Simple/README.md index 3044b84bdaf..12aa97a8d78 100644 --- a/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Simple/README.md +++ b/dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Workflow-Simple/README.md @@ -125,7 +125,7 @@ If you need to override defaults, set deployment-time environment variables in t ```bash azd env set AGENT_NAME hosted-workflow-simple -azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME gpt-4o +azd env set AZURE_AI_MODEL_DEPLOYMENT_NAME hosted-workflow-simple ``` For end-to-end hosted agent deployment guidance, see the [official deployment guide](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/deploy-hosted-agent).