Andes.Extensions.AI.UI 0.3.1

dotnet add package Andes.Extensions.AI.UI --version 0.3.1
                    
NuGet\Install-Package Andes.Extensions.AI.UI -Version 0.3.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Andes.Extensions.AI.UI" Version="0.3.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Andes.Extensions.AI.UI" Version="0.3.1" />
                    
Directory.Packages.props
<PackageReference Include="Andes.Extensions.AI.UI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Andes.Extensions.AI.UI --version 0.3.1
                    
#r "nuget: Andes.Extensions.AI.UI, 0.3.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Andes.Extensions.AI.UI@0.3.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Andes.Extensions.AI.UI&version=0.3.1
                    
Install as a Cake Addin
#tool nuget:?package=Andes.Extensions.AI.UI&version=0.3.1
                    
Install as a Cake Tool

Andes.Extensions.AI.UI

UI status contract for Andes.Extensions.AI tool tracking. Turns the tracked chat stream into a serializable, cross-language shape a UI can render — the same contract in C# (console, Blazor WebAssembly) and TypeScript (any SPA). Adds two things on top of the core middleware:

  • A serializable status contract — flat per-flush AssistantUiEvent deltas and a folded AssistantStatusSnapshot (the assistant's status line plus a hierarchy of AssistantActivity cards — functions, MCP tools, and agents, each with sub-statuses, nested children, and token usage). Each activity carries a clean DisplayName plus a separate Kind badge, so the kind word is never repeated in the label.
  • A mapper and reducerToUiEventsAsync()/ToStatusSnapshotsAsync() project the in-band ChatProgressContent/UsageReportContent stream into the contract; AssistantStatusReducer folds events into snapshots. A matching TypeScript foldAssistantEvents ships in the package (typescript/andes-assistant-ui.ts) so a SPA reconstructs the same tree.

Install

dotnet add package Andes.Extensions.AI.UI

Quickstart

using Andes.Extensions.AI;
using Microsoft.Extensions.AI;

IChatClient client = innerClient
    .AsBuilder()
    .UseToolTracking()
    .UseFunctionInvocation() // tracking must be registered before function invocation
    .Build();

// Stream immutable snapshots and bind them to the UI (Blazor, console, ...).
await foreach (AssistantStatusSnapshot snapshot in client
    .GetStreamingResponseAsync("prompt", chatOptions)
    .ToStatusSnapshotsAsync())
{
    Console.WriteLine(snapshot.AssistantStatus);
    foreach (AssistantActivity activity in snapshot.Activities)
    {
        // e.g. "Andes Test MCP" [McpTool] — name and kind are separate, never "Andes Test MCP MCP"
        Console.WriteLine($"{activity.DisplayName} [{activity.Kind}] — {activity.State}");
    }
}

For an HTTP surface, stream ToUiEventsAsync() instead and serialize each event with AssistantUiJsonContext (camelCase, string enums, nulls omitted) over server-sent events; the browser folds them with foldAssistantEvents from the shipped .ts file.

Notes

  • DisplayName is the raw function/server/agent name with no "Calling" prefix and no kind word appended; render it once and show Kind as a badge. The contract carries no pre-composed header strings, so labels localize cleanly.
  • AssistantUiJsonContext matches the TypeScript interface byte-for-byte: camelCase keys, string enum values ("McpTool", "Agent", …), and omitted nulls.
  • Progress values from MCP servers are single-precision floats widened to double; format with a rounding specifier such as "0.#" before display.
  • Privacy posture matches the core package: events and snapshots never carry prompt content, tool arguments, or tool results — only headers, statuses, names, and token counts.

Full documentation lives in the repository docs.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.1 38 7/29/2026
0.3.0 36 7/29/2026