.NET: [BREAKING] Graduate HarnessAgent#7119
Draft
westey-m wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Graduates the .NET HarnessAgent surface in Microsoft.Agents.AI.Harness from [Experimental(MAAI001)] to stable by removing class-level experimental annotations, while keeping opt-in/preview capabilities explicitly marked at the individual option-property level so consumers still get MAAI001 only when enabling those features.
Changes:
- Removed class-level
[Experimental]fromHarnessAgent,HarnessAgentOptions, andChatClientHarnessExtensions(and removed now-unusedusingdirectives). - Added
[Experimental(MAAI001)]to 16 specificHarnessAgentOptionsproperties that opt into experimental/preview features (compaction, looping, file access/stores, background agents, shell). - Suppressed
MAAI001warnings within the harness project viaNoWarnso the harness can compose experimental building blocks internally without per-file pragmas.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| dotnet/src/Microsoft.Agents.AI.Harness/Microsoft.Agents.AI.Harness.csproj | Suppresses MAAI001 for this project’s compilation while still emitting experimental annotations to consumers. |
| dotnet/src/Microsoft.Agents.AI.Harness/HarnessAgentOptions.cs | Removes class-level experimental annotation and adds [Experimental] to the 16 opt-in/preview option properties. |
| dotnet/src/Microsoft.Agents.AI.Harness/HarnessAgent.cs | Removes class-level [Experimental] and cleans up now-unused experimental-related usings. |
| dotnet/src/Microsoft.Agents.AI.Harness/ChatClientHarnessExtensions.cs | Removes class-level [Experimental] and cleans up now-unused experimental-related usings for the AsHarnessAgent() entry point. |
5 tasks
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 & Context
The
HarnessAgent(inMicrosoft.Agents.AI.Harness) and its public surface were marked[Experimental(MAAI001)]while the harness was pre-release. As part of graduating the harness and its building blocks toward GA (tracked under #6964 / #7117), this PR promotes the coreHarnessAgentAPI out of experimental, while keeping the individual option properties that still engage experimental or preview features marked so callers are notified when they opt into those.Description & Review Guide
What are the major changes?
[Experimental]fromHarnessAgent,HarnessAgentOptions, andChatClientHarnessExtensions(AsHarnessAgent()), plus the now-unusedusingdirectives.HarnessAgentOptionsproperties that activate or configure a still-experimental / preview feature: compaction (MaxContextWindowTokens,MaxOutputTokens,CompactionStrategy,DisableCompaction), looping (LoopEvaluators,LoopAgentOptions), file store / file access (FileMemoryStore,FileAccessStore,FileAccessProviderOptions), background agents (BackgroundAgents,BackgroundAgentsProviderOptions), and shell (ShellExecutor,ShellToolName,ShellToolDescription,DisableShellToolApproval,ShellEnvironmentProviderOptions).<NoWarn>$(NoWarn);MAAI001</NoWarn>to the Harness project so the agent's own internal composition of those experimental building blocks compiles without per-file pragmas. This only affects this project's compilation; the[Experimental]attributes on the option properties are still emitted to consumers.What is the impact of these changes?
HarnessAgent,HarnessAgentOptions, andAsHarnessAgent()become part of the stable public API surface — callers no longer need to suppressMAAI001to use the agent. Opting into a still-experimental feature via the marked option properties continues to raiseMAAI001. Graduating public API out of experimental is a breaking change, hence the[BREAKING]prefix.Notes:
MaximumIterationsPerRequestis intentionally not marked — it configuresFunctionInvokingChatClient.MaximumIterationsPerRequest(GA), not the experimentalLoopAgent.Microsoft.Agents.AI.Harnesspackage itself remains pre-release; this PR builds on the ToolApproval (.NET: [BREAKING] Graduate ToolApprovalAgent and add ToolAutoApprovalRuleContext #7107) and FileMemory (.NET: [BREAKING] Graduate FileMemoryProvider #7114) graduations, andAgentFileStoreremains experimental (so the store properties stay marked).What do you want reviewers to focus on?
Whether the set of properties left marked
[Experimental]correctly matches the features that are still experimental/preview, and that nothing GA was accidentally marked (or vice versa).Related Issue
Related to #7117 (does not fully close it — the package is still pre-release and depends on the remaining graduation PRs).
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.