BuildRiot
Sign in

Article · AI

.NET 11 features experimental Blazor AI components for agent approvals

Microsoft’s .NET 11 announcement highlights experimental Blazor AI components introduced in September. This guide outlines a disposable meeting planner and tests for stale approvals, cancellation, dropped connections, and success messages that do not match recorded actions.

A sunlit miniature meeting planner features a lavender approval press, disconnected cable, cancelled invitation, and an envelope ledger beneath a green success check.
Illustration: BuildRiot (AI-generated)

Key takeaway

An agent’s success message should match a recorded action. A useful prototype ties approval to a specific proposal and checks persisted results before reporting an interrupted booking as complete.

Start with a disposable booking workflow

Microsoft’s November 10, 2026,.NET 11 announcement featured experimental Blazor AI components for agent interfaces, including tool approvals and shared state. The company introduced the components on September 28, 2026. Microsoft says Microsoft.AspNetCore.Components.AI remains experimental and prerelease throughout.NET 11, separate from the ASP.NET Core shared framework. A practical starting point is a meeting planner that records bookings in a disposable test ledger. Sources: Microsoft

Build an interactive page with a chat panel, editable meeting draft, approval card, execution ledger, and diagnostic event panel. Have the agent propose a title, attendees, and time, then request approval before recording the booking. Show the persisted result separately from the agent’s conversational response. Judge success by whether the approved action appears in the ledger.

Pin the SDK and relevant NuGet packages, record transitive versions, and preserve the lockfile. NuGet lists AGUI.Client version 1.0.1 dated October 12, 2026. Maintainers announced AG-UI 1.0 as released and frozen on September 18, 2026. Treat that protocol milestone separately from the maturity of individual components and adapters. Sources: NuGet, AG-UI GitHub repository

Connect the interface to a protected server tool

Microsoft distinguishes basic chat through IChatClient from remote agent scenarios using AG-UI for streaming, tools, approvals, and shared state. The Microsoft Agent Framework hosting integration exposes an AIAgent through MapAGUIServer and returns server-sent events over HTTP. The adapter translates inputs and streaming output; Agent Framework controls tool execution and approval policy. Microsoft also identifies the hosting integration as prerelease. Sources: Microsoft, Microsoft Learn

Wrap the booking AIFunction in ApprovalRequiredAIFunction to require server-side approval. The documented adapter ends the run with an interrupt instead of executing the protected function. The.NET client receives ToolApprovalRequestContent and creates an approval or rejection response. It sends that response in a user message using the same AgentSession. Microsoft’s Blazor example connects the approval block’s Approve and Reject methods to buttons. Sources: Microsoft, Microsoft Learn

  1. Create a meeting draft and show the exact proposed arguments.
  2. Request approval for the server booking tool.
  3. On approval, write the booking to the disposable ledger.
  4. On rejection, leave the ledger unchanged and show the decision.
  5. Display the persisted booking result separately from conversational text.

Begin with default rendering to keep the prototype small. ChatPage and MessageList provide default text and approval rendering, while UIAgent maps ChatResponseUpdate content into mutable interface blocks. Custom block renderers can filter matches through When, with the most recently registered matching renderer taking precedence. Customize the approval card after the basic flow works, keeping the exact proposal visible. Sources: Microsoft Learn

Bind approval to a specific state revision

Keep separate fields for the draft revision, proposed meeting, committed meeting, and execution status. Bind each approval to a proposal revision and an application operation ID. If someone edits the meeting while approval is pending, reject the stale decision. Record completed operations so repeated decisions receive an explicit status without repeating the write.

Microsoft’s walkthrough uses a typed UIAgent and sends current state through RunAgentInput.State. It maps incoming snapshots through StateMapper and applies state deltas in application code. Its predictive-state approach separates proposals from committed state. It rejects unresolved proposals on failure, cancellation, or completion without a decision. Use that separation for the meeting draft, with the ledger determining whether a booking occurred. Sources: Microsoft

Choose a conflict policy before allowing user edits and agent updates to overlap. One proposed policy is to reject updates based on older draft revisions and request a fresh snapshot. Check execution separately from synchronization: issue #3271 reports repeated frontend actions returning an earlier success without updating the interface. The reporter says current state can reveal the missed action without preventing stale-result reuse. Sources: AG-UI GitHub repository

Give each interruption a distinct recovery path

An approval interrupt deliberately pauses protected execution in the documented Agent Framework flow. User cancellation has a separate entry point, AgentContext.CancelAsync, in Microsoft’s Blazor walkthrough. The agent connection carries server-sent events over HTTP. Give approval, cancellation, and transport interruptions distinct labels and diagnostics so a dropped connection never appears as confirmed cancellation. Sources: Microsoft, Microsoft Learn

Microsoft documents persisted hosted-session resumption using threadId. Its documentation does not establish automatic recovery of missed stream events or exactly-once tool execution. Treat this meeting planner as a proposed test workflow, with package compatibility and application behavior still to establish. Test approval continuation, session restoration, and missed-output recovery separately before relying on them. Sources: Microsoft Learn

For Interactive Server, instrument browser-to-Blazor connectivity separately from the client-to-agent stream. After a lost connection, reconcile the operation against persisted records before attempting another write. Test cancellation immediately before and after the ledger commit. Require the interface to distinguish a cancellation request from confirmed cancellation or completed work.

Test the adapter before adding model variability

Start with a deterministic fake streaming agent that emits known text fragments, an approval, and a known sequence of state updates. Add barriers before tool start and ledger commit so failures occur at repeatable points. Run approval and rejection first, followed by duplicate decisions and stale approvals. Require a single ledger entry for approval, none for rejection, and an explicit status for repeated submissions.

Use issue reports to choose additional regression cases. Issue #2820 describes unused client tools suppressing server approval interrupts with hosting package 1.22.0-preview.260918.1; the protected tool reportedly remained unexecuted. Issue #3271 reports stale success on repeated frontend actions with AGUI.Server version 1.0.1. It includes a net11.0 reproduction requiring neither a model nor a web server. Compare actual execution counts and interface state with each reported outcome. Sources: AG-UI GitHub repository

Inject an agent exception as well as connection failures. Issue #3097 reports streaming exceptions becoming generic run-error events, with exception type and message recorded on an activity. The report used AGUI.Server and AGUI.Abstractions version 1.0.0 and hosting package 1.24.0. Correlate client failures with server diagnostics using the thread, run, approval, tool call, and application operation. The table below sets out proposed acceptance criteria for interrupted or repeated work. Sources: AG-UI GitHub repository

Table

Proposed failure-injection acceptance criteria

TestInjectionRequired observation
Approve/rejectRun each decision against the same draftApproval produces one ledger entry; rejection produces none
Duplicate decisionDouble-click and resend the same responseAt most one side effect; subsequent response has explicit status
Stale approvalEdit the draft while its approval card is pendingOld approval cannot authorize revised arguments
Cancellation during textCancel after a fixed content eventUI leaves busy state; server cancellation timing is logged
Cancellation during toolPause immediately before and after ledger commitUI accurately distinguishes canceled work from completed work
Lost approval responseDrop the connection after decision submissionReload reconciles pending/completed status without blindly repeating work
Truncated streamEnd the connection before a terminal eventPartial output is labeled interrupted or uncertain
Mid-frame truncationCut SSE data inside JSONNo partial event is applied to committed state
Shared-state raceUser edits while an older agent update arrivesConflict policy preserves or explicitly resolves the newer edit
Missing/duplicate deltaDrop or replay a state updateDivergence is detected; snapshot recovery is explicit
RestartRestart with pending approval, then after commitRestoration behavior and storage limits are visible
Regression casesAdd unused frontend tool; invoke another frontend tool twiceApproval remains visible; each new invocation performs its own action
These criteria define tests to implement and measure, not observed results.

Measure recovery before connecting real side effects

Repeat each failure point with short and long conversation histories. Measure first rendered content, approval display, decision-to-tool-start time, cancellation propagation, and recovery separately. For the proposed experiment, report median and 95th-percentile latency alongside duplicate ledger writes, missing executions, and state mismatches. Keep timing measurements separate from correctness checks so fast responses do not conceal failed actions.

Record SDK and package versions, hosting mode, hardware, proxy settings, and injected delays. Repeat the deterministic cases with a real model, recording its version and separating model latency from adapter and interface behavior. Before connecting a real booking service, require stale approvals to fail and uncertain outcomes to reconcile against persisted records. Preserve failing traces and the pinned package set for regression checks after dependency updates.

Attribution

Sources

  1. 1MicrosoftAnnouncing .NET 11Source published (UTC)
  2. 2MicrosoftBuild Agentic UI with the new Blazor AI componentsSource published (UTC)
  3. 3Microsoft LearnHuman-in-the-Loop with AG-UI
  4. 4Microsoft LearnAG-UI Integration with Agent Framework
  5. 5Microsoft LearnWhat's new in ASP.NET Core in .NET 11
  6. 6AG-UI GitHub repositoryDeclaring unused client tools suppresses server approval interrupts
  7. 7AG-UI GitHub repository.NET repeated agent-driven UI actions can return an earlier success without updating the UI
  8. 8AG-UI GitHub repositoryAGUI.Server streaming exceptions become generic RUN_ERROR events
  9. 9NuGetAGUI.Client 1.0.1Source published (UTC)
  10. 10AG-UI GitHub repositoryAG-UI 1.0 is officially releasedSource published (UTC)

Read the original source for full details and context.

Report a problem

Links, dates or what you expected. Do not include passwords or private data.

More on AI

All AI stories
.NET 11 features experimental Blazor AI components for agent approvals · BuildRiot