Agent Framework: Conversational Chat
The minimum code needed for multi-turn, streaming chat with the Agent Framework - no model picker, no chrome.
Table of Contents
How It Works
Try It
How It Works
ChatService.ChatStreamAsync maps that tuple list onto ChatMessage objects and
forwards it to AIAgent.RunStreamingAsync, yielding text deltas as they arrive:
Loading Monaco Editor...
The UI below appends each delta to a buffer, and once the stream ends, commits the buffer as a new
("assistant", ...) entry in the same list - so the next send includes it as history.
Try It
References
For more detailed information and advanced scenarios, check out these helpful resources:
AIAgent.RunStreamingAsync
Streaming responses from an AIAgent, part of the Agent Framework overview.