Skip to content

.NET: AG-UI support for workflow as agent #2494

Description

I've been trying to use AG-UI in the following setup:

Copilotkit app (Nextjs) connecting to .net AG-UI endpoint.

Now, I can successfully kick off the orchestration, but after the workflow is done, I don't see the events being sent back to the client.
Do I need to do some sort of mapping between the workflow events and the AG-UI events manually or is that handled automatically by the AG-UI server extension?

Activity

  1. added
    .NETUsage: [Issues, PRs], Target: .Net
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Nov 28, 2025
  2. changed the title [-]AG-UI support for workflow as agent[/-] [+].NET: AG-UI support for workflow as agent[/+] on Nov 28, 2025
  3. added and removed
    triageUsage: [Issues], Target: All issues that still need to be triaged
    on Nov 28, 2025
  4. javiercn commented on Nov 28, 2025

    @javiercn
    Contributor

    Discussed this offline with Kosta Petan (@kostapetan)

    This can be made to work with a delegating agent that translates the workflow events to ChatResponseUpdates. It will work for the response contents that we know how to map (Text and Tool Calls) but we don't have a way of representing other AG-UI events like Activities or Steps.

    We need to come up with an agreement on how we want to map those things from Microsoft.Extensions.AI into the equivalent AG-UI event. One option is to use DataContent and provide the event with a custom mime-type like application/ag-ui-step-start+json and map the content to the event directly.

    Another alternative will involve adding public API for this as requested in #2270

    We will discuss this in the near future.

  5. markwallace-microsoft commented on Mar 20, 2026

    @markwallace-microsoft
    Contributor

    Kosta Petan (@kostapetan), friendly reminder — this issue is waiting on your response. Please share any updates when you get a chance. (This is an automated message.)

  6. kostapetan commented on Mar 20, 2026

    @kostapetan
    Author

    Well, are workflows supported in the AG-UI integration? After talking to Javier Calvarro Nelson (@javiercn) a while ago, I did this workaround (wrapper class), is this natively supported now?

  7. added
    questionUsage: [Issues, PRs], Target: all issues or PRs where additional context is needed from the author
    and removed on Jun 22, 2026
  8. danroth27 commented on Jul 23, 2026

    @danroth27
    Member

    Quick status on this for .NET. Verified against the current AG-UI-enabled MAF release (v1.14 — packages Microsoft.Agents.AI 1.15.0, Microsoft.Agents.AI.Hosting.AGUI.AspNetCore 1.15.0-preview.260722.1, AGUI.Server 0.0.4).

    What works today. A workflow exposed as an agent — AgentWorkflowBuilder.BuildSequential(...).AsAIAgent(name: ...) mapped with app.MapAGUIServer("/workflow", agent) — streams each constituent agent's output over AG-UI: TEXT_MESSAGE_* and TOOL_CALL_* / TOOL_CALL_RESULT events arrive, and each is tagged with the agent that produced it (the agent name flows through as AuthorName). So a client does see the agents' text and tool activity as the workflow runs.

    What's still pending. The workflow's own lifecycle events — the WorkflowEvent family (executor/step started & completed, progress/activity, edge transitions) — are not yet mapped to AG-UI events. The stream carries the agents' chat output but nothing that says "step 2 of the workflow started/finished," which is what this issue is about.

    Plan. This is a known gap: workflow events need to be mapped to AG-UI, and a fix to add that support to MAF is planned. (Python had a parallel ask in #3872 for custom WorkflowEvent emission.)

    Related: #4902 (make it clear which agent is executing in multi-agent workflows) — the AuthorName tagging above covers the identification half, but not the workflow-lifecycle half.

  9. JORDAAAN1495 commented on Nov 4, 2026

    @JORDAAAN1495

    Hey Daniel Roth (@danroth27) Javier Calvarro Nelson (@javiercn)
    Any updates on this issue and if PR #7738 resolves it?
    Appreciate any update you could provide.
    Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

.NETUsage: [Issues, PRs], Target: .Netag-uiUsage: [Issues, PRs], Target: AG-UI protocol integrationquestionUsage: [Issues, PRs], Target: all issues or PRs where additional context is needed from the author

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions