agui-dotnet-protobuf
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: