AGUI.Client
The AG-UI .NET Client SDK adapts an AG-UI endpoint to the standardMicrosoft.Extensions.AI.IChatClient abstraction. Instead of introducing a new
agent base class, AGUI.Client lets .NET applications consume an AG-UI server
the same way they consume any other chat model.
If you already use
Microsoft.Extensions.AI, an AG-UI server is just another
IChatClient.AGUIChatClient
AGUIChatClient is the primary type in this package. It wraps an AG-UI
HTTP+SSE endpoint and exposes both GetStreamingResponseAsync and
GetResponseAsync from IChatClient.
- Construction - Create a client
from
HttpClientand an endpoint, or from a custom transport - Streaming - Consume
AG-UI events as
ChatResponseUpdatevalues - Stateless behavior - Send full message history on every turn
- Thread continuity - Keep a stable thread or branch from a previous run
- Interrupts and approvals - Handle server pauses with standard MEAI content types
AGUIChatClient Reference
Consume an AG-UI endpoint through the Microsoft.Extensions.AI IChatClient API
Transport
The client package includes a small transport abstraction for sendingRunAgentInput requests and receiving AG-UI event streams. The default path
uses HTTP POST and Server-Sent Events; custom transports are useful for tests or
non-HTTP environments.
- IAGUITransport - The transport
interface used by
AGUIChatClient - HTTP transport - Built-in HTTP+SSE behavior
- Custom transports - Plug in an in-memory or alternative wire protocol
Transport Reference
Understand the AG-UI client transport contract and HTTP event stream
Stateless by design
AG-UI endpoints are stateless from the .NET client’s perspective. Each request sends the full message history, and returnedChatResponseUpdate objects do not
surface a ConversationId. Updates are correlated by ResponseId, which maps
to the AG-UI run id. The AG-UI thread id is available from the RUN_STARTED
event and as AdditionalProperties["agui_thread_id"].
For the protocol types carried over the wire, see the
.NET event reference.