Skip to content

feat(dotnet): support incremental group-chat replies - #8481

Open
Jitendra Singh (singh4jitendra) wants to merge 1 commit into
microsoft:mainfrom
singh4jitendra:feat/dotnet-group-chat-streaming
Open

Jitendra Singh (singh4jitendra) wants to merge 1 commit into
microsoft:mainfrom
singh4jitendra:feat/dotnet-group-chat-streaming

Conversation

@singh4jitendra

@singh4jitendra Jitendra Singh (singh4jitendra) commented Nov 13, 2026 •

Copy link
Copy Markdown

Why are these changes needed?

Group chats currently call GenerateReplyAsync even when a selected member supports incremental replies. Add opt-in streaming without changing existing non-streaming behavior:

  • Introduce IStreamingGroupChat, implemented by GroupChat and inherited by RoundRobinGroupChat, without adding requirements to existing IGroupChat implementations.
  • Add CallStreamingAsync and the SendStreamingAsync extension.
  • Forward partial text/tool updates immediately and emit one completed reply per turn. Only completed replies enter the history supplied to later speakers.
  • Preserve authoritative complete replies, including tool-call IDs and tool-result aggregates, and support non-streaming members.
  • Apply turn limits and termination to completed replies, forward cancellation to orchestration and generation, and dispose agent iterators on cancellation or early consumer exit.
  • Report empty agent streams explicitly and propagate generation failures.
  • Document usage and history handling.

Validation:

  • dotnet test .\FocusedTests.csproj --configuration Release --no-restore --verbosity minimal - passed, 21 tests: 17 new streaming cases and 4 existing non-streaming group-chat cases. The external focused project links the actual repository test files and references the actual AutoGen.Core project.
  • dotnet build .\prs\group-streaming\dotnet\src\AutoGen.Core\AutoGen.Core.csproj --configuration Release --no-restore --verbosity minimal - passed for netstandard2.0 and net8.0, with no warnings or errors.
  • dotnet format .\prs\group-streaming\dotnet\src\AutoGen.Core\AutoGen.Core.csproj --verify-no-changes --no-restore --include .\prs\group-streaming\dotnet\src\AutoGen.Core\GroupChat\GroupChat.cs .\prs\group-streaming\dotnet\src\AutoGen.Core\GroupChat\IStreamingGroupChat.cs .\prs\group-streaming\dotnet\src\AutoGen.Core\Extension\GroupChatExtension.cs --verbosity minimal - passed.
  • dotnet format .\FocusedTests.csproj --verify-no-changes --no-restore --include ..\..\prs\group-streaming\dotnet\test\AutoGen.Tests\GroupChat\GroupChatStreamingTests.cs --verbosity minimal - passed.

The core multi-target build and implementation formatting used .NET 9. Focused test execution used the installed .NET 10 SDK and .NET 8 runtime. The full legacy test suite could not be restored because NuGet.org TLS handshakes fail in this environment and the accessible Microsoft mirror lacks Microsoft.SemanticKernel.Agents.Core. The documentation site build was not run.

Related issue number

Closes #3076

Checks

@singh4jitendra

Copy link
Copy Markdown
Author

Xiaoyun Zhang (@LittleLittleCloud), could you please review this opt-in .NET group-chat streaming implementation for #3076, or suggest the appropriate reviewer? Existing non-streaming APIs remain unchanged; 21 focused tests pass and both core target frameworks build successfully. The CLA and security checks have passed. I understand the maintenance status and would appreciate guidance on whether this feature can be considered. Thank you.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[.Net][Feature Request]: Enable streaming response in group chat

1 participant