Skip to main content

AGUI.Client

The AG-UI .NET Client SDK adapts an AG-UI endpoint to the standard Microsoft.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.
dotnet add package AGUI.Client
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.

AGUIChatClient Reference

Consume an AG-UI endpoint through the Microsoft.Extensions.AI IChatClient API

Transport

The client package includes a small transport abstraction for sending RunAgentInput 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.

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 returned ChatResponseUpdate 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.