DEV Community

Cover image for How Microsoft Agent Framework + AG-UI Enable Agentic UX & Generative UI
Nathan Tarbert for CopilotKit

Posted on

How Microsoft Agent Framework + AG-UI Enable Agentic UX & Generative UI

Building with the Microsoft Agent Framework + AG-UI

Microsoft’s Agent Framework (MAF) is an open-source agent framework that has recently emerged, offering exceptional ways to build agents and multi-step workflows in .NET or Python. Paired with AG-UI, the frontend/runtime layer that enables those agents to appear in your app with a clean UI, streaming responses, and shared state, etc., delivers a seamless agentic experience.

The integration between the two is simple but powerful: MAF handles the reasoning and tool-use, and AG-UI bridges the interactions between the agent and the users.

Microsoft Agent Framework (MAF) and AG-UI together offer a clean separation:

  • MAF handles the agent’s intelligence, workflows, memory, and tool use.
  • AG-UI is the open protocol that standardizes how agents communicate with user interfaces.

Diagram1

Once an agent speaks AG-UI, it becomes immediately compatible with any AG-UI-aware frontend, including Microsoft’s own Blazor client and CopilotKit.

This combination is what turns MAF agents from “backend processes” into interactive, stateful, user-facing agents.


What the Microsoft Agent Framework Provides

MAF provides the core building blocks:

  • Agents that call models, use tools, and keep state across turns.
  • Workflows for multi-step or multi-agent processes.
  • Model and memory providers so your agents can store data or thread context.

Check out MAF GitHub ⭐️

It’s practical if you want to move past “chat completion” and give the model structure, state, and the ability to act.

graph

What AG-UI Adds to the Picture

AG-UI is the open protocol that defines how an agent communicates with a user interface.

diagram

It standardizes things like:

  • Streaming messages
  • State updates
  • Tool invocations
  • UI events
  • Multi-agent routing
  • Interruptions / tool-progress events
  • Frontend → agent actions

This removes the need to design your own transport, your own formatting, your own event system, or your own UI message schema.

Instead of every framework inventing its own UI contract, AG-UI is the shared layer they converge on.

Check out AG-UI's GitHub ⭐️

Microsoft Agent Framework + AG-UI

1. MAF agents become UI-ready out of the box

  • No additional custom wiring.
  • No custom WebSockets.
  • No bespoke JSON formats.

The agent speaks AG-UI, which removes any additional complexities.

2. Multi-step workflows can surface naturally in UI

Because AG-UI supports state sync and streaming, a MAF workflow can show:

  • intermediate states
  • partial outputs
  • tool progress
  • agent-to-agent handoffs
  • moments where the agent needs user input

This is critical for user trust and usability.

3. Typed state becomes visible to the user

MAF agents often maintain a structured state (objects, lists, workflow context).

AG-UI transports this state to the frontend, where it can drive live UI components.

4. Use of tools

AG-UI can show:

  • When a tool was invoked
  • What parameters were used
  • What the tool returned

This is a major improvement over hidden function-calling flows.

5. Use any AG-UI-compatible frontend

Once your MAF agent speaks AG-UI, you can plug it into:

  • CopilotKit
  • Microsoft Blazor
  • Terminal Client
  • Kotlin SDK (mobile, JVM)

This gives the agent a portable, future-proof interface layer.


Why This Matters for Developers

Blog cover

A complete agent loop

Agent → protocol → frontend → user → agent

No custom engineering required.

A more interpretable agent

With streaming, intermediate states, and exposed tool use, you can debug and trust the agent in a way plain chat completions don’t allow.

This allows a path to build real applications

  • SaaS copilots
  • Co-creation copilots
  • automation agents

All while retaining clear structure and maintainability.

Additionally, the developer doesn't need to reinvent the wheel.

--> MAF handles reasoning + tools.

--> AG-UI handles communication + events.

--> The user is now able to collaborate with the agent in real time.

The stack is clean.


Summary

Microsoft Agent Framework gives you an agent with: tools, workflows, state, orchestration, and model thinking.

AG-UI gives that agent a standardized way to interact with the user, whether on mobile or desktop.

Together, they let you build agents that aren’t constrained to the backend, but usable, visible, and connected to real applications.

To stay up to date, please follow CopilotKit on Twitter and join the Discord community.

Top comments (9)

Collapse
 
johncook1122 profile image
John Cook

We've gone back and forth with a bunch of agent frameworks, but as a Microsoft shop we've been waiting for this for a long time. I have followed CopilotKit for quite a while now and love what you do but let me tell you, AG-UI is brilliant!

Collapse
 
nathan_tarbert profile image
Nathan Tarbert CopilotKit

Thanks, John, great to hear. Excited to see the agentic experience you build on top of it.

Collapse
 
the_greatbonnie profile image
Bonnie CopilotKit

I love how Microsoft Agent Framework and AG-UI work out of the box.

Collapse
 
nathan_tarbert profile image
Nathan Tarbert CopilotKit

Same here, Bonnie, it's been pretty impressive!

Collapse
 
steven0121 profile image
Steven

Thanks for sharing!!!

Collapse
 
ferguson0121 profile image
Ferguson

Oh wow this is pretty cool

Collapse
 
samcurran12 profile image
Sammy Scolling

It sure seems like agentic UX is the future. Definitely want to try out MAF.

Collapse
 
johnsnow221 profile image
ethan_snow

I've been diving into agents for about six months as my company has expedited their AI initiatives. Amazing job explaining how the Microsoft Agent Framework and AG-UI work together.

Collapse
 
jal_c_68347 profile image
Jalissia_C

Wow, love this!