Summary
Emit custom AG-UI events from the Chat.Api agent pipeline carrying structured progress data. The UI handles these custom events natively within the AGUI SSE stream for real-time progress without polling.
Rejected approach. High risk due to preview SDK dependencies and undocumented internal APIs.
Parent: #243
Approach
- Modify
ChatAgentProvider.RunStreamingWithLatestAgentAsync() to intercept RequestReport tool results
- Inject custom AG-UI events into the streaming pipeline (e.g.,
ActivityDelta or Custom event types)
- Start a background polling loop in the agent pipeline that emits progress events
- Chat.razor handles custom events for progress display
Why This Was Rejected
- Preview SDK risk:
Microsoft.Agents.AI.Hosting.AGUI.AspNetCore v1.0.0-preview.260311.1 — internal APIs may change
- MapAGUI event propagation unknown: Custom event types may not be serialized to SSE by
MapAGUI
- Deep SDK integration required: Injecting events at the
IAsyncEnumerable<StreamingChatCompletionUpdate> level requires understanding undocumented internals
- 15-25 hours estimated effort with high uncertainty — potential dead-end
- Marginal UX gain over Approach A for dramatically more complexity
Files Changed (4-5 files)
| File |
Change |
ChatAgentProvider.cs (Chat.Api) |
Intercept tool results, emit custom events in streaming pipeline |
AGUIEvent.cs (UI) |
Add Name, Value properties for Custom events |
Chat.razor (UI) |
Handle Custom or ActivityDelta events |
Chat.razor.css (UI) |
Progress styles |
Estimated Effort
15-25 hours (high uncertainty, SDK investigation, potential dead-end)
When This Might Become Viable
- Microsoft.Agents.AI SDK reaches GA with documented custom event APIs
- AG-UI protocol formally specifies Custom event serialization requirements
- The project needs server-push progress for multiple concurrent operations beyond reports
References
- Research:
.copilot-tracking/research/2026-04-06/report-generation-progress-indicator-research.md
- AG-UI Protocol: https://docs.ag-ui.com/concepts/events (Custom, ActivitySnapshot, ActivityDelta events)
Summary
Emit custom AG-UI events from the Chat.Api agent pipeline carrying structured progress data. The UI handles these custom events natively within the AGUI SSE stream for real-time progress without polling.
Rejected approach. High risk due to preview SDK dependencies and undocumented internal APIs.
Parent: #243
Approach
ChatAgentProvider.RunStreamingWithLatestAgentAsync()to interceptRequestReporttool resultsActivityDeltaorCustomevent types)Why This Was Rejected
Microsoft.Agents.AI.Hosting.AGUI.AspNetCorev1.0.0-preview.260311.1 — internal APIs may changeMapAGUIIAsyncEnumerable<StreamingChatCompletionUpdate>level requires understanding undocumented internalsFiles Changed (4-5 files)
ChatAgentProvider.cs(Chat.Api)AGUIEvent.cs(UI)Name,Valueproperties for Custom eventsChat.razor(UI)CustomorActivityDeltaeventsChat.razor.css(UI)Estimated Effort
15-25 hours (high uncertainty, SDK investigation, potential dead-end)
When This Might Become Viable
References
.copilot-tracking/research/2026-04-06/report-generation-progress-indicator-research.md