agui-dotnet-reasoning

Installation
SKILL.md

AG-UI .NET — reasoning (thinking) events

Goal: show a reasoning model's intermediate thoughts as they stream, kept visually separate from the final answer.

A reasoning model emits two kinds of text in the stream: its thinking and its answer. In Microsoft.Extensions.AI these arrive as different content types on each ChatResponseUpdate — TextReasoningContent for the thoughts, TextContent for the answer. update.Text only concatenates the answer parts, so to display thinking you inspect update.Contents.

Separate thinking from the answer

Iterate update.Contents and branch on the content type instead of reading update.Text:

using Microsoft.Extensions.AI;

var messages = new List<ChatMessage>
{
    new(ChatRole.User, "20 heads, 56 legs — how many chickens and rabbits? Show your reasoning."),
};
Installs
10
GitHub Stars
20.8K
First Seen
Jun 30, 2026