Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions declarative-agents/workflow-samples/DeepResearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -264,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
Expand Down
19 changes: 13 additions & 6 deletions dotnet/samples/03-workflows/Declarative/DeepResearch/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Comment thread
peibekwe marked this conversation as resolved.
Comment thread
peibekwe marked this conversation as resolved.
Description = "The available team members and their capabilities.",
}
}
};

private static DeclarativeAgentDefinition DefineManagerAgent(IConfiguration configuration) =>
Expand All @@ -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)
Expand Down
Loading