What's Changed
New Features
Slack Extension (Microsoft.Agents.Extensions.Slack)
New first-class Slack channel extension, enabling agents to communicate directly with Slack without requiring Azure Bot Service as an intermediary:
SlackAgentExtension: Extension class with routing helpers (OnSlackMessage,OnSlackEvent*) for handling Slack-specific events and messages.SlackStream: Streaming support for Slack, allowing agents to stream responses back to Slack channels.SlackApi: Low-level Slack API client for direct Slack Web API calls.SlackChannelData: Strongly-typed channel data model withPayloadsupport for action events.MapSlackEndpoints: ASP.NET Core endpoint routing for Slack event subscriptions and interactions.SlackExtensionAttribute: Source-generated attribute for declarative Slack event routing.- Includes a full
SlackAgentsample demonstrating streaming, event handling, and action payloads.
Named Pipe Transport (Microsoft.Agents.Hosting.DirectLine.NamedPipes)
New Named Pipe transport layer for high-performance local inter-process agent communication:
NamedPipeProtocol: Binary protocol with chunked transfer, payload size limits, and content-type negotiation.NamedPipeTransport: Reliable duplex transport with disconnect handling and error recovery.NamedPipeMessageHandler: Activity message handler with streaming attachment support.NamedPipeHostedService:IHostedServiceimplementation for ASP.NET Core integration.- Enforces payload size limits and handles large object heap (LOH) pressure via 64 KB chunked trailing-byte drain.
- Idempotent
DisposeAsyncto preventObjectDisposedExceptionon double-dispose. - Comprehensive test coverage for chunking, content type handling, end flag semantics, boundary conditions, and streaming behavior.
Declarative Route Attributes (AgentApplicationAttributes)
New attribute-based routing model for agent handlers, complementing the existing fluent API:
AgentExtensionAttribute: Base attribute for agent extension registration with source-generated routing viaAgentExtensionSourceGenerator.- Route builder base classes:
ConversationUpdateRouteBuilderBase,EventRouteBuilderBase,FeedbackRouteBuilderBase,HandoffRouteBuilderBase,MessageRouteBuilderBase,TypeRouteBuilderBase— enabling extensible, attribute-driven route registration. IRouteAttribute: Public interface for custom route attributes.- Full test coverage for attribute-based routing.
Agentic Header Propagation
AgenticHeaderProvider/IHeaderValueProvider: New infrastructure for propagating agentic context headers across agent-to-agent calls.- Enables forwarding of correlation and orchestration headers through the call chain.
- Integrated in the
AgentAIsample.
OAuth Sign-In Cancellation
TeamsSignInInProgressMessage: New message shown to Teams users when a sign-in flow is already in progress.- Added cancel options allowing users to abort an in-progress OAuth flow.
Authentication: IdentityProxyManager Auth Type
- New
AuthTypes.IdentityProxyManagerreplaces theUserManagedIdentity+EnableContainerIMDScombination with a single, clearer auth type for container identity proxy scenarios.
Authentication: Azure Region Support
AzureRegionhandling added toMsalAuth, enabling region-aware token acquisition for improved latency and resilience.
Improvements
ServiceUrl Validation
- Added optional
Activity.ServiceUrlcheck against theserviceurlclaim in authentication for defense-in-depth validation. - Graceful handling of invalid
ServiceUrlformat instead of throwing unhandled exceptions. - Removed unnecessary
DeliveryModeguard inValidateServiceUrl.
AgentState Thread Safety
- Switched
AgentStateto lock-based concurrency to preserve serialization order and prevent crashes under streaming workloads. - Added argument validation and comprehensive locking across
AgentStateoperations. - New
AgentStateThreadSafetyTestsandAgentStateValidationTeststest suites.
Serialization / JSON
DictionaryOfObjectConverter: Fixed round-trip for primitive arrays inIDictionary<string, object>— complex types are excluded from primitive array promotion to preserve existing shape for callers expectingIList.DictionaryOfObjectConverter: Fixed crash on 2D arrays inIDictionary<string, object>.- Added comprehensive
DictionaryOfObjectConverterunit tests.
Proactive Messaging Instrumentation
- New OpenTelemetry scopes for proactive operations:
ContinueConversation,CreateConversation,DeleteConversation,GetConversation,SendActivity,StoreConversation. - Proactive services are now registered on the
TurnContextinProactive.OnTurnAsync.
Route Builders
- Refactored core route builders (
ConversationUpdateRouteBuilder,EventRouteBuilder) to use base classes, enabling future extensibility. - Added
protectedconstructors to route builder base classes for subclassing. - Fixed
ChannelIdwildcard to include subchannel matching.
Logging
CloudAdapterLog: New structured log class forCloudAdapteroperations.- Changed
LogNoRouteMatchedfromInformationtoDebuglevel to reduce log noise. - Surface
OAuthHandlersdelegate errors in route JSON output for easier diagnostics. - Added
BeginScopetoCloudAdapterandHostedActivityServicefor structured log correlation.
Connector
ConversationsRestClient: Sanitize truncated agents-channel conversation IDs (#840).GetConversationReference: Added parameterless overload.- Wrapping the returned task for
DeleteConversation. - Null or whitespace check for audience when creating
ConnectorClient.
Startup
AgentApplicationnow defaults toMemoryStorageif noIStorageis registered, eliminating the most common startup misconfiguration.HttpClientFactoryadded toAgentApplicationOptions.
OAuth Flow
- Changed OAuth flow to not rely on exceptions for control flow, improving performance and debuggability.
- Added
OAuthFlowResulttype for structured flow outcomes.
TypingWorker
- Fixed race condition in
TypingWorkerunder concurrent turns.
ObjectPath
- Fixed
ObjectPathissues and added comprehensive unit tests.
Bug Fixes
AgentStatethread-safety crash under streaming (#841): Concurrent streaming operations could corruptAgentStatedue toConcurrentDictionarynot preserving serialization order forDictionaryOfObjectConverter. Switched to lock-based concurrency to fix.DictionaryOfObjectConvertercrash on primitive arrays: Primitive arrays inIDictionary<string, object>were not round-tripping correctly, causing data loss or runtime exceptions. Fixed array promotion logic.DictionaryOfObjectConvertercrash on 2D arrays: Multi-dimensional arrays inIDictionary<string, object>would throw during deserialization. Added proper nested array handling.- Truncated conversation IDs (#840): Agents-channel conversation IDs could be truncated in
ConversationsRestClient, causing 404s or misrouted messages. IDs are now sanitized before use. - Citation icon names (#823): Added Microsoft OneNote and SharePoint to AI Citation icon names, fixing deserialization failures for activities from Copilot Studio.
- Fix for #827.
StreamingResponsefinal message regression: Fixed regression inStreamingResponsefinal message handling introduced during v1.5.x.CultureNotFoundExceptioninTypeExtensions: Fixed crash duringBotStateserialization when running under certain culture settings.SerializationInitrace conditions: Fixed races inSerializationInitpaths, including improper initialization in the SharePoint extension.TypingWorkerrace condition: Fixed race inTypingWorkerthat could cause missed or duplicate typing indicators under concurrent turns.
Infrastructure & Tooling
- Bumped .NET SDK from 8.0.420 to 8.0.422.
- Updated pull request workflows to include
rel/**branches (#804). - Added
AnalyzerReleasesshipped/unshipped tracking files toCore.Analyzers. - Added extensive test coverage across
Authentication,Slack,AgentState,NamedPipe,Route, andDictionaryOfObjectConverter. - Using
launchSettingsconsistently for sample projects. - Added architecture diagrams, copilot instructions, and developer documentation.
Full Changelog: v1.5.184...v1.6.150