DEV Community

Cover image for Python for Agentic AI: LangGraph vs CrewAI vs MAF
Shaam
Shaam

Posted on Originally published at aitecharchive.com

Python for Agentic AI: LangGraph vs CrewAI vs MAF

Verdict: if you are choosing Python for agentic AI work in 2026 and you want one answer, pick LangGraph. Its explicit graph-and-state model gives you deterministic routing, durable checkpoints you can inspect, and the largest surrounding ecosystem, which is what actually matters once an agent runs unattended. Microsoft Agent Framework (MAF) is the better pick if your infrastructure already lives in Azure, because it is the direct successor to AutoGen and Semantic Kernel and carries the enterprise middleware to match. CrewAI wins on speed to first working prototype when you want a team of role-playing agents and do not yet need production governance.

TL;DR

  • LangGraph is the default choice: graph nodes and edges, cycles, state checkpointing to SQLite or Postgres, MIT licensed, and stable on a 1.x line (releases).
  • MAF reached 1.0 general availability on 3 April 2026, merging the AutoGen and Semantic Kernel teams into one framework (Microsoft Learn).
  • Prompt flow in Microsoft Foundry and Azure Machine Learning retires on 20 April 2027, and Microsoft's own migration path points at MAF (migration guide).
  • CrewAI stays the fastest route to a working multi-agent crew, with roles, tasks and a CLI, under Apache-2.0 (PyPI).
  • Version floors differ: CrewAI requires Python >=3.10 and <3.14 (CrewAI docs); MAF and LangGraph both target Python 3.10 and above.

Why did the 2026 answer change?

For most of the past two years the Python agentic question was a two-horse race between LangChain's graph tooling and CrewAI's role abstraction. What changed is that Microsoft consolidated its two competing agent stacks into one and attached a deadline to the old path.

MAF hit 1.0 GA on 3 April 2026 and is described by Microsoft as the direct successor to both AutoGen and Semantic Kernel, built by the same teams. Separately, Microsoft has announced that prompt flow in Foundry and Azure Machine Learning retires on 20 April 2027, with container images no longer receiving updates and a published migration route to Agent Framework. The combination gives teams with existing Azure orchestration a dated reason to move, to a Python library rather than a visual designer.

LangGraph did not stand still. Its public releases page lists 1.2.12 as the latest version, with the repository showing commits within hours of our check on 22 September 2026. CrewAI shipped 1.15.21 on 9 September 2026 according to its PyPI listing.

What does each framework actually give you in Python?

LangGraph models an agent as a state machine. You declare nodes (functions or model calls), edges including conditional ones, and a typed state object that flows between them. Cycles are first class, so a review-then-retry loop is an edge back to an earlier node, not a while loop with hand-rolled bookkeeping. Checkpoint savers persist state to SQLite or Postgres, so a crashed run resumes instead of restarting, and a human can be dropped into the middle of a graph. The tradeoff: you write more structure up front.

CrewAI models an agent as a colleague. You give an Agent a role, a goal and a backstory, define Task objects, and assemble them into a Crew that runs sequentially or hierarchically. Collaboration is built in, and the crewai CLI scaffolds a project in one command. Flows add event-driven state when you outgrow the linear crew. It is the shortest distance from an idea to something that runs, and the reason CrewAI keeps winning prototypes. The cost: the abstraction hides control flow you eventually want back.

Microsoft Agent Framework splits the world into agents and workflows. Agents call tools and MCP servers; workflows provide type-safe routing, checkpointing and human-in-the-loop steps, with a WorkflowBuilder that validates the graph at build time rather than at first run. Install is pip install agent-framework, with narrower packages such as agent-framework-core and agent-framework-foundry available (PyPI). Providers span Foundry, Azure OpenAI, OpenAI, Anthropic and Ollama; orchestration patterns shipped at GA include Sequential, Concurrent, Handoff, Group Chat and Magentic. The repository lists 13,696 stars under an MIT license (GitHub), and there are .NET and Go SDKs alongside Python.

How do LangGraph, CrewAI and MAF compare side by side?

LangGraph CrewAI Microsoft Agent Framework
Core model Graph of nodes and edges, typed state Roles, tasks, crews Agents plus typed workflows
Latest version checked 1.2.12 1.15.21 1.19.0
Python requirement 3.10+ >=3.10, <3.14 3.10+
Durability Checkpointers (SQLite, Postgres) Flows for event state Workflow checkpointing
Licence MIT Apache-2.0 MIT
Best for Production control and long-running loops Fast multi-agent prototypes Azure and .NET estates

Versions and requirements above come from the linked release, registry and documentation pages, all checked on 22 September 2026.

Which should you choose for your use case?

  • A long-running agent with retries, approvals and audit needs: LangGraph. Explicit edges make failure modes readable, and checkpoints make them recoverable. This is the same reasoning we set out in architecting agentic systems and in our notes on loop engineering for AI agents.
  • A research or drafting pipeline where several specialists hand work along: CrewAI first, because you will have something running the same afternoon. Port to a graph when the retry logic starts fighting you.
  • An organisation on Azure with prompt flow assets: MAF, and start now rather than close to the 2027 retirement date. The .NET parity also matters if half your platform team does not write Python.
  • Choosing between code frameworks and no-code orchestration at all: that is a different decision layer, covered in Make versus LangGraph and Zapier Agents versus LangGraph. For terminology, see agentic AI versus AI agents.

How do we test claims like these?

We prefer same-harness trials with machine-checked outputs over vendor benchmarks, because the harness is the only part we control. A recent example from our test rig:

[model_ab] n=6, measured=2026-09-22: Across three trials each on an identical seven-constraint article-planning task, Gemini 3.8 Flash (High) and Claude Opus 4.6 (Thinking) both scored 17 of 17 on machine-checked constraint adherence. Median wall time was 23 seconds for Gemini vs 67 seconds for Opus.

The framework comparison above uses the same discipline: versions and requirements read from primary release pages and vendor documentation, not from summaries.

FAQ

Q: Is LangGraph better than CrewAI for beginners?
A: No. CrewAI's roles-and-tasks model is easier to start with, and its CLI scaffolds a project quickly. LangGraph pays off later, when you need explicit control flow and recoverable state.

Q: Does Microsoft Agent Framework replace AutoGen and Semantic Kernel?
A: Yes. Microsoft describes Agent Framework as the direct successor to both, built by the same teams, and reached 1.0 general availability on 3 April 2026.

Q: What Python version do I need?
A: Python 3.10 or newer covers all three. Note that CrewAI's documentation specifies >=3.10 and <3.14, so a very new interpreter can block installation.

Q: Can I use these frameworks together?
A: Partly. All three call tools and MCP servers, so you can expose a CrewAI crew or a MAF agent as a tool inside a LangGraph node. Mixing orchestration layers in one process is where it gets messy, so pick one owner of control flow.

Q: Is there a deadline forcing a migration?
A: For Azure users, yes. Prompt flow in Microsoft Foundry and Azure Machine Learning retires on 20 April 2027, and its container images are no longer receiving updates.

Sources

Last verified: 22 September 2026. Corrections log: no corrections issued.

Top comments (0)