Summary
MapAGUI() in Microsoft.Agents.AI.Hosting.AGUI.AspNetCore hardcodes session: null when calling aiAgent.RunStreamingAsync(), even though:
- A session store is configured via
.WithSessionStore()
- The
ag_ui_thread_id is available in AdditionalProperties
AIHostAgent has GetOrCreateSessionAsync(conversationId) ready to use
|
var messages = input.Messages.AsChatMessages(jsonSerializerOptions); |
This means every AG-UI request starts a fresh workflow run with no memory of the previous conversation state. The client must round-trip the entire message history each request. Which means a client can inject anything into the conversation.
Should AG-UI allow you to pass only the 'next' message, and re-use the existing session on the backend?
Environment
Microsoft.Agents.AI.Hosting.AGUI.AspNetCore 1.0.0-preview.260311.1
Microsoft.Agents.AI.Workflows 1.0.0-rc4
Microsoft.Agents.AI 1.0.0-rc4
Summary
MapAGUI()inMicrosoft.Agents.AI.Hosting.AGUI.AspNetCorehardcodessession: nullwhen callingaiAgent.RunStreamingAsync(), even though:.WithSessionStore()ag_ui_thread_idis available inAdditionalPropertiesAIHostAgenthasGetOrCreateSessionAsync(conversationId)ready to useagent-framework/dotnet/src/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore/AGUIEndpointRouteBuilderExtensions.cs
Line 46 in dd3d085
This means every AG-UI request starts a fresh workflow run with no memory of the previous conversation state. The client must round-trip the entire message history each request. Which means a client can inject anything into the conversation.
Should AG-UI allow you to pass only the 'next' message, and re-use the existing session on the backend?
Environment
Microsoft.Agents.AI.Hosting.AGUI.AspNetCore1.0.0-preview.260311.1Microsoft.Agents.AI.Workflows1.0.0-rc4Microsoft.Agents.AI1.0.0-rc4