Skip to content

Microsoft Agent Framework (Python)

Unified agent SDK that merges Semantic Kernel and AutoGen into one Pythonic library. Build single agents, multi-agent orchestration, cross-framework collaboration (A2A), and declarative workflows against the same primitives.

Install

Terminal window
pip install agent-framework

Version

Core 1.2.2 stable · providers 1.0.0b260429 beta · May 2026 · Python 3.10 – 3.13

Best for

Azure-native agents, multi-agent orchestration via WorkflowBuilder, cross-framework A2A, declarative YAML agents.

A guided reading order across the comprehensive guide, 2025 features, advanced and production docs. Each checkpoint is a section — read linearly or dive in wherever suits you.

  • Stable core APIsagent-framework-core 1.2.2 with LTS commitment.
  • First-party chat clientsagent_framework.foundry.FoundryChatClient, agent_framework.openai.OpenAIChatClient, agent_framework.anthropic.AnthropicClient, plus Bedrock / Ollama in the 1.0.0b provider line.
  • Middleware@chat_middleware / @agent_middleware / @function_middleware decorators and base classes; pass middleware=[...] (must be a list in 2026 releases).
  • WorkflowsWorkflowBuilder with .add_edge / .add_chain / .add_fan_in_edges / .add_fan_out_edges / .add_switch_case_edge_group / .add_multi_selection_edge_group; checkpoint via FileCheckpointStorage / InMemoryCheckpointStorage.
  • Functional workflows (experimental)@workflow / @step decorators and RunContext for HITL and state — write workflows as plain async Python functions without graph wiring.
  • Declarative agents (beta)agent_framework.declarative.AgentFactory / WorkflowFactory load from YAML.
  • A2A (beta) — one class, agent_framework.a2a.A2AAgent, wraps a remote A2A endpoint as a local Agent.
import asyncio
from agent_framework import Agent
from agent_framework.openai import OpenAIChatClient
async def main():
agent = Agent(
client=OpenAIChatClient(), # positional or keyword
instructions="You are a helpful assistant.",
)
response = await agent.run("What is the Microsoft Agent Framework?")
print(response.text)
asyncio.run(main())

Previous drafts of this page used a ChatAgent(chat_client=...) minimal example. ChatAgent is not a public class in agent-framework-core 1.2.2 — the primary agent class is Agent and the keyword is client= (not chat_client=).

Ready for the full walk-through? Start with Core Fundamentals →


DateVersionChanges
2026-05-041.0.5Added dedicated Functional Workflows page covering @workflow, @step, RunContext, FunctionalWorkflow.as_agent(). Enhanced Graphs & Declarative page with WorkflowViz examples, add_chain, add_multi_selection_edge_group, @executor decorator, and Agent.as_tool(). All verified against agent-framework-core==1.2.2 source.
2026-05-011.0.4Bumped pinned core/provider versions to agent-framework-core==1.2.2 and 1.0.0b260429 provider line. Expanded streaming, function-middleware, functional-workflow, and feature-stage code examples after re-introspecting the installed library.
2026-04-221.0.3Added dedicated pages: Tools, Skills, Checkpointing, Compaction, Observability & Telemetry, Evaluation. Zero→Hero reflow to 18 steps; Jump-to-topic grid and Reference card grid updated.
2026-04-221.0.2Added dedicated pages: Model Providers, Orchestration, Middleware, MCP, Human-in-the-loop. Verified against source of agent-framework-core==1.1.0; corrected context_providers plural-vs-singular errata.
2026-04-211.0.1Index redesigned into Zero → Hero reading order + Jump-to-topic grid using Starlight cards.
2026-04-201.0.1Version pin corrected to v1.0.1; verified via agent-framework PyPI package.
April 16, 20261.0 GAGraduated from Preview; ChatClientAgentOptions.Instructions removed; first-party connectors; Azure App Service support.
November 20251.0 PreviewInitial Python guide; multi-agent orchestration.