PythonMedium — primitives with opinions

Microsoft Agent Framework (Semantic Kernel / AutoGen lineage)

A single Microsoft-supported runtime for agents and multi-agent workflows in .NET and Python, merging Semantic Kernel's enterprise plumbing with AutoGen's multi-agent orchestration patterns.

Architecture

  • Lineage: Semantic Kernel (2023, plugins/planners/connectors, .NET-first) and AutoGen (Microsoft Research, conversational multi-agent) were both maintained separately; the Agent Framework (2025) is the announced successor that unifies them, with SK and AutoGen moving to maintenance.
  • Agents: ChatAgent/AIAgent wrap a chat client (Azure OpenAI, OpenAI, Azure AI Foundry, others) with instructions, tools, and threads for conversation state; Foundry-hosted agents are first-class.
  • Workflows: a graph of executors connected by typed edges, with sequential, concurrent, handoff, and group-chat orchestration patterns lifted from AutoGen; supports checkpointing and human-in-the-loop request/response nodes.
  • Tools and middleware: function tools from typed signatures, MCP server support, and middleware hooks around model and tool calls for logging, filtering, and approval.
  • Observability via OpenTelemetry out of the box, plus DevUI for local inspection; C# and Python APIs are kept deliberately parallel.

Best use cases

  • Enterprises on Azure / .NET that want vendor-supported agents integrated with Entra ID, Azure AI Foundry, and existing C# services.
  • Group-chat and handoff multi-agent experiments (the AutoGen heritage).
  • Organisations that value long-term support commitments over the newest API design.

Weaknesses

  • Transition risk: three overlapping projects (Semantic Kernel, AutoGen 0.2/0.4, Agent Framework) with different APIs; much online material targets the older two.
  • Azure gravity: works with other providers, but hosted agents, identity, and deployment guidance assume Azure.
  • Enterprise-style layering (kernels, plugins, connectors, threads) is verbose for small services.
  • Group-chat orchestration is easy to make expensive and hard to make reliable; the framework does not stop you from building a chatty, non-terminating swarm (When Not to Use Multi-Agent).
  • Python docs and samples historically lag .NET; expect to read source.

When NOT to use it

  • Small teams outside the Microsoft ecosystem — lighter runtimes are faster to learn and ship.
  • You need the API to be stable for years right now; the consolidation is still settling.
  • Single-agent, single-provider services where a plain SDK loop suffices.

Code example

Illustrative — APIs change between versions.

1# Illustrative: Agent Framework Python API; names are version-sensitive during the SK/AutoGen consolidation.
2from agent_framework import ChatAgent
3from agent_framework.azure import AzureOpenAIChatClient
4from agent_framework.workflows import WorkflowBuilder
5
6def get_invoice(invoice_id: str) -> dict:
7 """Fetch an invoice by id."""
8 return billing.get(invoice_id)
9
10client = AzureOpenAIChatClient(deployment_name="gpt-4.1") # credentials via env / Entra ID
11
12finance = ChatAgent(chat_client=client, name="finance",
13 instructions="Answer invoice questions using tools only.", tools=[get_invoice])
14reviewer = ChatAgent(chat_client=client, name="reviewer",
15 instructions="Check the answer for policy violations; reply APPROVED or a fix.")
16
17# Typed executor graph: finance -> reviewer, with checkpointing available on the builder
18workflow = (WorkflowBuilder()
19 .set_start_executor(finance)
20 .add_edge(finance, reviewer)
21 .build())
22
23result = await workflow.run("Why was invoice INV-9 charged twice?")
24print(result.get_outputs())

Alternatives

Related lessons