Skip to content

.NET: [Bug]: AG-UI Client event type of agent response #3216

@jasmin-software

Description

@jasmin-software

Description

I am trying to build a .NET demo app to showcase AG-UI, the client is just a simple CLI. I want to highlight how the interface can be interactive (depending on the event from each update I get from the agent). This is what I currently have

AGUIChatClient aguiClient = new(httpClient, serverUrl);
AIAgent agent = aguiClient.CreateAIAgent(name: "agui-client", description: "AG-UI Client Agent");



var updates = agent.RunStreamingAsync(input);
await foreach (AgentRunResponseUpdate message in updates)
{...}

I want to implement something similar to the below code snippet, but in C#. I cannot figure out how I can determine the event types returned by the agent. Does the feature exist in C# at all?

const r = await agent.runAgent(
            {},
            {
              onTextMessageStartEvent() {
                process.stdout.write(":robot: AG-UI assistant: ");
              },
              ...
            },
          );

This Typescript code snippet from HackerNoon (https://hackernoon.com/building-your-first-ag-ui-app-a-smart-echo-agent-implementation).

Code Sample

Error Messages / Stack Traces

Package Versions

"Microsoft.Agents.AI" Version="1.0.0-preview.260108.1" , "Microsoft.Agents.AI.AGUI" Version="1.0.0-preview.260108.1"

.NET Version

No response

Additional Context

No response

Metadata

Metadata

Assignees

Labels

.NETbugSomething isn't working

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions