From b15508f6f73766c2b3dab775715a3bd8244c1893 Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 10:19:36 -0700 Subject: [PATCH 01/25] Investigate --- .../AzureAgentProviderTest.cs | 4 ++-- .../Framework/WorkflowTest.cs | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/AzureAgentProviderTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/AzureAgentProviderTest.cs index e6b660845a..45b7735eb9 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/AzureAgentProviderTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/AzureAgentProviderTest.cs @@ -18,7 +18,7 @@ public sealed class AzureAgentProviderTest(ITestOutputHelper output) : Integrati { private AzureAIConfiguration? _configuration; - [Fact(Skip = "Needs configuration")] + [Fact] public async Task ConversationTestAsync() { // Arrange @@ -48,7 +48,7 @@ public async Task ConversationTestAsync() Assert.Equal(messages[3].Text, message.Text); } - [Fact(Skip = "Needs configuration")] + [Fact] public async Task GetAgentTestAsync() { // Arrange diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs index 0e3af235c0..591d95340d 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs @@ -49,6 +49,8 @@ protected async Task TestWorkflowAsync( { this.Output.WriteLine($"INPUT: {testcase.Setup.Input.Value}"); + this.DisplayConfig(configuration); + AzureAIConfiguration? foundryConfig = configuration.GetSection("AzureAI").Get(); Assert.NotNull(foundryConfig); @@ -68,6 +70,14 @@ protected async Task TestWorkflowAsync( await this.RunAndVerifyAsync(testcase, workflowPath, workflowOptions); } + private void DisplayConfig(IConfiguration configuration, string? root = null) + { + foreach (IConfigurationSection config in configuration.GetChildren()) + { + this.Output.WriteLine($"CONFIG: {root ?? string.Empty}{(root is null ? string.Empty : ".")}{config.Key}"); + } + } + protected static object GetInput(Testcase testcase) where TInput : notnull => testcase.Setup.Input.Type switch { From 556b99507c91ce78601e39441030b013301b0e33 Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 10:26:18 -0700 Subject: [PATCH 02/25] Next --- .../Framework/WorkflowTest.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs index 591d95340d..c217bfc9bf 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs @@ -75,6 +75,7 @@ private void DisplayConfig(IConfiguration configuration, string? root = null) foreach (IConfigurationSection config in configuration.GetChildren()) { this.Output.WriteLine($"CONFIG: {root ?? string.Empty}{(root is null ? string.Empty : ".")}{config.Key}"); + this.DisplayConfig(config, config.Key); } } From 4b0a241c9c4bbb3e6ac5b8d8f12a69f9c57ecf28 Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 10:40:39 -0700 Subject: [PATCH 03/25] Update initialization --- .../Framework/IntegrationTest.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs index 5196445f1e..60aa4f38df 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs @@ -49,6 +49,8 @@ protected static void SetProduct() protected static IConfigurationRoot InitializeConfig() => new ConfigurationBuilder() + .AddJsonFile("appsettings.Development.json", true) + .AddEnvironmentVariables() .AddUserSecrets(Assembly.GetExecutingAssembly()) .Build(); } From fa2f23f19a46db90b592eb99d1b3697135ad43e0 Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 10:49:39 -0700 Subject: [PATCH 04/25] Should be ok --- .../DeclarativeWorkflowTest.cs | 12 ++++++------ .../Framework/WorkflowTest.cs | 11 ----------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs index 668e25de74..50bd7a3229 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs @@ -15,16 +15,16 @@ namespace Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests; public sealed class DeclarativeWorkflowTest(ITestOutputHelper output) : WorkflowTest(output) { [Theory] - [InlineData("SendActivity.yaml", "SendActivity.json", Skip = "Needs configuration")] - [InlineData("InvokeAgent.yaml", "InvokeAgent.json", Skip = "Needs configuration")] - [InlineData("ConversationMessages.yaml", "ConversationMessages.json", Skip = "Needs configuration")] + [InlineData("SendActivity.yaml", "SendActivity.json")] + [InlineData("InvokeAgent.yaml", "InvokeAgent.json")] + [InlineData("ConversationMessages.yaml", "ConversationMessages.json")] public Task ValidateCaseAsync(string workflowFileName, string testcaseFileName) => this.RunWorkflowAsync(Path.Combine("Workflows", workflowFileName), testcaseFileName); [Theory] - [InlineData("Marketing.yaml", "Marketing.json", Skip = "Needs configuration")] - [InlineData("MathChat.yaml", "MathChat.json", Skip = "Needs configuration")] - [InlineData("DeepResearch.yaml", "DeepResearch.json", Skip = "Needs configuration")] + [InlineData("Marketing.yaml", "Marketing.json")] + [InlineData("MathChat.yaml", "MathChat.json")] + [InlineData("DeepResearch.yaml", "DeepResearch.json")] [InlineData("HumanInLoop.yaml", "HumanInLoop.json", Skip = "Needs test support")] public Task ValidateScenarioAsync(string workflowFileName, string testcaseFileName) => this.RunWorkflowAsync(Path.Combine(GetRepoFolder(), "workflow-samples", workflowFileName), testcaseFileName); diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs index c217bfc9bf..0e3af235c0 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs @@ -49,8 +49,6 @@ protected async Task TestWorkflowAsync( { this.Output.WriteLine($"INPUT: {testcase.Setup.Input.Value}"); - this.DisplayConfig(configuration); - AzureAIConfiguration? foundryConfig = configuration.GetSection("AzureAI").Get(); Assert.NotNull(foundryConfig); @@ -70,15 +68,6 @@ protected async Task TestWorkflowAsync( await this.RunAndVerifyAsync(testcase, workflowPath, workflowOptions); } - private void DisplayConfig(IConfiguration configuration, string? root = null) - { - foreach (IConfigurationSection config in configuration.GetChildren()) - { - this.Output.WriteLine($"CONFIG: {root ?? string.Empty}{(root is null ? string.Empty : ".")}{config.Key}"); - this.DisplayConfig(config, config.Key); - } - } - protected static object GetInput(Testcase testcase) where TInput : notnull => testcase.Setup.Input.Type switch { From 147802514dd59c6dc9e3438de8e342774e0f8864 Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 11:01:20 -0700 Subject: [PATCH 05/25] Agent definition dx --- .../Framework/AgentFactory.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs index c9427fdb52..d3383222bd 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs @@ -67,7 +67,7 @@ internal static class AgentFactory { filePath = Path.Combine(repoRoot, "workflow-samples/setup", file); } - Assert.True(File.Exists(filePath), $"Agent definition file not found: {file}"); + Assert.True(File.Exists(filePath), $"Agent definition file not found: {filePath}"); Debug.WriteLine($"TEST AGENT: Creating - {file}"); string agentText = File.ReadAllText(filePath); @@ -82,7 +82,7 @@ internal static class AgentFactory } catch (Exception exception) { - Console.WriteLine($"FAILURE: Error creating agent {id} from file {file}: {exception.Message}"); + Console.WriteLine($"FAILURE: Error creating agent {id}: {exception.Message}"); throw; } } From 8a96aeb5ddcaeb71ea0d3c8dafe275356d4f9f01 Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 11:11:08 -0700 Subject: [PATCH 06/25] Link agent definitions --- .../Framework/AgentFactory.cs | 5 ----- ...t.Agents.AI.Workflows.Declarative.IntegrationTests.csproj | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs index d3383222bd..57727a8dd5 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs @@ -54,7 +54,6 @@ internal static class AgentFactory kernelBuilder.Services.AddSingleton(clientProjects); AgentCreationOptions creationOptions = new() { Kernel = kernelBuilder.Build() }; AzureAIAgentFactory factory = new(); - string repoRoot = WorkflowTest.GetRepoFolder(); return s_agentMap = (await Task.WhenAll(_agentDefinitions.Select(kvp => CreateAgentAsync(kvp.Key, kvp.Value, cancellationToken)))).ToFrozenDictionary(t => t.Name, t => t.Id); @@ -63,10 +62,6 @@ internal static class AgentFactory try { string filePath = Path.Combine("Agents", file); - if (!File.Exists(filePath)) - { - filePath = Path.Combine(repoRoot, "workflow-samples/setup", file); - } Assert.True(File.Exists(filePath), $"Agent definition file not found: {filePath}"); Debug.WriteLine($"TEST AGENT: Creating - {file}"); diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj index 8da383a69a..298cd7d546 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj @@ -31,6 +31,9 @@ Always + + Always + Always From 0b5f1bc3db6c6e04ff4dfc61e46bff86cfd2ad3f Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 11:12:20 -0700 Subject: [PATCH 07/25] Link agent definitions --- .../AzureAgentProviderTest.cs | 1 + .../Framework/IntegrationTest.cs | 26 ++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/AzureAgentProviderTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/AzureAgentProviderTest.cs index 45b7735eb9..f8e086d810 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/AzureAgentProviderTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/AzureAgentProviderTest.cs @@ -87,6 +87,7 @@ private AzureAIConfiguration Configuration { this._configuration ??= InitializeConfig().GetSection("AzureAI").Get(); Assert.NotNull(this._configuration); + this.Output.WriteLine($"CONFIG - DeploymentName: {this._configuration.DeploymentName}"); // %%% REMOVE } return this._configuration; diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs index 60aa4f38df..e19acf9973 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs @@ -47,10 +47,24 @@ protected static void SetProduct() internal static string FormatVariablePath(string variableName, string? scope = null) => $"{scope ?? WorkflowFormulaState.DefaultScopeName}.{variableName}"; - protected static IConfigurationRoot InitializeConfig() => - new ConfigurationBuilder() - .AddJsonFile("appsettings.Development.json", true) - .AddEnvironmentVariables() - .AddUserSecrets(Assembly.GetExecutingAssembly()) - .Build(); + protected static IConfigurationRoot InitializeConfig() + { + IConfigurationRoot root = + new ConfigurationBuilder() + .AddJsonFile("appsettings.Development.json", true) + .AddEnvironmentVariables() + .AddUserSecrets(Assembly.GetExecutingAssembly()) + .Build(); + DisplayConfig(root); + return root; + } + + private static void DisplayConfig(IConfiguration configuration, string? root = null) // %%% REMOVE + { + foreach (IConfigurationSection config in configuration.GetChildren()) + { + Console.WriteLine($"CONFIG: {root ?? string.Empty}{(root is null ? string.Empty : ".")}{config.Key}"); + DisplayConfig(config, config.Key); + } + } } From 9faa8b05d9b48112ec43bf4d70c67ed628718d8f Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 11:25:22 -0700 Subject: [PATCH 08/25] Path resolution #2 --- .../Framework/AgentFactory.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs index 57727a8dd5..f00a924f23 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs @@ -6,6 +6,7 @@ using System.Diagnostics; using System.IO; using System.Linq; +using System.Reflection; using System.Threading; using System.Threading.Tasks; using Azure.AI.Agents.Persistent; @@ -55,13 +56,18 @@ internal static class AgentFactory AgentCreationOptions creationOptions = new() { Kernel = kernelBuilder.Build() }; AzureAIAgentFactory factory = new(); + Console.WriteLine($"ENVIRONMENT: {Environment.CurrentDirectory}"); + Console.WriteLine($"APPDOMAIN: {AppDomain.CurrentDomain.BaseDirectory}"); + Console.WriteLine($"DIRECTORY: {Directory.GetCurrentDirectory()}"); + Console.WriteLine($"ASSEMBLY: {Assembly.GetExecutingAssembly().Location}"); + return s_agentMap = (await Task.WhenAll(_agentDefinitions.Select(kvp => CreateAgentAsync(kvp.Key, kvp.Value, cancellationToken)))).ToFrozenDictionary(t => t.Name, t => t.Id); async Task<(string Name, string? Id)> CreateAgentAsync(string id, string file, CancellationToken cancellationToken) { try { - string filePath = Path.Combine("Agents", file); + string filePath = Path.Combine(Assembly.GetExecutingAssembly().Location, "Agents", file); Assert.True(File.Exists(filePath), $"Agent definition file not found: {filePath}"); Debug.WriteLine($"TEST AGENT: Creating - {file}"); From 76304fa1d60b9dc76b31f577704ca4362f8ec7d8 Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 11:31:12 -0700 Subject: [PATCH 09/25] Fix path resolution --- .../Framework/AgentFactory.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs index f00a924f23..b012384959 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs @@ -56,18 +56,13 @@ internal static class AgentFactory AgentCreationOptions creationOptions = new() { Kernel = kernelBuilder.Build() }; AzureAIAgentFactory factory = new(); - Console.WriteLine($"ENVIRONMENT: {Environment.CurrentDirectory}"); - Console.WriteLine($"APPDOMAIN: {AppDomain.CurrentDomain.BaseDirectory}"); - Console.WriteLine($"DIRECTORY: {Directory.GetCurrentDirectory()}"); - Console.WriteLine($"ASSEMBLY: {Assembly.GetExecutingAssembly().Location}"); - return s_agentMap = (await Task.WhenAll(_agentDefinitions.Select(kvp => CreateAgentAsync(kvp.Key, kvp.Value, cancellationToken)))).ToFrozenDictionary(t => t.Name, t => t.Id); async Task<(string Name, string? Id)> CreateAgentAsync(string id, string file, CancellationToken cancellationToken) { try { - string filePath = Path.Combine(Assembly.GetExecutingAssembly().Location, "Agents", file); + string filePath = Path.Combine(Environment.CurrentDirectory, "Agents", file); Assert.True(File.Exists(filePath), $"Agent definition file not found: {filePath}"); Debug.WriteLine($"TEST AGENT: Creating - {file}"); From ab4dbf6bd2be59649e09d9426b8bd501681fb12a Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 11:51:37 -0700 Subject: [PATCH 10/25] Another pass --- .../Framework/AgentFactory.cs | 11 +++++++++++ .../Framework/IntegrationTest.cs | 7 ++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs index b012384959..bc8b2f1771 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs @@ -56,6 +56,17 @@ internal static class AgentFactory AgentCreationOptions creationOptions = new() { Kernel = kernelBuilder.Build() }; AzureAIAgentFactory factory = new(); + Console.WriteLine($"REPO: {WorkflowTest.GetRepoFolder()}"); + foreach (string dir in Directory.GetDirectories(WorkflowTest.GetRepoFolder())) + { + Console.WriteLine($"DIR: {dir} ({Path.GetFullPath(dir)})"); + } + Console.WriteLine($"CURRENT: {Directory.GetCurrentDirectory()}"); + foreach (string dir in Directory.GetDirectories(Directory.GetCurrentDirectory())) + { + Console.WriteLine($"DIR: {dir} ({Path.GetFullPath(dir)})"); + } + return s_agentMap = (await Task.WhenAll(_agentDefinitions.Select(kvp => CreateAgentAsync(kvp.Key, kvp.Value, cancellationToken)))).ToFrozenDictionary(t => t.Name, t => t.Id); async Task<(string Name, string? Id)> CreateAgentAsync(string id, string file, CancellationToken cancellationToken) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs index e19acf9973..8821299187 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs @@ -49,14 +49,15 @@ protected static void SetProduct() protected static IConfigurationRoot InitializeConfig() { - IConfigurationRoot root = + return + //IConfigurationRoot root = new ConfigurationBuilder() .AddJsonFile("appsettings.Development.json", true) .AddEnvironmentVariables() .AddUserSecrets(Assembly.GetExecutingAssembly()) .Build(); - DisplayConfig(root); - return root; + //DisplayConfig(root); // %%% REMOVE + //return root; } private static void DisplayConfig(IConfiguration configuration, string? root = null) // %%% REMOVE From 2a564de3c0fae1b19c16d21d3c27ab21f724fa6f Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 12:07:59 -0700 Subject: [PATCH 11/25] Another --- .github/workflows/dotnet-build-and-test.yml | 1 + .../DeclarativeCodeGenTest.cs | 11 ++++++----- .../DeclarativeWorkflowTest.cs | 3 ++- .../Framework/AgentFactory.cs | 2 +- .../Framework/IntegrationTest.cs | 7 +++---- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/dotnet-build-and-test.yml b/.github/workflows/dotnet-build-and-test.yml index 63ce12caab..40675f4153 100644 --- a/.github/workflows/dotnet-build-and-test.yml +++ b/.github/workflows/dotnet-build-and-test.yml @@ -54,6 +54,7 @@ jobs: . .github dotnet + workflow-samples - name: Setup dotnet uses: actions/setup-dotnet@v5.0.0 with: diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs index 7650bab18a..bdfe7ec71e 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs @@ -1,5 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. +using System; using System.IO; using System.Linq; using System.Threading.Tasks; @@ -15,17 +16,17 @@ namespace Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests; public sealed class DeclarativeCodeGenTest(ITestOutputHelper output) : WorkflowTest(output) { [Theory] - [InlineData("SendActivity.yaml", "SendActivity.json", Skip = "Needs configuration")] - [InlineData("InvokeAgent.yaml", "InvokeAgent.json", Skip = "Needs configuration")] - [InlineData("ConversationMessages.yaml", "ConversationMessages.json", Skip = "Needs configuration")] + [InlineData("SendActivity.yaml", "SendActivity.json")] + [InlineData("InvokeAgent.yaml", "InvokeAgent.json")] + [InlineData("ConversationMessages.yaml", "ConversationMessages.json")] public Task ValidateCaseAsync(string workflowFileName, string testcaseFileName) => - this.RunWorkflowAsync(Path.Combine("Workflows", workflowFileName), testcaseFileName); + this.RunWorkflowAsync(Path.Combine(Environment.CurrentDirectory, "Workflows", workflowFileName), testcaseFileName); [Theory] [InlineData("Marketing.yaml", "Marketing.json", Skip = "Needs configuration")] [InlineData("MathChat.yaml", "MathChat.json", Skip = "Needs configuration")] [InlineData("DeepResearch.yaml", "DeepResearch.json", Skip = "Needs configuration")] - [InlineData("HumanInLoop.yaml", "HumanInLoop.json", Skip = "TODO")] + [InlineData("HumanInLoop.yaml", "HumanInLoop.json", Skip = "Needs test support")] public Task ValidateScenarioAsync(string workflowFileName, string testcaseFileName) => this.RunWorkflowAsync(Path.Combine(GetRepoFolder(), "workflow-samples", workflowFileName), testcaseFileName); diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs index 50bd7a3229..0bd814d8be 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs @@ -1,5 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. +using System; using System.IO; using System.Linq; using System.Threading.Tasks; @@ -19,7 +20,7 @@ public sealed class DeclarativeWorkflowTest(ITestOutputHelper output) : Workflow [InlineData("InvokeAgent.yaml", "InvokeAgent.json")] [InlineData("ConversationMessages.yaml", "ConversationMessages.json")] public Task ValidateCaseAsync(string workflowFileName, string testcaseFileName) => - this.RunWorkflowAsync(Path.Combine("Workflows", workflowFileName), testcaseFileName); + this.RunWorkflowAsync(Path.Combine(Environment.CurrentDirectory, "Workflows", workflowFileName), testcaseFileName); [Theory] [InlineData("Marketing.yaml", "Marketing.json")] diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs index bc8b2f1771..1055da4104 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs @@ -62,7 +62,7 @@ internal static class AgentFactory Console.WriteLine($"DIR: {dir} ({Path.GetFullPath(dir)})"); } Console.WriteLine($"CURRENT: {Directory.GetCurrentDirectory()}"); - foreach (string dir in Directory.GetDirectories(Directory.GetCurrentDirectory())) + foreach (string dir in Directory.GetDirectories(Path.Combine(Directory.GetCurrentDirectory(), "Agents"))) { Console.WriteLine($"DIR: {dir} ({Path.GetFullPath(dir)})"); } diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs index 8821299187..59f6153dcb 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs @@ -49,15 +49,14 @@ protected static void SetProduct() protected static IConfigurationRoot InitializeConfig() { - return - //IConfigurationRoot root = + IConfigurationRoot root = new ConfigurationBuilder() .AddJsonFile("appsettings.Development.json", true) .AddEnvironmentVariables() .AddUserSecrets(Assembly.GetExecutingAssembly()) .Build(); - //DisplayConfig(root); // %%% REMOVE - //return root; + DisplayConfig(root.GetSection("AzureAI")); // %%% REMOVE + return root; } private static void DisplayConfig(IConfiguration configuration, string? root = null) // %%% REMOVE From fabeba7e667b7d9252995fe96b2f6fdb66e78a57 Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 12:19:35 -0700 Subject: [PATCH 12/25] Better --- .../AzureAgentProviderTest.cs | 1 - .../Framework/AgentFactory.cs | 15 +++-------- .../Framework/IntegrationTest.cs | 26 +++++-------------- 3 files changed, 10 insertions(+), 32 deletions(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/AzureAgentProviderTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/AzureAgentProviderTest.cs index f8e086d810..45b7735eb9 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/AzureAgentProviderTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/AzureAgentProviderTest.cs @@ -87,7 +87,6 @@ private AzureAIConfiguration Configuration { this._configuration ??= InitializeConfig().GetSection("AzureAI").Get(); Assert.NotNull(this._configuration); - this.Output.WriteLine($"CONFIG - DeploymentName: {this._configuration.DeploymentName}"); // %%% REMOVE } return this._configuration; diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs index 1055da4104..49b0281fec 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs @@ -56,17 +56,6 @@ internal static class AgentFactory AgentCreationOptions creationOptions = new() { Kernel = kernelBuilder.Build() }; AzureAIAgentFactory factory = new(); - Console.WriteLine($"REPO: {WorkflowTest.GetRepoFolder()}"); - foreach (string dir in Directory.GetDirectories(WorkflowTest.GetRepoFolder())) - { - Console.WriteLine($"DIR: {dir} ({Path.GetFullPath(dir)})"); - } - Console.WriteLine($"CURRENT: {Directory.GetCurrentDirectory()}"); - foreach (string dir in Directory.GetDirectories(Path.Combine(Directory.GetCurrentDirectory(), "Agents"))) - { - Console.WriteLine($"DIR: {dir} ({Path.GetFullPath(dir)})"); - } - return s_agentMap = (await Task.WhenAll(_agentDefinitions.Select(kvp => CreateAgentAsync(kvp.Key, kvp.Value, cancellationToken)))).ToFrozenDictionary(t => t.Name, t => t.Id); async Task<(string Name, string? Id)> CreateAgentAsync(string id, string file, CancellationToken cancellationToken) @@ -74,6 +63,10 @@ internal static class AgentFactory try { string filePath = Path.Combine(Environment.CurrentDirectory, "Agents", file); + if (!File.Exists(filePath)) + { + filePath = Path.Combine(WorkflowTest.GetRepoFolder(), "workflow-samples/setup", file); + } Assert.True(File.Exists(filePath), $"Agent definition file not found: {filePath}"); Debug.WriteLine($"TEST AGENT: Creating - {file}"); diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs index 59f6153dcb..60aa4f38df 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs @@ -47,24 +47,10 @@ protected static void SetProduct() internal static string FormatVariablePath(string variableName, string? scope = null) => $"{scope ?? WorkflowFormulaState.DefaultScopeName}.{variableName}"; - protected static IConfigurationRoot InitializeConfig() - { - IConfigurationRoot root = - new ConfigurationBuilder() - .AddJsonFile("appsettings.Development.json", true) - .AddEnvironmentVariables() - .AddUserSecrets(Assembly.GetExecutingAssembly()) - .Build(); - DisplayConfig(root.GetSection("AzureAI")); // %%% REMOVE - return root; - } - - private static void DisplayConfig(IConfiguration configuration, string? root = null) // %%% REMOVE - { - foreach (IConfigurationSection config in configuration.GetChildren()) - { - Console.WriteLine($"CONFIG: {root ?? string.Empty}{(root is null ? string.Empty : ".")}{config.Key}"); - DisplayConfig(config, config.Key); - } - } + protected static IConfigurationRoot InitializeConfig() => + new ConfigurationBuilder() + .AddJsonFile("appsettings.Development.json", true) + .AddEnvironmentVariables() + .AddUserSecrets(Assembly.GetExecutingAssembly()) + .Build(); } From f4862e9c98c1cd7a707e98013a8513f590644f4e Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 12:20:00 -0700 Subject: [PATCH 13/25] One more --- ...ft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj index 298cd7d546..52872ac8ea 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj @@ -1,4 +1,4 @@ - + $(ProjectsTargetFrameworks) @@ -29,7 +29,7 @@ - Always + Never Always From 83304c456decf184967fed9e37ed0a9875ac8799 Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 12:27:18 -0700 Subject: [PATCH 14/25] Whoopsie --- ...ft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj index 52872ac8ea..a97830c7df 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj @@ -29,10 +29,10 @@ - Never + Always - Always + Never Always From 1094b64c0a3102072f4cb9eeb08f26b668c1c5e4 Mon Sep 17 00:00:00 2001 From: Chris <66376200+crickman@users.noreply.github.com> Date: Wed, 1 Oct 2025 12:31:38 -0700 Subject: [PATCH 15/25] Update dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Framework/AgentFactory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs index 49b0281fec..0ed980ebd1 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs @@ -65,7 +65,7 @@ internal static class AgentFactory string filePath = Path.Combine(Environment.CurrentDirectory, "Agents", file); if (!File.Exists(filePath)) { - filePath = Path.Combine(WorkflowTest.GetRepoFolder(), "workflow-samples/setup", file); + filePath = Path.Combine(WorkflowTest.GetRepoFolder(), "workflow-samples", "setup", file); } Assert.True(File.Exists(filePath), $"Agent definition file not found: {filePath}"); From 2cff08d47b5da1661f948ea95814f3937a9e47f9 Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 12:33:04 -0700 Subject: [PATCH 16/25] Namespace --- .../Framework/AgentFactory.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs index 0ed980ebd1..125758990e 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs @@ -6,7 +6,6 @@ using System.Diagnostics; using System.IO; using System.Linq; -using System.Reflection; using System.Threading; using System.Threading.Tasks; using Azure.AI.Agents.Persistent; From 3205205c954da2be7809d90fd681e089c9791645 Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 12:35:14 -0700 Subject: [PATCH 17/25] Cleanup --- .../Framework/AgentFactory.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs index 125758990e..f78f5b3958 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs @@ -54,6 +54,7 @@ internal static class AgentFactory kernelBuilder.Services.AddSingleton(clientProjects); AgentCreationOptions creationOptions = new() { Kernel = kernelBuilder.Build() }; AzureAIAgentFactory factory = new(); + string repoRoot = WorkflowTest.GetRepoFolder(); return s_agentMap = (await Task.WhenAll(_agentDefinitions.Select(kvp => CreateAgentAsync(kvp.Key, kvp.Value, cancellationToken)))).ToFrozenDictionary(t => t.Name, t => t.Id); @@ -64,9 +65,9 @@ internal static class AgentFactory string filePath = Path.Combine(Environment.CurrentDirectory, "Agents", file); if (!File.Exists(filePath)) { - filePath = Path.Combine(WorkflowTest.GetRepoFolder(), "workflow-samples", "setup", file); + filePath = Path.Combine(repoRoot, "workflow-samples", "setup", file); } - Assert.True(File.Exists(filePath), $"Agent definition file not found: {filePath}"); + Assert.True(File.Exists(filePath), $"Agent definition file not found: {file}"); Debug.WriteLine($"TEST AGENT: Creating - {file}"); string agentText = File.ReadAllText(filePath); From 8f7801f54b891dd7768811175cd3b051a1f4bb62 Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 12:42:24 -0700 Subject: [PATCH 18/25] Temp config for pipeline --- .../Agents/TestAgent.yaml | 2 +- workflow-samples/setup/AnalystAgent.yaml | 10 +++++----- workflow-samples/setup/WebAgent.yaml | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/TestAgent.yaml b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/TestAgent.yaml index 01d9ad1554..2d41b2c5dd 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/TestAgent.yaml +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/TestAgent.yaml @@ -2,4 +2,4 @@ type: foundry_agent name: BasicAgent description: Basic agent for integration tests model: - id: ${AzureAI:DeploymentMini} + id: ${AzureAI:ModelDeployment} diff --git a/workflow-samples/setup/AnalystAgent.yaml b/workflow-samples/setup/AnalystAgent.yaml index 233e65cb22..ffcd2d817c 100644 --- a/workflow-samples/setup/AnalystAgent.yaml +++ b/workflow-samples/setup/AnalystAgent.yaml @@ -3,8 +3,8 @@ name: ResearchAnalyst description: Demo agent for DeepResearch workflow model: id: ${AzureAI:ModelDeployment} -tools: - - type: bing_grounding - options: - tool_connections: - - ${AzureAI:BingConnectionId} \ No newline at end of file +# tools: +# - type: bing_grounding +# options: +# tool_connections: +# - ${AzureAI:BingConnectionId} \ No newline at end of file diff --git a/workflow-samples/setup/WebAgent.yaml b/workflow-samples/setup/WebAgent.yaml index 024dd68f5f..9a8c452290 100644 --- a/workflow-samples/setup/WebAgent.yaml +++ b/workflow-samples/setup/WebAgent.yaml @@ -7,9 +7,9 @@ instructions: |- Never generate a file. Avoid repeating yourself. model: - id: ${AzureAI:ModelDeployment} -tools: - - type: bing_grounding - options: - tool_connections: - - ${AzureAI:BingConnectionId} \ No newline at end of file + id: ${AzureAI:ModelDeployment +# tools: +# - type: bing_grounding +# options: +# tool_connections: +# - ${AzureAI:BingConnectionId} \ No newline at end of file From 1ab240a73e5a092db20a40149c09d8593d364a40 Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 12:49:35 -0700 Subject: [PATCH 19/25] Another temp workaround --- workflow-samples/setup/QuestionAgent.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/workflow-samples/setup/QuestionAgent.yaml b/workflow-samples/setup/QuestionAgent.yaml index 1952259bd6..5771fd8698 100644 --- a/workflow-samples/setup/QuestionAgent.yaml +++ b/workflow-samples/setup/QuestionAgent.yaml @@ -3,8 +3,8 @@ name: Answer description: Demo agent for Question workflow model: id: ${AzureAI:ModelDeployment} -tools: - - type: bing_grounding - options: - tool_connections: - - ${AzureAI:BingConnectionId} \ No newline at end of file +# tools: +# - type: bing_grounding +# options: +# tool_connections: +# - ${AzureAI:BingConnectionId} \ No newline at end of file From 37fc34dd208a7448b75a9977ae3d9b5bd660bfd1 Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 13:01:27 -0700 Subject: [PATCH 20/25] Test config: Bing Grounding Tool --- .../Shared/IntegrationTests/AzureAIConfiguration.cs | 2 ++ workflow-samples/setup/AnalystAgent.yaml | 10 +++++----- workflow-samples/setup/QuestionAgent.yaml | 10 +++++----- workflow-samples/setup/WebAgent.yaml | 10 +++++----- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/dotnet/src/Shared/IntegrationTests/AzureAIConfiguration.cs b/dotnet/src/Shared/IntegrationTests/AzureAIConfiguration.cs index 29d76ac232..e1620ba5ba 100644 --- a/dotnet/src/Shared/IntegrationTests/AzureAIConfiguration.cs +++ b/dotnet/src/Shared/IntegrationTests/AzureAIConfiguration.cs @@ -10,4 +10,6 @@ internal sealed class AzureAIConfiguration public string Endpoint { get; set; } public string DeploymentName { get; set; } + + public string? BingConnectionId { get; set; } } diff --git a/workflow-samples/setup/AnalystAgent.yaml b/workflow-samples/setup/AnalystAgent.yaml index ffcd2d817c..233e65cb22 100644 --- a/workflow-samples/setup/AnalystAgent.yaml +++ b/workflow-samples/setup/AnalystAgent.yaml @@ -3,8 +3,8 @@ name: ResearchAnalyst description: Demo agent for DeepResearch workflow model: id: ${AzureAI:ModelDeployment} -# tools: -# - type: bing_grounding -# options: -# tool_connections: -# - ${AzureAI:BingConnectionId} \ No newline at end of file +tools: + - type: bing_grounding + options: + tool_connections: + - ${AzureAI:BingConnectionId} \ No newline at end of file diff --git a/workflow-samples/setup/QuestionAgent.yaml b/workflow-samples/setup/QuestionAgent.yaml index 5771fd8698..1952259bd6 100644 --- a/workflow-samples/setup/QuestionAgent.yaml +++ b/workflow-samples/setup/QuestionAgent.yaml @@ -3,8 +3,8 @@ name: Answer description: Demo agent for Question workflow model: id: ${AzureAI:ModelDeployment} -# tools: -# - type: bing_grounding -# options: -# tool_connections: -# - ${AzureAI:BingConnectionId} \ No newline at end of file +tools: + - type: bing_grounding + options: + tool_connections: + - ${AzureAI:BingConnectionId} \ No newline at end of file diff --git a/workflow-samples/setup/WebAgent.yaml b/workflow-samples/setup/WebAgent.yaml index 9a8c452290..af715d4215 100644 --- a/workflow-samples/setup/WebAgent.yaml +++ b/workflow-samples/setup/WebAgent.yaml @@ -8,8 +8,8 @@ instructions: |- Avoid repeating yourself. model: id: ${AzureAI:ModelDeployment -# tools: -# - type: bing_grounding -# options: -# tool_connections: -# - ${AzureAI:BingConnectionId} \ No newline at end of file +tools: + - type: bing_grounding + options: + tool_connections: + - ${AzureAI:BingConnectionId} \ No newline at end of file From 53df3b006f9bcb0aae9b051009385991cb4e39de Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 13:45:20 -0700 Subject: [PATCH 21/25] Update template --- .../CodeGen/AddConversationMessageTemplate.cs | 26 ++++++++++++------- .../CodeGen/AddConversationMessageTemplate.tt | 15 ++++++----- .../Framework/AgentFactory.cs | 3 +++ 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/AddConversationMessageTemplate.cs b/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/AddConversationMessageTemplate.cs index 6e231f7c66..25cfb6b89e 100644 --- a/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/AddConversationMessageTemplate.cs +++ b/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/AddConversationMessageTemplate.cs @@ -59,14 +59,15 @@ public override string TransformText() "ow new DeclarativeActionException($\"Conversation identifier must be defined: {th" + "is.Id}\");\n }\n ChatMessage newMessage = new(ChatRole."); this.Write(this.ToStringHelper.ToStringWithCulture(FormatEnum(this.Model.Role, RoleMap))); - this.Write(", [.. this.GetContentAsync(context).ToEnumerable()]) { AdditionalProperties = thi" + - "s.GetMetadata() };\n await agentProvider.CreateMessageAsync(conversationId" + - ", newMessage, cancellationToken).ConfigureAwait(false);"); + this.Write(", await this.GetContentAsync(context).ConfigureAwait(false)) { AdditionalProperti" + + "es = this.GetMetadata() };\n await agentProvider.CreateMessageAsync(conver" + + "sationId, newMessage, cancellationToken).ConfigureAwait(false);"); AssignVariable(this.Message, "newMessage"); - this.Write("\n return default;\n }\n\n private async IAsyncEnumerable Get" + - "ContentAsync(IWorkflowContext context)\n {"); + this.Write("\n return default;\n }\n\n private async ValueTask> Get" + + "ContentAsync(IWorkflowContext context)\n {\n List content = [" + + "];\n "); int index = 0; foreach (AddConversationMessageContent content in this.Model.Content) @@ -76,23 +77,28 @@ public override string TransformText() AgentMessageContentType contentType = content.Type.Value; if (contentType == AgentMessageContentType.ImageUrl) { - this.Write("\n yield return new UriContent(contentValue, \"image/*\");"); + this.Write("\n content.Add(UriContent(contentValue"); + this.Write(this.ToStringHelper.ToStringWithCulture(index)); + this.Write(", \"image/*\"));"); } else if (contentType == AgentMessageContentType.ImageFile) { - this.Write("\n yield return new HostedFileContent(contentValue);"); + this.Write("\n content.Add(new HostedFileContent(contentValue"); + this.Write(this.ToStringHelper.ToStringWithCulture(index)); + this.Write("));"); } else { - this.Write("\n yield return new TextContent(contentValue"); + this.Write("\n content.Add(new TextContent(contentValue"); this.Write(this.ToStringHelper.ToStringWithCulture(index)); - this.Write(");"); + this.Write("));"); } } - this.Write("\n }\n\n private AdditionalPropertiesDictionary? GetMetadata()\n {"); + this.Write("\n return content;\n }\n\n private AdditionalPropertiesDictionary? GetMe" + + "tadata()\n {"); EvaluateRecordExpression(this.Model.Metadata, "metadata"); this.Write("\n\n if (metadata is null)\n {\n return null; \n }\n" + diff --git a/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/AddConversationMessageTemplate.tt b/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/AddConversationMessageTemplate.tt index 1d75665098..043288596c 100644 --- a/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/AddConversationMessageTemplate.tt +++ b/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/AddConversationMessageTemplate.tt @@ -16,15 +16,17 @@ internal sealed class <#= this.Name #>Executor(FormulaSession session, WorkflowA { throw new DeclarativeActionException($"Conversation identifier must be defined: {this.Id}"); } - ChatMessage newMessage = new(ChatRole.<#= FormatEnum(this.Model.Role, RoleMap) #>, [.. this.GetContentAsync(context).ToEnumerable()]) { AdditionalProperties = this.GetMetadata() }; + ChatMessage newMessage = new(ChatRole.<#= FormatEnum(this.Model.Role, RoleMap) #>, await this.GetContentAsync(context).ConfigureAwait(false)) { AdditionalProperties = this.GetMetadata() }; await agentProvider.CreateMessageAsync(conversationId, newMessage, cancellationToken).ConfigureAwait(false);<# AssignVariable(this.Message, "newMessage"); #> return default; } - private async IAsyncEnumerable GetContentAsync(IWorkflowContext context) - {<# + private async ValueTask> GetContentAsync(IWorkflowContext context) + { + List content = []; + <# int index = 0; foreach (AddConversationMessageContent content in this.Model.Content) { @@ -33,17 +35,18 @@ internal sealed class <#= this.Name #>Executor(FormulaSession session, WorkflowA AgentMessageContentType contentType = content.Type.Value; if (contentType == AgentMessageContentType.ImageUrl) {#> - yield return new UriContent(contentValue, "image/*");<# + content.Add(UriContent(contentValue<#= index #>, "image/*"));<# } else if (contentType == AgentMessageContentType.ImageFile) {#> - yield return new HostedFileContent(contentValue);<# + content.Add(new HostedFileContent(contentValue<#= index #>));<# } else {#> - yield return new TextContent(contentValue<#= index #>);<# + content.Add(new TextContent(contentValue<#= index #>));<# } }#> + return content; } private AdditionalPropertiesDictionary? GetMetadata() diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs index 6cd29a0854..1f8bde7081 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs @@ -45,6 +45,9 @@ internal static class AgentFactory return s_agentMap; } + Console.WriteLine($"CXN: {config.BingConnectionId}"); + Console.WriteLine($"CXN: {config.Endpoint}"); + PersistentAgentsClient clientAgents = new(config.Endpoint, new AzureCliCredential()); AIProjectClient clientProjects = new(new Uri(config.Endpoint), new AzureCliCredential()); IKernelBuilder kernelBuilder = Kernel.CreateBuilder(); From 32b448c9a0204c0ab81368c7207f6478ec24f201 Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 13:58:38 -0700 Subject: [PATCH 22/25] Next pass --- dotnet/src/Shared/IntegrationTests/AzureAIConfiguration.cs | 2 +- .../DeclarativeCodeGenTest.cs | 4 ++-- .../DeclarativeWorkflowTest.cs | 2 +- .../Framework/AgentFactory.cs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dotnet/src/Shared/IntegrationTests/AzureAIConfiguration.cs b/dotnet/src/Shared/IntegrationTests/AzureAIConfiguration.cs index e1620ba5ba..cfdc7aff7b 100644 --- a/dotnet/src/Shared/IntegrationTests/AzureAIConfiguration.cs +++ b/dotnet/src/Shared/IntegrationTests/AzureAIConfiguration.cs @@ -11,5 +11,5 @@ internal sealed class AzureAIConfiguration public string DeploymentName { get; set; } - public string? BingConnectionId { get; set; } + public string BingConnectionId { get; set; } } diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs index 35c376d3dc..365994628a 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs @@ -23,8 +23,8 @@ public Task ValidateCaseAsync(string workflowFileName, string testcaseFileName) this.RunWorkflowAsync(Path.Combine(Environment.CurrentDirectory, "Workflows", workflowFileName), testcaseFileName); [Theory] - [InlineData("Marketing.yaml", "Marketing.json", Skip = "Needs configuration")] - [InlineData("MathChat.yaml", "MathChat.json", Skip = "Needs configuration")] + [InlineData("Marketing.yaml", "Marketing.json")] + [InlineData("MathChat.yaml", "MathChat.json")] [InlineData("DeepResearch.yaml", "DeepResearch.json", Skip = "Needs configuration")] [InlineData("HumanInLoop.yaml", "HumanInLoop.json", Skip = "Needs test support")] public Task ValidateScenarioAsync(string workflowFileName, string testcaseFileName) => diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs index 0bd814d8be..065aaaecce 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs @@ -25,7 +25,7 @@ public Task ValidateCaseAsync(string workflowFileName, string testcaseFileName) [Theory] [InlineData("Marketing.yaml", "Marketing.json")] [InlineData("MathChat.yaml", "MathChat.json")] - [InlineData("DeepResearch.yaml", "DeepResearch.json")] + [InlineData("DeepResearch.yaml", "DeepResearch.json", Skip = "Coming next")] [InlineData("HumanInLoop.yaml", "HumanInLoop.json", Skip = "Needs test support")] public Task ValidateScenarioAsync(string workflowFileName, string testcaseFileName) => this.RunWorkflowAsync(Path.Combine(GetRepoFolder(), "workflow-samples", workflowFileName), testcaseFileName); diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs index 1f8bde7081..d97a594d9c 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs @@ -46,7 +46,7 @@ internal static class AgentFactory } Console.WriteLine($"CXN: {config.BingConnectionId}"); - Console.WriteLine($"CXN: {config.Endpoint}"); + Console.WriteLine($"CXN: {new Uri(config.Endpoint).Host}"); PersistentAgentsClient clientAgents = new(config.Endpoint, new AzureCliCredential()); AIProjectClient clientProjects = new(new Uri(config.Endpoint), new AzureCliCredential()); From af16e7b71ac566996abb0c0bfef93b47d77261cb Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 14:33:16 -0700 Subject: [PATCH 23/25] Ok now --- .github/workflows/dotnet-build-and-test.yml | 4 ++++ .../FoundryAgent_Hosted_MCP/README.md | 4 ++-- .../GettingStarted/Workflows/Declarative/Program.cs | 2 +- .../GettingStarted/Workflows/Declarative/README.md | 10 ++++++++-- .../Agents/TestAgent.yaml | 2 +- workflow-samples/README.md | 2 +- workflow-samples/setup/AnalystAgent.yaml | 4 ++-- workflow-samples/setup/CoderAgent.yaml | 2 +- workflow-samples/setup/ManagerAgent.yaml | 2 +- workflow-samples/setup/QuestionAgent.yaml | 4 ++-- workflow-samples/setup/StudentAgent.yaml | 2 +- workflow-samples/setup/TeacherAgent.yaml | 2 +- workflow-samples/setup/WeatherAgent.yaml | 2 +- workflow-samples/setup/WebAgent.yaml | 4 ++-- 14 files changed, 28 insertions(+), 18 deletions(-) diff --git a/.github/workflows/dotnet-build-and-test.yml b/.github/workflows/dotnet-build-and-test.yml index 40675f4153..46065fdbd6 100644 --- a/.github/workflows/dotnet-build-and-test.yml +++ b/.github/workflows/dotnet-build-and-test.yml @@ -137,6 +137,10 @@ jobs: # Azure AI Foundry AzureAI__Endpoint: ${{ secrets.AZUREAI__ENDPOINT }} AzureAI__DeploymentName: ${{ vars.AZUREAI__DEPLOYMENTNAME }} + AzureAI__BingConnectionId: ${{ vars.AZUREAI__BINGCONECTIONID }} + FOUNDRY_PROJECT_ENDPOINT: ${{ vars.FOUNDRY_PROJECT_ENDPOINT }} + FOUNDRY_MODEL_DEPLOYMENT_NAME: ${{ vars.FOUNDRY_MODEL_DEPLOYMENT_NAME }} + FOUNDRY_CONNECTION_GROUNDING_TOOL: ${{ vars.FOUNDRY_CONNECTION_GROUNDING_TOOL }} # Generate test reports and check coverage - name: Generate test reports diff --git a/dotnet/samples/GettingStarted/ModelContextProtocol/FoundryAgent_Hosted_MCP/README.md b/dotnet/samples/GettingStarted/ModelContextProtocol/FoundryAgent_Hosted_MCP/README.md index df0854ba2f..e320a6c3d7 100644 --- a/dotnet/samples/GettingStarted/ModelContextProtocol/FoundryAgent_Hosted_MCP/README.md +++ b/dotnet/samples/GettingStarted/ModelContextProtocol/FoundryAgent_Hosted_MCP/README.md @@ -11,6 +11,6 @@ Before you begin, ensure you have the following prerequisites: Set the following environment variables: ```powershell -$env:AZURE_FOUNDRY_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project" # Replace with your Azure Foundry resource endpoint -$env:AZURE_FOUNDRY_PROJECT_DEPLOYMENT_NAME="gpt-4o-mini" # Optional, defaults to gpt-4o-mini +$env:FOUNDRY_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project" # Replace with your Azure Foundry resource endpoint +$env:FOUNDRY_MODEL_DEPLOYMENT_NAME="gpt-4.1-mini" # Optional, defaults to gpt-4.1-mini ``` diff --git a/dotnet/samples/GettingStarted/Workflows/Declarative/Program.cs b/dotnet/samples/GettingStarted/Workflows/Declarative/Program.cs index eb9266a1ba..da567b61d8 100644 --- a/dotnet/samples/GettingStarted/Workflows/Declarative/Program.cs +++ b/dotnet/samples/GettingStarted/Workflows/Declarative/Program.cs @@ -17,7 +17,7 @@ namespace Demo.DeclarativeWorkflow; /// /// /// Configuration -/// Define AZURE_FOUNDRY_PROJECT_ENDPOINT as a user-secret or environment variable that +/// Define FOUNDRY_PROJECT_ENDPOINT as a user-secret or environment variable that /// points to your Foundry project endpoint. /// Usage /// Provide the path to the workflow definition file as the first argument. diff --git a/dotnet/samples/GettingStarted/Workflows/Declarative/README.md b/dotnet/samples/GettingStarted/Workflows/Declarative/README.md index bf7e925015..711b5377c8 100644 --- a/dotnet/samples/GettingStarted/Workflows/Declarative/README.md +++ b/dotnet/samples/GettingStarted/Workflows/Declarative/README.md @@ -42,7 +42,13 @@ To set your secrets with .NET Secret Manager: 4. Define setting that identifies your Azure Foundry Project (endpoint): ``` - dotnet user-secrets set "AZURE_FOUNDRY_PROJECT_ENDPOINT" "https://..." + dotnet user-secrets set "FOUNDRY_PROJECT_ENDPOINT" "https://..." + ``` + +5. Define setting that identifies your Azure Foundry Model Deployment (endpoint): + + ``` + dotnet user-secrets set "FOUNDRY_MODEL_DEPLOYMENT_NAME" "https://..." ``` #### Authorization @@ -61,7 +67,7 @@ The sample workflows rely on agents defined in your Azure Foundry Project. To create agents, run the [`Create.ps1`](../../../../../workflow-samples/setup/) script. This will create the agents used in the sample workflows in your Azure Foundry Project and format a script you can copy and use to configure your environment. -> Note: `Create.ps1` relies upon the `AZURE_FOUNDRY_PROJECT_ENDPOINT` setting. +> Note: `Create.ps1` relies upon the `FOUNDRY_PROJECT_ENDPOINT` and `FOUNDRY_MODEL_DEPLOYMENT_NAME` settings. ## Execution diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/TestAgent.yaml b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/TestAgent.yaml index 2d41b2c5dd..a85f303577 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/TestAgent.yaml +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Agents/TestAgent.yaml @@ -2,4 +2,4 @@ type: foundry_agent name: BasicAgent description: Basic agent for integration tests model: - id: ${AzureAI:ModelDeployment} + id: ${FOUNDRY_MODEL_DEPLOYMENT_NAME} diff --git a/workflow-samples/README.md b/workflow-samples/README.md index c02eaca12a..eaa96d5c78 100644 --- a/workflow-samples/README.md +++ b/workflow-samples/README.md @@ -24,4 +24,4 @@ The sample workflows rely on agents defined in your Azure Foundry Project. To create agents, run the [`Create.ps1`](./setup) script. This will create the agents used in the sample workflows in your Azure Foundry Project and format a script you can copy and use to configure your environment. -> Note: `Create.ps1` relies upon the `AZURE_FOUNDRY_PROJECT_ENDPOINT` setting. See [README.md](../dotnet/samples/GettingStarted/Workflows/Declarative/README.md) from the demo for configuration details. +> Note: `Create.ps1` relies upon the `FOUNDRY_PROJECT_ENDPOINT` setting. See [README.md](../dotnet/samples/GettingStarted/Workflows/Declarative/README.md) from the demo for configuration details. diff --git a/workflow-samples/setup/AnalystAgent.yaml b/workflow-samples/setup/AnalystAgent.yaml index 233e65cb22..dbe6ba4b7a 100644 --- a/workflow-samples/setup/AnalystAgent.yaml +++ b/workflow-samples/setup/AnalystAgent.yaml @@ -2,9 +2,9 @@ type: foundry_agent name: ResearchAnalyst description: Demo agent for DeepResearch workflow model: - id: ${AzureAI:ModelDeployment} + id: ${FOUNDRY_MODEL_DEPLOYMENT_NAME} tools: - type: bing_grounding options: tool_connections: - - ${AzureAI:BingConnectionId} \ No newline at end of file + - ${FOUNDRY_CONNECTION_GROUNDING_TOOL} \ No newline at end of file diff --git a/workflow-samples/setup/CoderAgent.yaml b/workflow-samples/setup/CoderAgent.yaml index 36aa77a7cb..4d6e06b34c 100644 --- a/workflow-samples/setup/CoderAgent.yaml +++ b/workflow-samples/setup/CoderAgent.yaml @@ -2,6 +2,6 @@ type: foundry_agent name: ResearchCoder description: Demo agent for DeepResearch workflow model: - id: ${AzureAI:ModelDeployment} + id: ${FOUNDRY_MODEL_DEPLOYMENT_NAME} tools: - type: code_interpreter diff --git a/workflow-samples/setup/ManagerAgent.yaml b/workflow-samples/setup/ManagerAgent.yaml index 14f718fdf6..9402c4b922 100644 --- a/workflow-samples/setup/ManagerAgent.yaml +++ b/workflow-samples/setup/ManagerAgent.yaml @@ -2,4 +2,4 @@ type: foundry_agent name: ResearchManager description: Demo agent for DeepResearch workflow model: - id: ${AzureAI:ModelDeployment} + id: ${FOUNDRY_MODEL_DEPLOYMENT_NAME} diff --git a/workflow-samples/setup/QuestionAgent.yaml b/workflow-samples/setup/QuestionAgent.yaml index 1952259bd6..767a656138 100644 --- a/workflow-samples/setup/QuestionAgent.yaml +++ b/workflow-samples/setup/QuestionAgent.yaml @@ -2,9 +2,9 @@ type: foundry_agent name: Answer description: Demo agent for Question workflow model: - id: ${AzureAI:ModelDeployment} + id: ${FOUNDRY_MODEL_DEPLOYMENT_NAME} tools: - type: bing_grounding options: tool_connections: - - ${AzureAI:BingConnectionId} \ No newline at end of file + - ${FOUNDRY_CONNECTION_GROUNDING_TOOL} \ No newline at end of file diff --git a/workflow-samples/setup/StudentAgent.yaml b/workflow-samples/setup/StudentAgent.yaml index fa9c70c7d7..990befba79 100644 --- a/workflow-samples/setup/StudentAgent.yaml +++ b/workflow-samples/setup/StudentAgent.yaml @@ -7,4 +7,4 @@ instructions: |- Always incorporate the teacher's advice to fix your next response. You have the math-skills of a 6th grader. model: - id: ${AzureAI:ModelDeployment} + id: ${FOUNDRY_MODEL_DEPLOYMENT_NAME} diff --git a/workflow-samples/setup/TeacherAgent.yaml b/workflow-samples/setup/TeacherAgent.yaml index 27f2b2c761..d120c9cf3c 100644 --- a/workflow-samples/setup/TeacherAgent.yaml +++ b/workflow-samples/setup/TeacherAgent.yaml @@ -7,4 +7,4 @@ instructions: |- If the student has demonstrated comprehension and responded to all of your feedback, give the student your congraluations by using the word "congratulations". model: - id: ${AzureAI:ModelDeployment} + id: ${FOUNDRY_MODEL_DEPLOYMENT_NAME} diff --git a/workflow-samples/setup/WeatherAgent.yaml b/workflow-samples/setup/WeatherAgent.yaml index 500901997b..ac6b413163 100644 --- a/workflow-samples/setup/WeatherAgent.yaml +++ b/workflow-samples/setup/WeatherAgent.yaml @@ -2,7 +2,7 @@ type: foundry_agent name: ResearchWeather description: Demo agent for DeepResearch workflow model: - id: ${AzureAI:ModelDeployment} + id: ${FOUNDRY_MODEL_DEPLOYMENT_NAME} tools: - type: openapi id: GetCurrentWeather diff --git a/workflow-samples/setup/WebAgent.yaml b/workflow-samples/setup/WebAgent.yaml index af715d4215..283fd3c26c 100644 --- a/workflow-samples/setup/WebAgent.yaml +++ b/workflow-samples/setup/WebAgent.yaml @@ -7,9 +7,9 @@ instructions: |- Never generate a file. Avoid repeating yourself. model: - id: ${AzureAI:ModelDeployment + id: ${FOUNDRY_MODEL_DEPLOYMENT_NAME} tools: - type: bing_grounding options: tool_connections: - - ${AzureAI:BingConnectionId} \ No newline at end of file + - ${FOUNDRY_CONNECTION_GROUNDING_TOOL} \ No newline at end of file From f450abfa88677cbf28371e0dd7cd0a780a1b1821 Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 14:40:31 -0700 Subject: [PATCH 24/25] Cleanup --- .../Framework/AgentFactory.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs index d97a594d9c..6cd29a0854 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs @@ -45,9 +45,6 @@ internal static class AgentFactory return s_agentMap; } - Console.WriteLine($"CXN: {config.BingConnectionId}"); - Console.WriteLine($"CXN: {new Uri(config.Endpoint).Host}"); - PersistentAgentsClient clientAgents = new(config.Endpoint, new AzureCliCredential()); AIProjectClient clientProjects = new(new Uri(config.Endpoint), new AzureCliCredential()); IKernelBuilder kernelBuilder = Kernel.CreateBuilder(); From 9a07013d5d8fe664b28a907e72eab346aa9740e5 Mon Sep 17 00:00:00 2001 From: Chris Rickman Date: Wed, 1 Oct 2025 14:55:22 -0700 Subject: [PATCH 25/25] Test note --- .../DeclarativeCodeGenTest.cs | 2 +- .../DeclarativeWorkflowTest.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs index 365994628a..d3beda47ce 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs @@ -25,7 +25,7 @@ public Task ValidateCaseAsync(string workflowFileName, string testcaseFileName) [Theory] [InlineData("Marketing.yaml", "Marketing.json")] [InlineData("MathChat.yaml", "MathChat.json")] - [InlineData("DeepResearch.yaml", "DeepResearch.json", Skip = "Needs configuration")] + [InlineData("DeepResearch.yaml", "DeepResearch.json", Skip = "Long running")] [InlineData("HumanInLoop.yaml", "HumanInLoop.json", Skip = "Needs test support")] public Task ValidateScenarioAsync(string workflowFileName, string testcaseFileName) => this.RunWorkflowAsync(Path.Combine(GetRepoFolder(), "workflow-samples", workflowFileName), testcaseFileName); diff --git a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs index 065aaaecce..38c590fb43 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs @@ -25,7 +25,7 @@ public Task ValidateCaseAsync(string workflowFileName, string testcaseFileName) [Theory] [InlineData("Marketing.yaml", "Marketing.json")] [InlineData("MathChat.yaml", "MathChat.json")] - [InlineData("DeepResearch.yaml", "DeepResearch.json", Skip = "Coming next")] + [InlineData("DeepResearch.yaml", "DeepResearch.json", Skip = "Long running")] [InlineData("HumanInLoop.yaml", "HumanInLoop.json", Skip = "Needs test support")] public Task ValidateScenarioAsync(string workflowFileName, string testcaseFileName) => this.RunWorkflowAsync(Path.Combine(GetRepoFolder(), "workflow-samples", workflowFileName), testcaseFileName);