agui-dotnet-protobuf

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

A guide for sending AG-UI events as compact protobuf binary data instead of the usual Server-Sent Events format. The client can automatically use Server-Sent Events if protobuf is unavailable.

In plain words
What is it for?
Use it to configure an AG-UI .NET client and server for protobuf event streaming, with fallback to Server-Sent Events.
Why use it?
It lets the connection negotiate a supported event format without changing the chat or endpoint code. You can prefer a compact binary stream while still supporting the default text-based stream.

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 configure an AG-UI .NET client and server for protobuf event streaming, with fallback to Server-Sent Events.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ag-ui-protocol/ag-ui/agui-dotnet-protobuf
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,802 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-protobuf
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-protobuf

README.md
[![agentmods](https://agentmods.dev/badge/skills/ag-ui-protocol/ag-ui/agui-dotnet-protobuf/github.svg)](https://agentmods.dev/skills/ag-ui-protocol/ag-ui/agui-dotnet-protobuf)
Your own site
<a href="https://agentmods.dev/skills/ag-ui-protocol/ag-ui/agui-dotnet-protobuf"><img src="https://agentmods.dev/badge/skills/ag-ui-protocol/ag-ui/agui-dotnet-protobuf/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agui-dotnet-protobuf

Your own site · 80×15
<a href="https://agentmods.dev/skills/ag-ui-protocol/ag-ui/agui-dotnet-protobuf"><img src="https://agentmods.dev/badge/skills/ag-ui-protocol/ag-ui/agui-dotnet-protobuf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 162 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,097 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.00162 $0.01097
Opus 5 $0.00081 $0.00549
Sonnet 5 $0.00032 $0.00219
Haiku 4.5 $0.00016 $0.00110

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

Security

Grade A, and why

agui-dotnet-protobuf 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 9d 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-protobuf/SKILL.md · 99 lines

How it starts

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

AG-UI .NET — protobuf transport

Goal: carry the AG-UI event stream as compact protobuf binary instead of Server-Sent Events, with automatic fallback to SSE when one side doesn't support it.

Transport is negotiated by content type: the client advertises the formats it accepts (in preference order) on the Accept header, and the server replies in the first format it also supports. Nothing above the transport changes — AGUIChatClient, messages, and your endpoint logic are identical to SSE.

Install

dotnet add package AGUI.Protobuf   # ProtobufEventStreamFormatter

Client apps also need AGUI.Client (for AGUIEventStreamHandler); server apps also need AGUI.Formatting (for SseEventStreamFormatter) and AGUI.Server.

Client: prefer protobuf, fall back to SSE

Wrap your HttpClient in an AGUIEventStreamHandler configured with the formatters in preference order. The handler advertises them on Accept and decodes whatever the server returns:

using AGUI.Client;
using AGUI.Formatting;
using AGUI.Protobuf;
using Microsoft.Extensions.AI;

var handler = new AGUIEventStreamHandler(
    [new ProtobufEventStreamFormatter(), new SseEventStreamFormatter()])
{
    InnerHandler = new HttpClientHandler(),
};

using var httpClient = new HttpClient(handler);
IChatClient client = new AGUIChatClient(new(httpClient, "http://localhost:5013"));

Protobuf is listed first, so the client prefers it; if the server only speaks SSE, the handler transparently decodes SSE instead. Switching transports is purely a matter of reordering (or trimming) this formatter list.

Server: answer protobuf when asked

Register both formatters and pick one per request from the Accept header, defaulting to SSE:

using System.Linq;
using AGUI.Abstractions;
using AGUI.Formatting;
using AGUI.Protobuf;
using AGUI.Server;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.AI;
using Microsoft.Extensions.Options;
using JsonOptions = Microsoft.AspNetCore.Http.Json.JsonOptions;

builder.Services.AddSingleton<IAGUIEventStreamFormatter, SseEventStreamFormatter>();
builder.Services.AddSingleton<IAGUIEventStreamFormatter, ProtobufEventStreamFormatter>();

var app = builder.Build();

app.MapPost("/", async (
    [FromBody] RunAgentInput input,
    IChatClient chatClient,
    IEnumerable<IAGUIEventStreamFormatter> formatters,
    IOptions<JsonOptions> jsonOptions,
    HttpContext http,
    CancellationToken ct) =>
{
    var accept = http.Request.Headers.Accept.ToString();
    var formatter =
        formatters.FirstOrDefault(f => f is ProtobufEventStreamFormatter
                                       && accept.Contains(f.MediaType, StringComparison.OrdinalIgnoreCase))
        ?? formatters.First(f => f is SseEventStreamFormatter);

    var ctx = input.ToChatRequestContext(jsonOptions.Value.SerializerOptions);
    var updates = chatClient.GetStreamingResponseAsync(ctx.Messages, ctx.ChatOptions, ct);
    var events = updates.AsAGUIEventStreamAsync(ctx, ct);

    http.Response.ContentType = formatter.MediaType;
    http.Response.Headers.CacheControl = "no-cache";
    await formatter.WriteAsync(events, http.Response.Body, ct);
});

Read the full file on GitHub · 99 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. 9d ago First seen · 99 lines · 162 tokens per session scan A f914c7084379

Subscribe to this mod's changes

agui-dotnet-protobuf is a skill published in the GitHub repository ag-ui-protocol/ag-ui (15,802 stars, last pushed today), licensed MIT. It adds 162 tokens to every session and 1,097 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.

Related

Other skills, from other repositories

moai-platform-auth

Authentication and authorization specialist covering Auth0, Clerk, and Firebase Auth. Use when implementing authentication, MFA, SSO, passkeys, WebAuthn, social login, or security features.

modu-ai/moai-adk · 43 tokens

multi-app-orchestration

Orchestrate workflows across multiple applications and APIs — inter-app coordination, data handoff, and multi-system task completion.

a5c-ai/babysitter · 30 tokens

skill-api

AL API development patterns for Business Central. Use when creating OData/REST API pages, HttpClient integrations, webhook implementations, or any external system integration via API.

javiarmesto/ALDC-AL-Development-Collection · 36 tokens

skill-agent-task-patterns

Agent SDK task integration patterns for Business Central. Triggers on: Agent Task Builder, Agent Task Message Builder, Public API, AssignTask, ExternalId, agent session detection, BindSubscription, TryFunction agent task, multi-turn agent conversation, agent attachment, or task lifecycle management.

javiarmesto/ALDC-AL-Development-Collection · 62 tokens

skill-events

AL event-driven architecture for Business Central. Use when creating EventSubscribers, IntegrationEvents, BusinessEvents, or implementing publisher/subscriber patterns in extensions.

javiarmesto/ALDC-AL-Development-Collection · 32 tokens

dev-engineer

Adds logic, state management, TypeScript types, and CRUD operations to UI. Works AFTER ui-first-builder creates the interface. Implements Zustand stores, form handling with React Hook Form + Zod, and prepares for backend connection. Triggers: add logic, add functionality, make it work, state management, form…

wasintoh/toh-framework · 75 tokens