Stephen Toub 03ef7f054f .NET: Add AgentWorkflowBuilder group chat (#861)
* Add AgentWorkflowBuilder group chat

And fix a variety of issues along the way:
- Use DateTime{Offset}.UtcNow rather than Now
- AIAgentHostExecutor shouldn't be publishing empty messages
- Sequential workflows should be flowing all history and not just the output from the previous agent as the input into the next agent
- Renamed some of the new agent workflow methods... still not super happy with the shape, though
- Simplified handoffs builder, e.g. using a hashset with a custom comparer instead of a dictionary
- Improved multi-service use by trying to change assistant->user role for messages created by other agents
- Changed MessageMerger to rely on M.E.AI's coalescing more and to avoid empty contents / text
- Ensured that messages from ChatClientAgent include MessageId and CreatedAt timestamps
- Avoided including instructions for agents in a handoff workflow that don't have any handoffs
- Removed the unnecessary end function in handoffs
- Improved naming of executors to include agent name for debuggability
- Use "N" formatting with Guid.ToString everywhere, to avoid the unnecessary extra dash character which is also not valid in various places (like function tool names)
- Replace `params T[]` with `params IEnumerable<T>` to make public APIs more flexible in what they consume

* Address feedback

- Fix unintentional provider change in sample
03ef7f054f · 2025-09-24 16:38:34 +00:00
396 Commits
2025-09-23 15:10:06 +00:00
2025-04-28 12:54:43 -07:00
2025-04-28 12:54:42 -07:00
2025-09-02 12:18:12 +00:00

Microsoft Agent Framework

Welcome to the Private Preview of Agent Framework!

You're getting early access to Microsoft's comprehensive multi-language framework for building, orchestrating, and deploying AI agents with support for both .NET and Python implementations. This framework provides everything from simple chat agents to complex multi-agent workflows with graph-based orchestration.

📋 Important Setup Information

Package Availability: Public PyPI and NuGet packages are not yet available. You have two options:

Option 1: Run samples directly from this repository (no package installation needed)

  • Clone this repository
  • For .NET: Run samples with dotnet run from any sample directory (e.g., dotnet/samples/GettingStarted/Agents/Agent_Step01_Running)
  • For Python: Run samples from any sample directory (e.g., python/samples/getting_started/minimal_sample.py) after setting up the local dev environment following this guide.

Option 2: Install packages in your own project

Stay Updated: This is an active project - sync your local repository regularly to get the latest updates.

💬 We want your feedback!

Highlights

  • Flexible Agent Framework: build, orchestrate, and deploy AI agents and workflows
  • Multi-Agent Orchestration: group chat, sequential, concurrent, and handoff patterns
  • Graph-based Workflows: connect agents and deterministic functions using data flows with streaming, checkpointing, time-travel, and Human-in-the-loop.
  • Plugin Ecosystem: extend with native functions, OpenAPI, Model Context Protocol (MCP), and more
  • LLM Support: OpenAI, Azure OpenAI, Azure AI Foundry, and more
  • Runtime Support: in-process and distributed agent execution
  • Multimodal: text, vision, and function calling
  • Cross-Platform: .NET and Python implementations

Below are the basics for each language implementation. For more details on python see here and for .NET see here.

More Examples & Samples

Python

.NET

Agent Framework Documentation

Languages
Python 50.9%
C# 45.8%
TypeScript 2.7%
HTML 0.2%
PowerShell 0.1%
Other 0.1%