Skip to content

.NET: [Bug]: AGUIChatClient sets ConversationId in response despite being stateless #4869

@ArturDorochowicz

Description

@ArturDorochowicz

Description

I have an AGUIChatClient working against Agent Framework's MapAGUI endpoint.

I see that the response from GetResponseAsync has ConversationId set. Reading https://learn.microsoft.com/en-us/dotnet/ai/ichatclient#stateless-vs-stateful-clients tells me that it signifies a stateful service, but if I pass it in ChatOptions to a subsequent call with just the new input, the model's response indicates it has no previous context.

This also seems to confuse AIAgent. If I do AsAIAgent on AGUIChatClient, then CreateSessionAsync and pass the session to multiple RunAsync calls with just the new input, the model's response indicates it has no previous context.

Code Sample

using var client = new AGUIChatClient(httpClient, "endpoint");
var agent = client.AsAIAgent();

var session = await agent.CreateSessionAsync();
var r1 = await agent.RunAsync("What is the area of France?", session);

var confused = await agent.RunAsync("What is its capital?", session);
// response indicates that model has no previous context

Error Messages / Stack Traces

Package Versions

Microsoft.Agents.AI.AGUI 1.0.0-preview.260311.1

.NET Version

.net 10

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions