agui-dotnet-reasoning

agui-dotnet-reasoning is a skill for Claude Code, Codex from ag-ui-protocol/ag-ui. It costs 161 tokens per session (689 once invoked), scanned A, original, MIT.

A guide for showing a reasoning model's intermediate thinking separately from its final answer in an AG-UI .NET client. The client reads streamed content parts and handles thinking text differently from answer text.

In plain words
What is it for?
Use it to process reasoning and answer events from a streaming .NET chat response, such as displaying thinking in a separate or collapsible panel.
Why use it?
It prevents reasoning text from being mixed into the assistant's visible answer. This allows an interface to show the model's progress in a separate area when that information is provided.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Part of the ag-ui-dotnet plugin — 9 skills shipped together

Good fit Use it to process reasoning and answer events from a streaming .NET chat response, such as displaying thinking in a separate or collapsible panel.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ag-ui-protocol/ag-ui/agui-dotnet-reasoning
About the project

AG-UI is an event-based protocol that lets AI agent backends communicate with user-facing applications. It standardizes agent events and inputs while supporting transports such as server-sent events, WebSockets, and webhooks. The catalogue add-ons help developers build integrations and applications around the protocol.

ag-ui-protocol/ag-ui · 15,782 stars · on GitHub · ag-ui.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ag-ui-protocol/ag-ui --skill agui-dotnet-reasoning
Clone the repo
git clone --depth 1 https://github.com/ag-ui-protocol/ag-ui

Made for: Claude Code, Codex.

Or install ag-ui-dotnet, the plugin that ships this one along with the rest of its 9 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agui-dotnet-reasoning

README.md
[![agentmods](https://agentmods.dev/badge/skills/ag-ui-protocol/ag-ui/agui-dotnet-reasoning.svg)](https://agentmods.dev/skills/ag-ui-protocol/ag-ui/agui-dotnet-reasoning)
Your own site
<a href="https://agentmods.dev/skills/ag-ui-protocol/ag-ui/agui-dotnet-reasoning"><img src="https://agentmods.dev/badge/skills/ag-ui-protocol/ag-ui/agui-dotnet-reasoning.svg" alt="Measured on agentmods" height="20"></a>
Per session 161 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 689 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00161 $0.00689
Opus 5 $0.00081 $0.00345
Sonnet 5 $0.00032 $0.00138
Haiku 4.5 $0.00016 $0.00069

Measured 8d ago against content hash 55e41bd2d4a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

agui-dotnet-reasoning scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

sdks/dotnet/plugins/ag-ui-dotnet/skills/agui-dotnet-reasoning/SKILL.md · 53 lines

How it starts

The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 ChatResponseUpdateTextReasoningContent 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."),
};

await foreach (var update in client.GetStreamingResponseAsync(messages))
{
    foreach (var content in update.Contents)
    {
        switch (content)
        {
            case TextReasoningContent { Text: { Length: > 0 } thinking }:
                RenderThinking(thinking);   // e.g. a dimmed/collapsible panel
                break;
            case TextContent { Text: { Length: > 0 } answer }:
                RenderAnswer(answer);       // the user-facing reply
                break;
        }
    }
}

Both stream incrementally and can interleave: thinking deltas arrive, then answer deltas. Render each as it comes rather than buffering, so the "thinking…" state is visible before the answer lands.

Anti-patterns

  • Re-sending the reasoning text as conversation history. The thinking is scratch work for a single turn, not a message. Appending captured TextReasoningContent into the next request's messages bloats the prompt, and some providers reject prior reasoning as input. Carry forward only the assistant's answer.
  • Treating reasoning as part of the answer. The thinking is a separate channel; concatenating it into the reply shows the user the model's scratch work as if it were the response. Keep the two render paths distinct.

Read the full file on GitHub · 53 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 53 lines · 161 tokens per session scan A 55e41bd2d4a3

Subscribe to this mod's changes

agui-dotnet-reasoning is a skill published in the GitHub repository ag-ui-protocol/ag-ui (15,782 stars, last pushed yesterday), licensed MIT. It adds 161 tokens to every session and 689 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.