From 1349e2b79a4adb4f5e4f99740ebcc37ec97cf296 Mon Sep 17 00:00:00 2001 From: Peter Ibekwe Date: Fri, 14 Aug 2026 15:20:00 -0700 Subject: [PATCH 1/2] Fix declarative workflows deep research sample --- .../workflow-samples/DeepResearch.yaml | 3 +++ .../Declarative/DeepResearch/Program.cs | 19 +++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/declarative-agents/workflow-samples/DeepResearch.yaml b/declarative-agents/workflow-samples/DeepResearch.yaml index ddc2403afc..c656d705b4 100644 --- a/declarative-agents/workflow-samples/DeepResearch.yaml +++ b/declarative-agents/workflow-samples/DeepResearch.yaml @@ -14,6 +14,9 @@ # - Knowledge Agent: Performs generic web searches. # - Coder Agent: Able to write and execute code. # - Weather Agent: Provides weather information. +# +# Example input: +# Find the current temperatures in Seattle and San Francisco, calculate the difference in Celsius and Fahrenheit, and recommend what clothing to pack for each city. # kind: Workflow maxTurns: 500 diff --git a/dotnet/samples/03-workflows/Declarative/DeepResearch/Program.cs b/dotnet/samples/03-workflows/Declarative/DeepResearch/Program.cs index bbf388737d..2d3a2dda59 100644 --- a/dotnet/samples/03-workflows/Declarative/DeepResearch/Program.cs +++ b/dotnet/samples/03-workflows/Declarative/DeepResearch/Program.cs @@ -123,20 +123,27 @@ 4. EDUCATED GUESSES private static DeclarativeAgentDefinition DefinePlannerAgent(IConfiguration configuration) => new(configuration.GetValue(Application.Settings.FoundryModel)) { - Instructions = // TODO: Use Structured Inputs / Prompt Template + Instructions = """ Your only job is to devise an efficient plan that identifies (by name) how a team member may contribute to addressing the user request. Only select the following team which is listed as "- [Name]: [Description]" - - WeatherAgent: Able to retrieve weather information - - CoderAgent: Able to write and execute Python code - - KnowledgeAgent: Able to perform generic websearches + {{team}} The plan must be a bullet point list must be in the form "- [AgentName]: [Specific action or task for that agent to perform]" Remember, there is no requirement to involve the entire team -- only select team member's whose particular expertise is required for this task. - """ + """, + StructuredInputs = + { + ["team"] = + new StructuredInputDefinition + { + IsRequired = true, + Description = "The available team members and their capabilities.", + } + } }; private static DeclarativeAgentDefinition DefineManagerAgent(IConfiguration configuration) => @@ -151,7 +158,7 @@ private static DeclarativeAgentDefinition DefineManagerAgent(IConfiguration conf - WeatherAgent: Able to retrieve weather information To make progress on the request, please answer the following questions, including necessary reasoning: - - Is the request fully satisfied? (True if complete, or False if the original request has yet to be SUCCESSFULLY and FULLY addressed) + - Is the request fully satisfied? (True if the requested work is complete and enough information is available to provide the final answer. A verified negative or empty result, such as confirming that a requested resource does not exist, can fully satisfy the request. False if work remains or if a negative or empty result may be caused by an execution, authorization, connectivity, or investigation failure.) - Are we in a loop where we are repeating the same requests and / or getting the same responses from an agent multiple times? Loops can span multiple turns, and can include repeated actions like scrolling up or down more than a handful of times. - Are we making forward progress? (True if just starting, or recent messages are adding value. False if recent messages show evidence of being stuck in a loop or if there is evidence of significant barriers to success such as the inability to read from a required file) - Who should speak next? (select from: KnowledgeAgent, CoderAgent, WeatherAgent) From 17d4a5e62bfd537de53a2cae4321d1cbf8364dd2 Mon Sep 17 00:00:00 2001 From: Peter Ibekwe Date: Fri, 14 Aug 2026 16:34:53 -0700 Subject: [PATCH 2/2] Address PR comments --- declarative-agents/workflow-samples/DeepResearch.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/declarative-agents/workflow-samples/DeepResearch.yaml b/declarative-agents/workflow-samples/DeepResearch.yaml index c656d705b4..09b29c33ac 100644 --- a/declarative-agents/workflow-samples/DeepResearch.yaml +++ b/declarative-agents/workflow-samples/DeepResearch.yaml @@ -267,14 +267,14 @@ trigger: output: messages: Local.Plan input: + arguments: + team: =Local.TeamDescription messages: |- =UserMessage( "Please briefly explain what went wrong on this last run (the root cause of the failure), and then come up with a new plan that takes steps and/or includes hints to overcome prior challenges and especially avoids repeating the same mistakes. - As before, the new plan should be concise, be expressed in bullet-point form, and consider the following team composition - (do not involve any other outside people since we cannot contact anyone else): - - {Local.TeamDescription}") + As before, the new plan should be concise, be expressed in bullet-point form, and only involve the team members already described + (do not involve any other outside people since we cannot contact anyone else).") - kind: SetTextVariable id: setVariable_jW7tmM