.NET: Adding default providers and tools to HarnessAgent#5896
Open
westey-m wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds default HarnessAgent capabilities so agents get common providers, tools, and decorators out of the box, with options to opt out and separate harness-level instructions from agent-specific instructions.
Changes:
- Adds default ToolApproval, OpenTelemetry, WebSearch, Todo, AgentMode, FileMemory, FileAccess, and AgentSkills configuration to
HarnessAgent. - Adds
HarnessAgentOptionsswitches and custom store/source options for those defaults. - Updates harness samples and unit tests to reflect the new default behavior.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
dotnet/src/Microsoft.Agents.AI.Harness/HarnessAgent.cs |
Builds default agent decorators, tools, context providers, and instruction composition. |
dotnet/src/Microsoft.Agents.AI.Harness/HarnessAgentOptions.cs |
Adds opt-out flags and customization properties for default harness features. |
dotnet/src/Microsoft.Agents.AI/Harness/AgentMode/AgentModeProvider.cs |
Expands default plan/execute mode instructions and formatting. |
dotnet/src/Microsoft.Agents.AI/Harness/FileMemory/FileMemoryProvider.cs |
Refines memory guidance text. |
dotnet/src/Microsoft.Agents.AI/Harness/Todo/TodoProvider.cs |
Refines todo guidance text. |
dotnet/tests/Microsoft.Agents.AI.Harness.UnitTests/HarnessAgentTests.cs |
Updates existing tests and adds coverage for default feature inclusion/exclusion. |
dotnet/tests/Microsoft.Agents.AI.Harness.UnitTests/HarnessAgentOptionsTests.cs |
Adds option default and set/get coverage for new properties. |
dotnet/samples/02-agents/Harness/Harness_Step01_Research/Program.cs |
Simplifies research sample to rely on new HarnessAgent defaults. |
dotnet/samples/02-agents/Harness/Harness_Step02_Research_WithSubAgents/Program.cs |
Updates sub-agent sample to use built-in web search and disable unused defaults. |
dotnet/samples/02-agents/Harness/Harness_Step03_DataProcessing/Program.cs |
Updates data processing sample to rely on default file access. |
dotnet/samples/02-agents/Harness/Harness_Step03_DataProcessing/README.md |
Documents the updated default file access behavior and sample data location. |
dotnet/samples/02-agents/Harness/Harness_Step03_DataProcessing/Harness_Step03_DataProcessing.csproj |
Removes old sample data copy item. |
dotnet/samples/02-agents/Harness/Harness_Step03_DataProcessing/working/sales.csv |
Adds sample CSV data under the default working folder. |
Comments suppressed due to low confidence (1)
dotnet/src/Microsoft.Agents.AI/Harness/AgentMode/AgentModeProvider.cs:91
- Use the American English spelling "judgment" here for consistency with the repository's documentation style.
2. Work autonomously — use your best judgement to make decisions and keep progressing without asking the user questions. The goal is to have a complete, useful result ready when the user returns.
lokitoth
approved these changes
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
We want the HarnessAgent to come with a set of default tools. Adding a set of providers and tools to the HarnessAgent to allow it to do a lot of work out of the box, with opt-outs for each feature.
Description
Contribution Checklist