microsoft/Agents-for-net 1.5.181
microsoft/Agents-for-net
Captured source
source ↗v1.5 SDK Release
Repository: microsoft/Agents-for-net
Tag: 1.5.181
Published: 2026-04-30T17:01:17Z
Prerelease: no
Release notes:
What's Changed
New Features
Agent Testing Framework (Microsoft.Agents.Builder.Testing)
Re-introduced and significantly expanded the Builder.Testing package for agent unit and integration testing:
- `AgentTestHost`: DI-based test harness for end-to-end agent testing with full service container support.
- `TestAdapter.Create`: Static factory method for easy adapter construction with proper
ConversationReferencedefaults. - `IResponseValidator` / `SemanticValidator`: Interface and AI-backed implementation for validating agent replies semantically (e.g., against an LLM judge).
- `TestFlow` enhancements:
AssertNoMoreReplies,AssertTypingIndicator,AssertReplySatisfies(async delegate andIResponseValidatoroverloads),SendConversationUpdateoverload acceptingIEnumerable. - `WeatherAgent` sample test: Demonstrates AI-backed response validation using SemanticKernel.
- Added README documentation for the testing package.
Streaming: Feedback Loop Support
StreamingResponsenow supports aFeedbackLoopproperty, allowing agents to signal feedback loop state in streaming responses.FeedbackLoopEnabledadded toIStreamingResponseinterface with full unit test coverage.- Teams channel now supports streaming for agentic requests (#782).
Proactive Messaging
AgentApplication.Proactivesupport added (#694), enabling agents to initiate proactive conversations.
Typing Worker (TypingWorker) (#766)
- New typing timer implementation with improved reliability.
TypingWorkernow handles restarting cleanly when the timer needs to be reset mid-turn.- Added
OnDeleteActivityandOnUpdateActivityhandling so the typing indicator stops correctly when activities are deleted or updated. ITypingChannelStrategynow exposes a Typing Activity factory, enabling channel-specific typing activity construction.
Government Cloud Support
- Added government cloud authentication constants,
RestChannelServiceClientFactorysettings,AgentClaimsupdates, and sample AspNet auth changes to support sovereign cloud deployments (#771).
Telemetry / OpenTelemetry
- New telemetry infrastructure across the SDK:
- Connector instrumentation: HTTP spans for connector client calls.
- Storage instrumentation: OpenTelemetry spans for storage read/write operations.
- `ChannelResponseHandler` instrumentation: Activity tracing for response handling.
- Distributed tracing: Improved
CloneActivityfor better trace context propagation. - Removed old OTelAgent sample in favor of integrated instrumentation throughout the SDK.
Orchestrated Client (Microsoft.Agents.CopilotStudio.Client)
New OrchestratedClient added to Microsoft.Agents.CopilotStudio.Client for calling Copilot Studio agents via the External Orchestration API. The client handles conversation lifecycle, passes conversation ID and client request ID headers automatically, supports strongly-typed error codes (OrchestratedErrorCode), and accepts OrchestratedRequestProperties for injecting additional HTTP headers. An end-to-end sample is included.
Teams: Targeted Messaging
- Sending a targeted message (e.g., to a specific user in a group chat) now throws if the conversation is not a group chat, providing clear feedback rather than silently failing.
---
Improvements
CloudAdapter / Channel Adapter
- `ChannelAdapter` base class: Extracted common
IChannelAdapterbehavior fromCloudAdapterinto a newChannelAdapterbase class, reducing duplication and improving extensibility (#759). - `BackgroundTaskQueue`: Replaced
Task.Runusage with a proper background task queue for non-blocking request handling (#736). - `ChannelResponseQueue` fixes: Resolved race conditions in
CompleteHandlerForRequestand response queue handling;HandleResponsesAsyncnow properly waits for start before completing. - `HostedActivityService`: Changed from
Task.RuntoTask.ContinueWithfor improved threading behavior. - Race condition fixes: Fixed race in
ChannelResponseQueueandTestAdapter.GetNextReplyAsync.
Serialization / JSON
- Source-generation extensibility: Added
ProtocolJsonSerializer.AddTypeInfoResolver()for plugging inJsonSerializerContextinstances from source generators (#756). - `CoreJsonContext`: New source-generated
JsonSerializerContextwired into the default resolver chain, covering core model types. - `DictionaryOfObjectConverter`: Now handles list/array values correctly (#752).
- Converter cleanup: Migrated model converters to
JsonContextand removed now redundant converters. - `ProtocolJsonSerializer.ToObject`: Catch-all conversion now converts to
JsonElementfirst for better type fidelity (#749).
Routing
- Route builders:
Event,Invoke, andTyperoute builders now accept bothname/typestring overloads and custom selector delegates, with duplicate registration detection (#746). - `RouteList`: Switched to
ReaderWriterLockSlimfor improved thread safety under concurrent route registration. - Agentic route ordering: Added integration tests verifying correct ordering of agentic routes (#767).
OAuth / Authentication
- `AgenticUserAuthorization`: Now retrieves both AI and AU (user) tokens in a single authorization step (#769).
- `RestChannelServiceClientFactory`: Now properly defaults
AudienceandScopesfrom configuration rather than relying onConnection.Scopefor BotFramework connections (#750). - `BotServiceAudience` setting: Added to
RestChannelServiceClientFactoryfor explicit audience configuration (#772). - `UserAuthorization`: Fixed to always return a valid
InvokeResponse(#712). - Auth audience bug fix: Fixed audience not being passed to
ChannelServiceFactory.CreateUserTokenClientAsync.
Connector
- Refactoring (no breaking changes): Internal cleanup of
Microsoft.Agents.Connectorfor improved maintainability (#757). - URL encoding:
ConversationAPI methods now URL-encode path arguments correctly. - `AgentClaims`: Obsoleted confusingly-named methods with clearer replacements; improved XML documentation (#768).
Startup Simplification (#789)
ServiceCollectionExtensionsrefactored to expose two distinct API surfaces: one forIHostApplicationBuilder...
Excerpt shown — open the source for the full document.
Notability
notability 4.0/10Routine library version update, no major new features or traction.