Early Bird Ends Soon Code To Cloud Summit 2026 — May 23, Calgary — Lock in your ticket before prices go up

Microsoft Agent Frameworks Compared: Which One Should You Use?

Microsoft now has multiple agent frameworks and SDKs — and so does the open-source world. Here's a practical comparison with pros, cons, and a decision flowchart so you stop guessing and start building.

Microsoft Agent Framework architecture diagram showing agent orchestration
6+ Microsoft Agent SDKs
9.4K Agent Framework GitHub Stars
48.8K CrewAI GitHub Stars
29.1K LangGraph GitHub Stars

What's Inside

  • The Microsoft agent framework landscape — what exists and why there are so many
  • Microsoft Agent Framework (the flagship) — successor to Semantic Kernel + AutoGen
  • Foundry SDK and Foundry Agent Service — hosted agents on Azure
  • Microsoft 365 Agents SDK — building agents for Teams and Copilot
  • Open-source alternatives: LangGraph, CrewAI, and the PyTorch ecosystem
  • Pros and cons of each framework with honest trade-offs
  • Decision flowchart — pick the right framework in 60 seconds
  • What I learned deploying agents with Foundry in production

I get this question constantly: "Which Microsoft agent framework should I use?" And honestly, I don't blame anyone for being confused. With so many Microsoft agent frameworks now available — Agent Framework, Foundry SDK, M365 Agents SDK, Semantic Kernel, plus a wave of open-source options — the landscape is genuinely overwhelming for Alberta businesses and startups trying to pick the right one.

I recently deployed agents in the new Microsoft Foundry experience and built out our Azure Agentic Engineering open-source repo to document the patterns. This article is the comparison guide I wish existed when I started.

New to AI agents? Start with our getting started with AI guide for the fundamentals before diving in.

The Microsoft Agent Framework Landscape

Let's start by mapping the territory. Microsoft doesn't have one agent framework — they have several, each targeting a different audience and deployment model. Here's the quick overview:

Framework What It Does Best For Languages
Microsoft Agent Framework Build & orchestrate agents locally with graph-based workflows Multi-agent systems, custom orchestration Python, .NET
Foundry SDK Connect to Azure Foundry for hosted agents, models, evals Azure-hosted AI workloads Python, .NET, JS, Java
Foundry Agent Service Fully managed agent hosting inside Foundry Production agents that need enterprise controls Any (API-based)
M365 Agents SDK Deploy agents to Teams, Copilot, and M365 channels Deep M365 channel control (Foundry can also publish to Teams/Copilot) C#, JS, Python
Semantic Kernel AI orchestration SDK (predecessor, still maintained) Existing SK users, simpler chat scenarios C#, Python, Java
Copilot Studio Low-code/no-code agent builder Business users, rapid prototyping No-code

If you're thinking "why so many?" — Microsoft evolved here organically. Semantic Kernel and AutoGen were separate projects. Agent Framework is their unification, combining AutoGen's simple abstractions with Semantic Kernel's enterprise features. The other SDKs target different deployment surfaces (Azure vs. M365 vs. local).

Microsoft Agent Framework — The Flagship

This is the one to pay attention to. Microsoft Agent Framework (9.4K GitHub stars, 125+ contributors) is the direct successor to both Semantic Kernel and AutoGen, built by the same teams.

Microsoft Agent Framework

Open-source framework for building, orchestrating, and deploying AI agents. Supports graph-based workflows, multi-agent patterns, and multiple LLM providers.

Strengths
  • Graph-based workflows with checkpointing
  • Human-in-the-loop support built in
  • Python and .NET with consistent APIs
  • Deep Foundry integration
  • OpenTelemetry observability
  • Multi-provider (OpenAI, Anthropic, Ollama, etc.)
  • Migration paths from SK and AutoGen
  • A2A and AG-UI protocol support
Trade-offs
  • Just reached 1.0 GA (April 2026) — ecosystem still catching up
  • Smaller community than LangGraph or CrewAI
  • Documentation still maturing
  • Best experience is Azure-centric
  • TypeScript support is limited

When to use it: You need multi-agent orchestration with explicit control over execution. You want graph-based workflows. You're building on Azure or need deep Microsoft integration. You're migrating from Semantic Kernel or AutoGen.

The key decision Microsoft's docs highlight is straightforward:

Use Agents When... Use Workflows When...
Task is open-ended or conversational Process has well-defined steps
You need autonomous tool use and planning You need explicit control over execution order
A single LLM call (possibly with tools) suffices Multiple agents or functions must coordinate

And the golden rule from their docs: "If you can write a function to handle the task, do that instead of using an AI agent."

Foundry SDK & Foundry Agent Service

The Foundry SDK is your bridge to Azure's AI platform. It connects to a single project endpoint that provides access to models, agents, evaluations, and tools.

Foundry SDK + Agent Service

Azure-native platform for hosted agents. Agents run inside Foundry with built-in tool orchestration, VNet isolation, evals, and MCP auth.

Strengths
  • Single endpoint for models, agents, and tools
  • Full VNet isolation — no public egress
  • Built-in evals and Azure Monitor integration
  • MCP with complete auth coverage
  • OpenAI-compatible Responses API
  • Managed infrastructure — no servers to maintain
Trade-offs
  • Azure lock-in for hosted agents
  • Cost can be significant at scale
  • Less control over orchestration internals
  • SDK v2 just reached GA — some extension packages still in beta

When to use it: You want managed agent hosting on Azure. Security and compliance are non-negotiable (VNet isolation, RBAC, managed identity). You need built-in observability. You want to pair hosted agents with the Agent Framework for local orchestration.

The Foundry SDK exposes two client types — a Project client for Foundry-native operations and an OpenAI-compatible client for running agents, evaluations, and calling models. Most production apps use both.

I covered the Foundry Agent Service GA announcement in detail — check that post for the full breakdown of capabilities including Voice Live and MCP auth.

Microsoft 365 Agents SDK

The M365 Agents SDK targets a different surface entirely — deploying agents to Microsoft Teams, Copilot, and other M365 channels.

Microsoft 365 Agents SDK

Build agent containers deployable to Teams, Copilot, and web apps. AI-agnostic — bring any model or orchestration framework.

Strengths
  • Native Teams and Copilot integration
  • AI-agnostic — plug in any model or service
  • State, storage, and activity management built in
  • C#, JavaScript, and Python support
  • Can wrap Agent Framework or Semantic Kernel agents
Trade-offs
  • M365-focused — less useful outside Microsoft ecosystem
  • Activity protocol has a learning curve
  • Limited orchestration — you add your own
  • Requires M365 infrastructure

When to use it: Your agents need to live in Teams or Copilot. You're building for a Microsoft 365 enterprise environment. You want channel management (deploy once, reach Teams + web + Copilot).

Worth noting: You can now publish agents to Teams and Copilot directly from the new Microsoft Foundry experience as well — meaning you don't have to use the M365 Agents SDK to get your agents into those channels. If your agent is already built with Agent Framework and hosted in Foundry, publishing to Teams or Copilot is a configuration step, not a rebuild.

Comparing Microsoft Agent Frameworks to Open-Source Alternatives

This is where the conversation gets interesting. Microsoft's frameworks aren't your only options — and depending on your requirements, the open-source alternatives may be the better fit.

LangGraph (by LangChain)

LangGraph

Low-level orchestration framework for building stateful agents as graphs. 29.1K GitHub stars. Trusted by Klarna, Replit, Elastic, and more.

Strengths
  • Massive community and ecosystem
  • Durable execution — survives failures
  • Human-in-the-loop at any point
  • Short-term and long-term memory
  • LangSmith for debugging and observability
  • Provider-agnostic — any LLM
  • Python and JavaScript/TypeScript
Trade-offs
  • Significant boilerplate for complex agents
  • LangChain dependency can add weight
  • State management patterns are complex
  • LangSmith (observability) is commercial
  • No native .NET support

When to use it: You need a mature, provider-agnostic solution. Your team knows Python or TypeScript. You want fine-grained control over execution graphs. You're not locked into Azure.

CrewAI

CrewAI

Fast, standalone Python framework for multi-agent orchestration. 48.8K GitHub stars. Built from scratch — no LangChain dependency. 100K+ certified developers.

Strengths
  • Standalone — no heavy dependencies
  • Role-based agent design is intuitive
  • Crews (autonomy) + Flows (control) architecture
  • Fastest growing community (48.8K stars)
  • Great documentation and courses
  • Enterprise offering (AMP Suite)
  • Reportedly 5.7x faster than LangGraph in some benchmarks
Trade-offs
  • Python only — no .NET, no TypeScript
  • Less granular control than LangGraph
  • Telemetry is opt-out, not opt-in
  • Enterprise features require AMP license
  • Smaller enterprise adoption than LangGraph

When to use it: You want the simplest path to multi-agent workflows. Your team is Python-native. You prefer role-based agent design (researcher, analyst, writer). You want minimal boilerplate.

PyTorch & the Foundation Ecosystem

This one requires context. PyTorch itself isn't an agent framework — it's the foundational ML framework that powers virtually all modern AI. But the PyTorch Foundation (under the Linux Foundation) is expanding into an umbrella organization that increasingly matters for agent developers:

PyTorch isn't a direct alternative to Agent Framework or CrewAI — it's the layer underneath. When you self-host Llama or Mistral models that power your agents, PyTorch and its ecosystem are what makes that possible.

When it matters: You're self-hosting models (not using cloud APIs). You need to fine-tune or compress models for your agent use cases. You want complete control over the inference stack. You're building agents that run at the edge or on-device.

Not sure which framework fits your architecture? We help Calgary startups and growing businesses across Western Canada navigate exactly this decision.

Book a Free Strategy Call

Decision Flowchart: Pick the Right Framework

Here's the decision tree I use when advising Alberta businesses and startups on which framework to adopt:

START: What are you building? │ ├─ Agents for Teams/Copilot/M365? │ ├─ Already building in Foundry? │ │ └─→ Publish from Foundry (config step, no rebuild) │ └─ Need deep M365 channel management? │ └─→ M365 Agents SDK (wrap Agent Framework or SK inside) │ ├─ Agents hosted on Azure with enterprise controls? │ ├─ Need managed hosting, VNet isolation, evals? │ │ └─→ Foundry Agent Service (via Foundry SDK) │ └─ Need local orchestration with Foundry models? │ └─→ Microsoft Agent Framework + Foundry SDK │ ├─ Multi-agent workflows, custom orchestration? │ ├─ Team uses .NET? │ │ └─→ Microsoft Agent Framework │ ├─ Team uses Python, want simplest path? │ │ └─→ CrewAI │ ├─ Team uses Python/TS, need fine-grained graph control? │ │ └─→ LangGraph │ └─ Team uses Python, want Azure integration? │ └─→ Microsoft Agent Framework │ ├─ Simple chat agent, single LLM call + tools? │ └─→ OpenAI SDK or Foundry SDK direct (no framework needed) │ ├─ Self-hosting models, need full control? │ └─→ PyTorch ecosystem (vLLM + your framework of choice) │ └─ Low-code, non-developer team? └─→ Copilot Studio

Head-to-Head Comparison

For the visual learners, here's everything in one table:

Feature MS Agent Framework Foundry Agent Service M365 Agents SDK LangGraph CrewAI
License MIT Commercial (Azure) MIT MIT MIT
Languages Python, .NET Any (API) C#, JS, Python Python, JS/TS Python only
Multi-Agent Graph-based workflows Via Agent Framework Add your own Graph-based Crews + Flows
Human-in-the-Loop Built-in Supported Activity-based Built-in Supported
Model Providers OpenAI, Anthropic, Ollama, etc. Azure models + direct Any (you bring it) Any via LangChain Any via config
Observability OpenTelemetry Azure Monitor Custom LangSmith AMP Suite
Hosting Self-hosted / Azure Managed on Azure Self-hosted Self / LangSmith Deploy Self / CrewAI Cloud
Enterprise Ready GA (1.0) GA GA Mature Growing
MCP Support Yes Yes (with auth) No Community Community
A2A Protocol Yes Via Agent Framework No No No
Teams/Copilot Via Foundry or M365 SDK Publish direct Native No No

Lessons from Production: What I Learned

I built and open-sourced the Azure Agentic Engineering repo a few weeks back to document real patterns for deploying agents on Azure. Here's what I learned the hard way:

  1. Start with the Foundry SDK if you're on Azure. The single-endpoint pattern (one URL for models, agents, and tools) dramatically simplifies configuration. Don't manage separate Azure OpenAI endpoints.
  2. Use Agent Framework for orchestration, not the Foundry Agent Service alone. Foundry Agent Service handles hosting. Agent Framework handles the multi-agent logic. They're complementary, not competing.
  3. DefaultAzureCredential everywhere. No API keys in code. Ever. Use managed identity in production — DefaultAzureCredential is fine for development but switch to ManagedIdentityCredential for production to avoid latency from credential probing.
  4. Don't over-agent. If a function can handle the task, write a function. Agents add latency, cost, and unpredictability. Reserve them for genuinely open-ended tasks.
  5. Observability from day one. Set up OpenTelemetry tracing before you scale. Debugging multi-agent systems without tracing is brutal.

The architecture pattern that worked best for us:

Production Architecture Pattern APIM (AI Gateway) │ ▼ Azure AI Foundry ──── Private Endpoint ┌────────────────────────────┐ │ Foundry Agent Service │ ← Hosted agents (VNet isolated) │ Agent Framework │ ← Local orchestration │ Models (GPT, Llama, etc.) │ ← Multi-model │ Evaluations │ ← Built-in monitoring └────────────────────────────┘ │ │ │ │ AI Search Storage Key Vault Teams/Copilot (RAG) (Data) (Secrets) (Publish direct) All private endpoints. No public egress.

For the full reference architecture and deployment templates, see our Azure AI Landing Zones guide and the Foundry Blueprints.

When to Go Open Source Instead

Microsoft's frameworks are excellent if you're in the Azure ecosystem. But there are clear cases where open-source alternatives win:

Scenario Recommended Why
Multi-cloud or cloud-agnostic LangGraph or CrewAI No Azure dependency
Python-only team, fastest start CrewAI Minimal boilerplate, intuitive role-based design
Complex stateful graphs, TypeScript LangGraph JS/TS support, mature graph execution
Self-hosted models PyTorch + vLLM + any framework Full stack control
Enterprise on Azure with .NET Microsoft Agent Framework Only option with deep .NET + Azure integration
Agents deployed to Teams/Copilot Foundry or M365 Agents SDK Foundry can publish directly; M365 SDK for deep channel control

The Bigger Picture: Cloud Adoption Framework for AI

Choosing a framework is just one decision in the Cloud Adoption Framework for AI. Microsoft's CAF AI guidance covers the full lifecycle: strategy, planning, readiness, governance, security, and management. Before you commit to a framework, make sure you've addressed:

Key Resources

Microsoft Frameworks

Open Source

Code To Cloud Resources

Connect with us on Discord! Join the Code to Cloud community here.

Frequently Asked Questions

What is the difference between Microsoft Agent Framework and Semantic Kernel?

Microsoft Agent Framework is the successor to both Semantic Kernel and AutoGen. It unifies AutoGen's simple agent abstractions with Semantic Kernel's enterprise features into a single framework. Semantic Kernel is still maintained for existing users, but new projects should start with Agent Framework.

Can I deploy agents to Microsoft Teams without the M365 Agents SDK?

Yes. You can now publish agents to Teams and Copilot directly from the Microsoft Foundry experience. If your agent is already built with Agent Framework and hosted in Foundry, publishing to Teams is a configuration step — no rebuild required. The M365 Agents SDK is still useful for deep channel management and custom activity protocols.

Is LangGraph or CrewAI better than Microsoft Agent Framework?

It depends on your stack. LangGraph (29.1K GitHub stars) is best for provider-agnostic, graph-based workflows in Python or TypeScript. CrewAI (48.8K stars) is ideal for Python teams wanting the simplest multi-agent setup. Microsoft Agent Framework is the best choice if you need .NET support, deep Azure integration, or A2A protocol support.

What is the Foundry Agent Service?

Foundry Agent Service is a fully managed agent hosting platform inside Azure AI Foundry. It provides VNet isolation, built-in evaluations, Azure Monitor integration, and MCP with complete auth coverage. It reached General Availability in April 2026.

Know someone building AI agents who needs to read this? Send them this article. And if you want to discuss which framework fits your team, book a free strategy call or join our Discord community.

Kevin Evans — Fractional CTO and founder of Code To Cloud

Kevin Evans

Fractional CTO & Founder, Code To Cloud Inc.

Kevin Evans is a fractional CTO and technology advisor based in Calgary, Alberta. He helps startups and growing businesses across Western Canada make smart technology decisions. More about Kevin

Need help choosing the right agent framework?

Let's discuss your architecture, requirements, and team capabilities to find the right fit — Microsoft, open source, or both.

50+ advisory engagements across Alberta & Western Canada

Book a Free Strategy Call