Microsoft Agent Framework: Building Production-Grade AI Agents with 11.6k+ GitHub Stars
Microsoft Agent Framework: Building Production-Grade AI Agents with 11.6k+ GitHub Stars
Microsoft Agent Framework (MAF) has emerged as the unified successor to AutoGen and Semantic Kernel, consolidating two of the most influential open-source agent frameworks into a single, production-ready platform. With 11.6k GitHub stars and active development (latest commits within hours), MAF represents Microsoft's definitive answer to building enterprise-grade AI agents and multi-agent workflows. Reaching 1.0 GA on April 2, 2026, it now powers real-world applications across Python and .NET ecosystems, combining the simplicity of AutoGen's agent abstractions with Semantic Kernel's enterprise features.
What is Microsoft Agent Framework?
Microsoft Agent Framework is an open-source, multi-language SDK and runtime for building production-grade AI agents and multi-agent workflows. Created by the same teams behind AutoGen and Semantic Kernel, MAF unifies the best of both worlds: AutoGen's clean agent programming model and Semantic Kernel's enterprise-grade features like session-based state management, type safety, middleware, and comprehensive observability.
At its core, MAF provides two primary capabilities: individual agents that leverage LLMs to process inputs, call tools, and generate responses, and graph-based workflows that orchestrate multiple agents and functions for complex multi-step tasks. The framework supports virtually every major LLM provider—Microsoft Foundry, Anthropic, Azure OpenAI, OpenAI, Ollama, and more—with consistent APIs across Python and .NET implementations.
Unlike lightweight agent libraries, MAF is purpose-built for production scenarios where durability, observability, governance, and human-in-the-loop control matter. It ships with built-in patterns for long-running sessions, automatic context compaction, tool approval workflows, and integrated OpenTelemetry tracing. The framework's philosophy is clear: focus on agent logic, not plumbing.
Core Features and Architecture
1. Multi-Language Support with Consistent APIs
MAF provides full framework support for both Python and C#/.NET with identical concepts and APIs. Developers can write agents in their preferred language without learning different abstractions. The Python packages are available via PyPI, while .NET packages ship through NuGet, both with comprehensive documentation and samples.
2. Agent Harness: Production Patterns Built In
The Agent Harness layer encapsulates production-ready patterns that would otherwise require custom implementation. It includes automatic context compaction to prevent context window overflow during long tool-calling chains, built-in default instructions for task breakdown and reasoning, and instruction merging that layers harness instructions with custom agent instructions. Providers like FileMemoryProvider, FileAccessProvider, TodoProvider, and AgentSkillsProvider enable file-based memory, filesystem access, task tracking, and modular capability injection—all configured with sensible defaults.
3. Foundry Hosted Agents: From Local to Production
Once an agent runs locally, deploying to production typically requires significant infrastructure work. Foundry Hosted Agents simplifies this: agents scale to zero when idle, resume with filesystem intact, provide per-session isolation with persistent state, and include built-in observability that flows directly into Application Insights. Turning a local agent into a hosted agent requires only a few lines of code.
4. CodeAct: Faster Agents with Fewer Model Turns
Many agent bottlenecks stem from orchestration overhead rather than model quality. CodeAct collapses the traditional tool-calling loop: instead of choosing a tool, waiting, and choosing the next one, the model writes a single Python program that calls tools via call_tool(…), runs it in a sandbox, and returns consolidated results. On representative multi-step workloads, CodeAct achieves 52.4% latency reduction and 63.9% token savings compared to traditional approaches.
5. Workflow Orchestration with Graph-Based Patterns
For complex multi-agent systems, MAF provides graph-based workflows supporting sequential, concurrent, handoff, and group collaboration patterns. The Handoff pattern is particularly powerful: declare agents and directed edges between them, and the framework injects handoff tools each agent uses to transfer control. Topology and guardrails stay with the developer; routing decisions stay with the agents.
6. Comprehensive Observability and Middleware
Built-in OpenTelemetry integration provides distributed tracing, monitoring, and debugging capabilities. Middleware system enables request/response processing, exception handling, and custom pipelines. ToolApprovalAgent supports "don't ask again" approval rules for sensitive tool calls, while OpenTelemetryAgent provides automatic semantic conventions tracing.
Get free AI agent insights weekly
Join our community of builders exploring the latest in AI agents, frameworks, and automation tools.
Getting Started
Installation
For Python, install via pip:
pip install agent-frameworkFor .NET, use the NuGet package manager:
dotnet add package Microsoft.Agents.AI
dotnet add package Microsoft.Agents.AI.Foundry
dotnet add package Azure.AI.Projects
dotnet add package Azure.IdentityYour First Agent (Python)
from agent_framework.foundry import FoundryChatClient
from azure.identity import AzureCliCredential
credential = AzureCliCredential()
client = FoundryChatClient(
project_endpoint="https://your-foundry-service.services.ai.azure.com/api/projects/your-project",
model="gpt-5.4-mini",
credential=credential,
)
agent = client.as_agent(
name="HelloAgent",
instructions="You are a friendly assistant. Keep your answers brief.",
)
result = await agent.run("What is the largest city in France?")
print(f"Agent: {result}")Your First Agent (.NET)
using Azure.AI.Projects;
using Azure.Identity;
using Microsoft.Agents.AI;
AIAgent agent = new AIProjectClient(
new Uri("https://your-foundry-service.services.ai.azure.com/api/projects/your-project"),
new AzureCliCredential())
.AsAIAgent(
model: "gpt-5.4-mini",
instructions: "You are a friendly assistant. Keep your answers brief.");
Console.WriteLine(await agent.RunAsync("What is the largest city in France?"));Real-World Use Cases
1. Research and Analysis Automation
Organizations use MAF agents to autonomously research topics, compile findings, and generate reports. The Agent Harness's FileMemoryProvider enables agents to persist notes and learnings across sessions, while web search capabilities provide real-time information access. This is particularly valuable for competitive intelligence, market research, and technical documentation generation.
2. Customer Support Triage and Resolution
Multi-agent workflows with the Handoff pattern route customer inquiries to specialized agents (billing, technical support, account management). Agents can ask clarifying questions, escalate when needed, and maintain context across handoffs. Human-in-the-loop approval for sensitive actions (account changes, refunds) ensures governance while maintaining automation efficiency.
3. Code Generation and Development Assistance
GitHub Copilot SDK integration enables agents to write, test, and refactor code. CodeAct dramatically reduces latency for multi-step coding tasks. Developers use MAF agents to scaffold projects, generate boilerplate, and automate repetitive development workflows.
4. Enterprise Workflow Orchestration
Complex business processes involving multiple systems benefit from MAF's workflow orchestration. Sequential workflows handle step-by-step processes, concurrent patterns parallelize independent tasks, and handoff patterns manage specialist agent collaboration. Built-in session state management ensures long-running workflows survive transient failures.
How It Compares
vs. LangGraph
LangGraph excels at low-level workflow control with explicit state management and graph visualization. MAF provides higher-level abstractions with built-in production patterns (harness, hosting, observability) and multi-language support. LangGraph is ideal for custom, fine-grained orchestration; MAF is ideal for teams prioritizing time-to-production and enterprise features.
vs. CrewAI
CrewAI focuses on role-based agent teams with hierarchical orchestration. MAF offers more flexible graph-based patterns and deeper enterprise integration (Foundry hosting, OpenTelemetry, session management). CrewAI is simpler for role-based scenarios; MAF is more powerful for complex, production-grade systems.
vs. AutoGen (Legacy)
MAF is the direct successor to AutoGen, incorporating its agent abstractions while adding Semantic Kernel's enterprise features. AutoGen users should migrate to MAF for better session management, type safety, and production support. The migration path is straightforward, with official guides available.
What is Next
The Microsoft Agent Framework roadmap reflects community feedback and enterprise requirements. Upcoming priorities include expanded MCP (Model Context Protocol) server support for broader tool integration, enhanced durable execution patterns for mission-critical workflows, and deeper integration with Azure AI Foundry services. The team is also investing in agent evaluation frameworks to systematically measure performance and reliability.
The framework's trajectory is clear: MAF is becoming the standard platform for production AI agents in the Microsoft ecosystem and beyond. With 1.0 GA achieved and active development continuing, now is the ideal time for teams to adopt MAF and build the next generation of intelligent applications.
Sources
- Microsoft Agent Framework GitHub Repository - June 2026
- Microsoft Agent Framework Official Documentation - Microsoft Learn
- Microsoft Agent Framework at BUILD 2026 Announcement - June 3, 2026
- Microsoft Agent Framework Workflows Documentation - Microsoft Learn
- agent-framework PyPI Package - Python Package Index