.NET: Replace MAF AG-UI abstractions with the AG-UI C# SDK abstractions#6653
.NET: Replace MAF AG-UI abstractions with the AG-UI C# SDK abstractions#6653javiercn wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Migrates the .NET AG-UI integration from Microsoft Agent Framework’s in-tree Microsoft.Agents.AI.AGUI protocol implementation to the external AGUI.* C# SDK packages, keeping only the ASP.NET Core hosting glue in-tree while updating tests and samples accordingly.
Changes:
- Added central package versions and project
PackageReferences forAGUI.Abstractions/Client/Server/...and removed theMicrosoft.Agents.AI.AGUIproject from solutions/samples/tests. - Re-pointed
Microsoft.Agents.AI.Hosting.AGUI.AspNetCoreendpoint mapping to useRunAgentInput.ToChatRequestContext(...)+ChatResponseUpdateAGUIExtensions.AsAGUIEventStreamAsync(...), with net10 usingTypedResults.ServerSentEvents. - Updated integration tests and samples to use the new
AGUI.Clientconstruction pattern and revised state/tool-call expectations consistent with the external SDK.
Reviewed changes
Copilot reviewed 91 out of 91 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests/TestHelpers.cs | Gates async-enumerable helper behind !NET10_0_OR_GREATER to match test applicability. |
| dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests.csproj | Adds AGUI.Abstractions package reference for updated unit tests. |
| dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests/ChatResponseUpdateAGUIExtensionsTests.cs | Removes tests for the vendored ChatResponseUpdate↔AG-UI conversion now owned by the external SDK. |
| dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests/AGUIServerSentEventsResultTests.cs | Updates SSE polyfill tests to reference AGUI.Abstractions event types; gated to non-net10. |
| dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.UnitTests/AGUIEndpointRouteBuilderExtensionsTests.cs | Simplifies unit tests to focus on DI mapping/null-guard behavior after protocol logic moves out-of-tree. |
| dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/ToolCallingTests.cs | Migrates to AGUI.Client and updates mixed server/client tool execution expectations. |
| dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/SharedStateTests.cs | Updates state round-trip tests to use RunAgentInput.State + StateSnapshotEvent raw representations. |
| dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/SessionPersistenceTests.cs | Updates continuation semantics to stateless client behavior using threadId + parentRunId. |
| dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests.csproj | Replaces internal AGUI project reference with AGUI.Client/Abstractions/Server packages. |
| dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/ForwardedPropertiesTests.cs | Switches forwarded-props recovery to TryGetRunAgentInput(...) from the external SDK. |
| dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/BasicStreamingTests.cs | Adjusts lifecycle assertions to read thread/run IDs from AG-UI events instead of ConversationId. |
| dotnet/tests/Microsoft.Agents.AI.AGUI.UnitTests/TestHelpers.cs | Removes helper from deleted vendored AGUI test project. |
| dotnet/tests/Microsoft.Agents.AI.AGUI.UnitTests/Microsoft.Agents.AI.AGUI.UnitTests.csproj | Deletes vendored AGUI unit test project file. |
| dotnet/tests/Microsoft.Agents.AI.AGUI.UnitTests/AIToolExtensionsTests.cs | Removes tests for vendored tool conversion extensions now replaced by external SDK APIs. |
| dotnet/tests/Microsoft.Agents.AI.AGUI.UnitTests/AGUIStreamingMessageIdTests.cs | Removes vendored streaming/message-id behavior tests now owned upstream. |
| dotnet/tests/Microsoft.Agents.AI.AGUI.UnitTests/AGUIHttpServiceTests.cs | Removes tests for vendored HTTP/SSE client now replaced by AGUI.Client. |
| dotnet/src/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.csproj | Drops linked vendored Shared/** compile items; adds AGUI.Abstractions + AGUI.Server package refs. |
| dotnet/src/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore/AGUIServerSentEventsResult.cs | Updates SSE polyfill to use AGUI.Abstractions events and limits it to pre-net10 TFMs. |
| dotnet/src/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore/AGUIJsonSerializerOptions.cs | Seeds JSON options from AGUIJsonSerializerContext and adds AF resolver for hosting serialization. |
| dotnet/src/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore/AGUIEndpointRouteBuilderExtensions.cs | Replaces in-tree parsing/stream conversion with AGUI.Server context + event stream extensions; net10 uses framework SSE result. |
| dotnet/src/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore/AGUIChatResponseUpdateStreamExtensions.cs | Removes custom tool-filtering stream extension (superseded by external SDK behavior/config). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/ToolCallStartEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/ToolCallResultEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/ToolCallEndEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/ToolCallArgsEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/TextMessageStartEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/TextMessageEndEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/TextMessageContentEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/StateSnapshotEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/StateDeltaEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/RunStartedEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/RunFinishedEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/RunErrorEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/RunAgentInput.cs | Removes vendored protocol input model (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/ReasoningStartEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/ReasoningMessageStartEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/ReasoningMessageEndEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/ReasoningMessageContentEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/ReasoningMessageChunkEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/ReasoningEndEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/ReasoningEncryptedValueEvent.cs | Removes vendored protocol type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/ChatResponseUpdateAGUIExtensions.cs | Removes vendored conversion pipeline (now provided by the external AG-UI SDK). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/BaseEventJsonConverter.cs | Removes vendored event converter (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/BaseEvent.cs | Removes vendored base event type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/AIToolExtensions.cs | Removes vendored tool conversion extensions (replaced by external SDK APIs). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/AGUIUserMessage.cs | Removes vendored message model (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/AGUIToolMessage.cs | Removes vendored message model (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/AGUIToolCall.cs | Removes vendored tool-call model (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/AGUITool.cs | Removes vendored tool model (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/AGUISystemMessage.cs | Removes vendored message model (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/AGUIRoles.cs | Removes vendored role constants (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/AGUIReasoningMessage.cs | Removes vendored message model (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/AGUIMessageJsonConverter.cs | Removes vendored message converter (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/AGUIMessage.cs | Removes vendored message base type (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/AGUIJsonSerializerContext.cs | Removes vendored source-gen context (superseded by external SDK contexts). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/AGUIFunctionCall.cs | Removes vendored function-call model (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/AGUIEventTypes.cs | Removes vendored event-type constants (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/AGUIDeveloperMessage.cs | Removes vendored message model (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/AGUIContextItem.cs | Removes vendored context model (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/AGUIChatMessageExtensions.cs | Removes vendored chat-message mapping logic (replaced by external SDK server/client adapters). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Shared/AGUIAssistantMessage.cs | Removes vendored message model (migrated to AGUI.Abstractions). |
| dotnet/src/Microsoft.Agents.AI.AGUI/Microsoft.Agents.AI.AGUI.csproj | Deletes the vendored AGUI project. |
| dotnet/src/Microsoft.Agents.AI.AGUI/AGUIHttpService.cs | Deletes vendored HTTP/SSE transport client (replaced by AGUI.Client). |
| dotnet/src/Microsoft.Agents.AI.AGUI/AGUIChatClient.cs | Deletes vendored AGUIChatClient implementation (replaced by AGUI.Client). |
| dotnet/samples/05-end-to-end/AGUIWebChat/Server/AGUIWebChatServer.csproj | Removes internal AGUI project reference from the sample server. |
| dotnet/samples/05-end-to-end/AGUIWebChat/README.md | Updates sample docs to use the new AGUI.Client options-based constructor. |
| dotnet/samples/05-end-to-end/AGUIWebChat/Client/Program.cs | Migrates sample client to AGUI.Client. |
| dotnet/samples/05-end-to-end/AGUIWebChat/Client/AGUIWebChatClient.csproj | Switches sample client to AGUI.Client package reference. |
| dotnet/samples/05-end-to-end/AGUIClientServer/README.md | Updates sample docs to the new AGUIChatClient construction pattern. |
| dotnet/samples/05-end-to-end/AGUIClientServer/AGUIServer/AGUIServer.csproj | Removes internal AGUI project reference from sample server. |
| dotnet/samples/05-end-to-end/AGUIClientServer/AGUIDojoServer/SharedState/SharedStateAgent.cs | Updates state extraction to use TryGetRunAgentInput(...) from the external SDK. |
| dotnet/samples/05-end-to-end/AGUIClientServer/AGUIClient/Program.cs | Migrates sample client to AGUI.Client + options-based construction. |
| dotnet/samples/05-end-to-end/AGUIClientServer/AGUIClient/AGUIClient.csproj | Switches sample client to AGUI.Client package reference. |
| dotnet/samples/02-agents/AGUI/Step05_StateManagement/Server/SharedStateAgent.cs | Updates state recovery from ChatOptions to TryGetRunAgentInput(...). |
| dotnet/samples/02-agents/AGUI/Step05_StateManagement/Client/Program.cs | Migrates tutorial client to AGUI.Client options-based construction. |
| dotnet/samples/02-agents/AGUI/Step05_StateManagement/Client/Client.csproj | Replaces internal project reference with AGUI.Client package. |
| dotnet/samples/02-agents/AGUI/Step04_HumanInLoop/Client/Program.cs | Migrates tutorial client to AGUI.Client. |
| dotnet/samples/02-agents/AGUI/Step04_HumanInLoop/Client/Client.csproj | Replaces internal project reference with AGUI.Client package. |
| dotnet/samples/02-agents/AGUI/Step03_FrontendTools/Client/Program.cs | Migrates tutorial client to AGUI.Client. |
| dotnet/samples/02-agents/AGUI/Step03_FrontendTools/Client/Client.csproj | Replaces internal project reference with AGUI.Client package. |
| dotnet/samples/02-agents/AGUI/Step02_BackendTools/Client/Program.cs | Migrates tutorial client to AGUI.Client. |
| dotnet/samples/02-agents/AGUI/Step02_BackendTools/Client/Client.csproj | Replaces internal project reference with AGUI.Client package. |
| dotnet/samples/02-agents/AGUI/Step01_GettingStarted/Client/Program.cs | Migrates tutorial client to AGUI.Client. |
| dotnet/samples/02-agents/AGUI/Step01_GettingStarted/Client/Client.csproj | Replaces internal project reference with AGUI.Client package. |
| dotnet/Directory.Packages.props | Adds AGUI.* package versions and updates a few dependency versions. |
| dotnet/agent-framework-release.slnf | Removes the deleted Microsoft.Agents.AI.AGUI project from the release solution filter. |
| dotnet/agent-framework-dotnet.slnx | Removes the deleted Microsoft.Agents.AI.AGUI project and its unit tests from the solution. |
| this._jsonWriter.Reset(writer); | ||
| } | ||
|
|
||
| JsonSerializer.Serialize(this._jsonWriter, item.Data, AGUIJsonSerializerContext.Default.BaseEvent); |
| var errorEvent = new RunErrorEvent | ||
| { | ||
| Code = "StreamingError", | ||
| Message = ex.Message | ||
| Message = ex.Message, | ||
| }; |
| if (input is null) | ||
| { | ||
| return Results.BadRequest(); | ||
| } |
There was a problem hiding this comment.
Automated Code Review
Reviewers: 5 | Confidence: 77%
✓ Correctness
No actionable issues found in this dimension.
✓ Security Reliability
No actionable issues found in this dimension.
✓ Test Coverage
The existing integration tests (ToolCallingTests, BasicStreamingTests, SharedStateTests, etc.) continue to exercise the hosting pipeline end-to-end, including the mixed server+client tool invocation scenario. The new AGUIStreamOptions resolution path (endpoint metadata → DI fallback) introduced in the endpoint handler has no direct test coverage, but this is a straightforward null-coalescing passthrough to the external SDK and is exercised implicitly (with null options) by all existing integration tests.
✓ Failure Modes
The migration from vendored AG-UI code to the external SDK is structurally sound. The main failure mode concern is that on .NET 10+, streaming errors silently drop the connection without sending a RunErrorEvent to the client, unlike the polyfill path which gracefully notifies clients of failures. This leaves clients unable to distinguish between a network drop and an application error.
✗ Design Approach
The chunk mostly updates tests to the external AG-UI SDK, but two of those changes bless lower-level behavior that conflicts with the repo’s documented/public client contract. One test now codifies
ConversationIdbeing absent even though the sample client and README still describe thread identity as coming fromConversationId, and another now hand-buildsRunAgentInputfor turn continuation, which stops exercising the publicChatClientAgentSessionpath that callers actually use. The migration mostly updates the tests to the external SDK shape, but one changed test now codifies a real behavioral regression: state snapshots emitted by AG-UI are lost on the non-streamingAIAgent.RunAsyncpath, which changes the client programming model instead of just swapping protocol abstractions. I also found one non-blocking test-design issue where a serializer-options test no longer exercises theAGUIChatClientbehavior it claims to cover.
Flagged Issues
-
BasicStreamingTestsnow treats a nullConversationIdas expected, which codifies a backward-incompatible client contract change even though the sample client and README still document thread identity viaConversationId(dotnet/samples/05-end-to-end/AGUIClientServer/README.md:157,182,194,198anddotnet/samples/05-end-to-end/AGUIClientServer/AGUIClient/Program.cs:122-131,177-180). -
SessionPersistenceTestsnow injectsThreadId/ParentRunId/MessagesthroughRawRepresentationFactory, so it can pass even ifAGUIChatClientno longer preserves continuation state throughChatClientAgentSession; that bypasses the public pattern used by calers (dotnet/samples/05-end-to-end/AGUIClientServer/AGUIClient/Program.cs:91,117).
Automated review by javiercn's agents
|
Flagged issue
Source: automated DevFlow PR review |
|
Flagged issue
Source: automated DevFlow PR review |
de00533 to
e43bcf4
Compare
e43bcf4 to
213dcef
Compare
Review comment dispositionsThanks for the thorough automated review. Triaged below, with fixes pushed in the latest revision.
|
213dcef to
ac12442
Compare
Follow-up: renamed the public hosting API + slimmed the JSON wiringTo avoid squatting on
The package's entire public surface is now exactly these two methods. Supporting changes:
Validated: hosting builds clean (net8/9/10); unit tests 9/9 and integration tests 32/32 pass (the integration suite exercises |
Remove the in-tree Microsoft.Agents.AI.AGUI sources and consume the external AG-UI .NET SDK packages (AGUI.Abstractions, AGUI.Formatting, AGUI.Protobuf, AGUI.Client, AGUI.Server) at 0.1.0-preview instead. - Microsoft.Agents.AI.Hosting.AGUI.AspNetCore keeps its own ASP.NET glue (MapAGUI / AddAGUI / SSE result) layered over the framework-agnostic AGUI.Server primitives (ToChatRequestContext / AsAGUIEventStreamAsync). - Migrate call sites to the options-based AGUIChatClient constructor and recover the originating AG-UI input via ChatOptions.TryGetRunAgentInput. - Multi-turn continuation flows through parentRunId + threadId on RawRepresentationFactory; shared state flows through RunAgentInput.State and is surfaced as StateSnapshotEvent raw representations. - Update samples, hosting/unit/integration tests, and central package versions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ac12442 to
fc5dc20
Compare
Important
Draft. This PR consumes the external AG-UI .NET SDK packages (
AGUI.*) at0.1.0-preview, which are not yet published to NuGet.org (they ship from the AG-UI repo — see ag-ui-protocol/ag-ui#1963). CI restore will fail until those packages are public. It is opened as a draft to review the migration shape ahead of that publish.Summary
Replaces Microsoft Agent Framework's in-tree AG-UI abstractions (
Microsoft.Agents.AI.AGUI) with the external AG-UI C# SDK packages, so MAF consumes the protocol implementation maintained by the AG-UI team instead of carrying its own parallel copy.The framework keeps its own thin ASP.NET hosting glue; only the protocol abstractions move out.
Net change: 91 files, +360 / −10,218 — almost entirely deletions of the vendored protocol code and its tests.
What changes
Removed (the vendored AG-UI implementation):
src/Microsoft.Agents.AI.AGUI/— the internalAGUIChatClient, event/message types, JSON converters,AGUIJsonSerializerContext, role/tool/event constants, and theChatResponseUpdate ↔ AG-UIextensions.tests/Microsoft.Agents.AI.AGUI.UnitTests/— the unit tests for that vendored copy (now covered upstream in the AG-UI SDK's own test suites).Added package references (
Directory.Packages.props, restored from NuGet):AGUI.Abstractions,AGUI.Formatting,AGUI.Protobuf,AGUI.Client,AGUI.Server— all0.1.0-preview.Kept and re-pointed at the external primitives:
Microsoft.Agents.AI.Hosting.AGUI.AspNetCoreretains its own ASP.NET surface (MapAGUI/AddAGUI/ the SSE result) but now layers it over the framework-agnosticAGUI.Serverprimitives —RunAgentInput.ToChatRequestContext(...)andChatResponseUpdateAGUIExtensions.AsAGUIEventStreamAsync(...).samples/02-agents/AGUI/*andsamples/05-end-to-end/AGUI*and the hosting integration/unit tests are migrated to the external API.Why
Microsoft.Extensions.AI—IChatClientremains the only integration point on both the client and server sides, so the programming model is unchanged.Migration guide (for existing consumers of
Microsoft.Agents.AI.AGUI)The hosting package (
Microsoft.Agents.AI.Hosting.AGUI.AspNetCore) and itsMapAGUI/AddAGUIsurface are unchanged. If you used the abstractions directly, three things change:1. Namespaces — the single
Microsoft.Agents.AI.AGUInamespace splits along the SDK's package boundaries:Microsoft.Agents.AI.AGUI(client)AGUI.ClientMicrosoft.Agents.AI.AGUI(server adapters)AGUI.ServerMicrosoft.Agents.AI.AGUI(events/messages/tools)AGUI.Abstractions2.
AGUIChatClientconstruction — the positional constructor becomes options-based:3. Recovering the originating AG-UI input on the server — read it back from
ChatOptionsvia the SDK extension:4. Package references — drop the project/package reference to
Microsoft.Agents.AI.AGUIand add theAGUI.*packages you use (AGUI.Clientfor clients,AGUI.Server+AGUI.Abstractionsfor server/hosting, plusAGUI.Protobufif you opt into the protobuf transport).Notes for reviewers
MapPost→input.ToChatRequestContext(...)→chatClient.GetStreamingResponseAsync(...)→.AsAGUIEventStreamAsync(ctx, ct)→ negotiated SSE/protobuf result.Microsoft.Agents.AI.Hosting.AGUI.AspNetCoreAPI.AGUI.*packages being published; until then this is a draft and CI restore will fail at the package source.