Upgrade agent framework and semantic kernel .NET versions and remove E2E workflows#306
Merged
Merged
Conversation
…ity instrumentation - Upgraded Microsoft.Agents.A365.*, Microsoft.OpenTelemetry, Azure.AI.OpenAI, and related packages to GA 1.0.0 releases - Added end-to-end tracing with InvokeAgentScope (per turn) and ExecuteToolScope (per tool call) - Refactored DateTimeFunctionTool to instance class with DI for observability support - Migrated from AgentThread to AgentSession for conversation state management - Expanded appsettings.json with Agent365Observability config section; clarified Blueprint vs Agent Identity placeholders
Removed Agent365 tracing/scoping dependencies and related code from MyAgent.cs, including input/output message recording and AgentDetails usage. Renamed thread to session for clarity. In Program.cs, removed custom OpenTelemetry activity source registration and unused imports. Updated WeatherLookupTool.cs to serialize ToolCallDetails arguments using System.Text.Json. Updated appsettings.json with a clearer OpenWeatherApiKey placeholder and removed EnableAgent365Exporter.
Extract AgentDetails construction logic into a new AgentDetailsHelper class to eliminate code duplication in DateTimeFunctionTool and WeatherLookupTool. This centralizes configuration-based AgentDetails creation, improving maintainability and code clarity.
- Replace custom A365 observability wrappers (AgentMetrics, A365OtelWrapper, AgentDetailsHelper) with zero-code auto-instrumentation via UseMicrosoftOpenTelemetry(); explicitly re-enable HTTP, ASP.NET Core, and Azure SDK instrumentation suppressed by Agent365-only export mode - Remove ExecuteToolScope/ToolCallDetails blocks from WeatherLookupTool and DateTimeFunctionTool; remove IExporterTokenCache<AgenticTokenStruct> from MyAgent constructor; remove ObservabilityAuthHandlerName and InvokeObservedAgentOperation wrappers from all three activity handlers - Keep .UseOpenTelemetry(sourceName: null, ...) on ChatClientAgent builder to preserve gen_ai.* semantic attributes (model, tools, messages, token counts) on Azure OpenAI call spans - Add Observability section to README and design.md documenting the spans produced, OTEL_SERVICE_NAME env var, and why no custom tracing code is needed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Agent.cs - Remove redundant null-conditional on turnContext (non-null guaranteed by guard at top of OnMessageAsync) at lines 234 and 250 - Use StringBuilder to accumulate userText in the attachment loop instead of repeated string concatenation - Use LINQ Where filter in WelcomeMessageAsync instead of foreach + inner if Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The loop variable was unused after moving the filter into .Where(); replace with var _ to suppress the "useless assignment" code scanning warning. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Dependency ReviewThe following issues were found:
License Issuesdotnet/agent-framework/sample-agent/AgentFrameworkSampleAgent.csproj
dotnet/semantic-kernel/sample-agent/SemanticKernelSampleAgent.csproj
OpenSSF ScorecardScorecard details
Scanned Files
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the .NET Agent Framework and Semantic Kernel samples to newer SDK/package versions and switches observability to the Microsoft.OpenTelemetry distro, while significantly simplifying the GitHub Actions “E2E” workflows by removing the prior PowerShell-based end-to-end orchestration and .NET E2E test execution.
Changes:
- Upgrade .NET agent dependencies (Agents SDK, Semantic Kernel, Azure Identity/OpenAI packages) and adjust code to newer APIs (e.g., session-based conversation state).
- Replace/trim custom observability plumbing (custom metrics/wrappers) in favor of
builder.UseMicrosoftOpenTelemetry(...)plusUseOpenTelemetry()on the chat client/agent builders. - Remove bearer token acquisition, agent lifecycle management, and .NET E2E test runs from the e2e-* GitHub Actions workflows (leaving build/dependency verification + SDK version logging).
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/semantic-kernel/sample-agent/telemetry/AgentOTELExtensions.cs | Removes Aspire/OpenTelemetry service-defaults helper (file deleted). |
| dotnet/semantic-kernel/sample-agent/telemetry/A365OtelWrapper.cs | Drops exporter token-cache registration from wrapper invocation. |
| dotnet/semantic-kernel/sample-agent/SemanticKernelSampleAgent.csproj | Upgrades SK + Agents packages; replaces explicit OTEL package set with Microsoft.OpenTelemetry. |
| dotnet/semantic-kernel/sample-agent/Program.cs | Switches startup telemetry to UseMicrosoftOpenTelemetry; removes prior A365 tracing setup + custom HTTP tracing wrapper usage. |
| dotnet/semantic-kernel/sample-agent/Agents/MyAgent.cs | Removes token-cache DI usage; updates wrapper calls accordingly. |
| dotnet/agent-framework/sample-agent/Tools/DateTimeFunctionTool.cs | Refactors datetime tool from static function to instance method and renames API. |
| dotnet/agent-framework/sample-agent/telemetry/AgentMetrics.cs | Removes custom telemetry helper (file deleted). |
| dotnet/agent-framework/sample-agent/telemetry/A365OtelWrapper.cs | Removes custom A365 OTEL wrapper (file deleted). |
| dotnet/agent-framework/sample-agent/README.md | Documents the new Microsoft.OpenTelemetry distro-based observability approach. |
| dotnet/agent-framework/sample-agent/Program.cs | Adds UseMicrosoftOpenTelemetry distro configuration; removes custom HTTP tracing wrapper usage. |
| dotnet/agent-framework/sample-agent/docs/design.md | Updates design doc to reflect distro-based auto-instrumentation and session-based flow. |
| dotnet/agent-framework/sample-agent/appsettings.json | Updates placeholders/config for auth + AI settings; adds Agent365Observability section. |
| dotnet/agent-framework/sample-agent/AgentFrameworkSampleAgent.csproj | Pins newer stable versions for Agent365 packages + upgrades Azure/Agents/Extensions.AI packages. |
| dotnet/agent-framework/sample-agent/Agent/MyAgent.cs | Migrates thread→session, updates tool registration and chat history plumbing, removes custom observability wrapper usage. |
| .github/workflows/e2e-python-openai.yml | Removes bearer token/config generation/agent start/E2E test execution; retains setup + dependency install + SDK version logging. |
| .github/workflows/e2e-python-agent-framework.yml | Same simplification as python-openai workflow. |
| .github/workflows/e2e-nodejs-openai.yml | Removes E2E orchestration and .NET E2E test run; retains setup + build + SDK version logging. |
| .github/workflows/e2e-nodejs-langchain.yml | Removes E2E orchestration and .NET E2E test run; retains setup + build + SDK version logging. |
| .github/workflows/e2e-dotnet-semantic-kernel.yml | Removes bearer token/config generation/agent start/E2E test execution; retains restore/build + SDK version logging. |
| .github/workflows/e2e-dotnet-agent-framework.yml | Removes bearer token/config generation/agent start/E2E test execution; retains restore/build + SDK version logging. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
….GetCurrentDateTime Agent-Logs-Url: https://github.com/microsoft/Agent365-Samples/sessions/a2eca8a7-110d-43e3-9b47-787442d25c08 Co-authored-by: gwharris7 <96964444+gwharris7@users.noreply.github.com>
sellakumaran
approved these changes
May 6, 2026
ajmfehr
approved these changes
May 6, 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.
This pull request significantly simplifies the GitHub Actions E2E workflow files for .NET and Node.js agents by removing a large number of PowerShell-based setup, agent management, and test orchestration steps. The workflows no longer acquire bearer tokens, generate configuration files, start and verify agent processes, or run .NET-based E2E tests. As a result, the CI pipelines are streamlined but will no longer perform the previous end-to-end test orchestration or artifact collection.
Key changes by workflow:
General Workflow Simplification
.envorappsettings.json), copying manifests, starting/stopping agents, verifying agent health, running .NET E2E tests, emitting test conversations, capturing agent logs, and uploading test results artifacts from the following workflow files:.github/workflows/e2e-dotnet-agent-framework.yml.github/workflows/e2e-dotnet-semantic-kernel.yml.github/workflows/e2e-nodejs-openai.yml.github/workflows/e2e-nodejs-langchain.ymlImpact on .NET Workflows
Impact on Node.js Workflows
Test and Artifact Handling
Configuration and Credential Management