[KongchangAI]
· 6 min read· 3,443 words

LangGraph vs CrewAI vs AutoGen: 2026 AI Agent Framework Selection Guide

LangGraph vs CrewAI vs AutoGen: 2026 AI Agent Framework Selection Guide

Stars lie: choose AI Agent frameworks by maintenance status, install counts, and real failure points—not GitHub popularity.

This article compares AutoGen, LangGraph, CrewAI, and Microsoft Agent Framework, arguing that GitHub stars should not drive selection. AutoGen has the most stars but has entered maintenance mode and gone 320 days without a stable release, so new projects should move to Microsoft Agent Framework. LangGraph has about 65 times AutoGen's monthly installs, but its checkpoint tables grow unbounded at scale. CrewAI's hierarchical delegation is model-mediated, with documented delegation failures and an unclosed prompt injection issue. None of the frameworks constrain spending, so cost control belongs at the gateway.

A Counterintuitive Selection Conclusion

Among the mainstream AI Agent framework comparisons, the one with the most GitHub stars is precisely the one you should not choose for a new project.

AutoGen has roughly 60,400 stars, more than CrewAI's 57,100 and LangGraph's 39,800. But it has gone 320 days without releasing a stable Python version. Its last tagged release (python-v0.7.5) was published on September 30, 2025, and the repository's last commit stopped at April 15, 2026. Verified against the GitHub REST API, PyPI release history, and the official README, AutoGen's README now explicitly labels it "maintenance mode," and the official recommendation directs new users to Microsoft Agent Framework.

The enormous gulf between stars and production reality is what this comparison really aims to reveal. Not a feature matrix, not unauditable benchmarks, but the failure points, maintenance status, and real costs each framework exposes at scale.

AI Agent framework comparison analysis

Key Takeaways

  • AutoGen has entered maintenance mode: The README explicitly states it will no longer receive new features, and the Python package has gone roughly 320 days without a stable release. Its successor is Microsoft Agent Framework, which went GA on April 3, 2026. AG2 is a real option for legacy codebases, but it is a fork rather than a rebrand.
  • Stars lie; install counts are closer to the truth: LangGraph has roughly 71 million monthly installs, about 65 times AutoGen's (~1.08 million). This gap holds under all reasonable qualifications.
  • The star-to-install ratio is an inverse freshness signal: Stars accumulate during hype peaks, while installs track present-day production dependencies. A high ratio means a project was once hot but no longer carries critical workloads.
  • Framework choice is just one input to a production system, and rarely the one that determines success or failure.

Why Stars Should Not Drive Selection

Stars are a lagging indicator. They record what was bookmarked during hype peaks—for AutoGen, the v0.2 release era of 2024. Stars accumulate indefinitely and are never deleted, even when a project goes dormant. Installs are the opposite: they are a recurring production cost paid on every CI run or image rebuild.

The two numbers have completely decoupled.

FrameworkMonthly PyPI InstallsGitHub Stars
LangGraph71.1M40K
CrewAI20.7M57K
MS Agent Framework1.6M13K
AutoGen1.08M60K

One caveat: PyPI statistics include CI pipelines and container rebuilds, so they are not user counts. Treat them as relative signals rather than absolute values. LangGraph benefits from transitive dependencies across the broader LangChain ecosystem, which inflates it relative to standalone installs. AutoGen has no such tailwind, and the gap remains enormous. The 65x gap survives both caveats; the 1.2x gap does not.

Release cadence tells the same story from another angle. As of mid-August 2026, days since last release: AG2 at 1 day, CrewAI and MS Agent Framework at 2 days, LangGraph at 5 days, and AutoGen at 320 days. CrewAI shipped roughly 10 versions in 19 days—whether that represents fast fixes or fast iteration, it means you need to pin versions rigorously.

Why PyPI install counts reflect production dependencies: PyPI is Python's official package repository, and any operation like pip install langgraph (including CI pipelines, Docker image rebuilds, and dependency resolution) counts toward its download statistics. This differs fundamentally from GitHub stars—stars are a one-time, emotionally driven bookmarking action, while installs are an action repeated on every deployment and every build, so they better reflect whether a package is still depended on by real systems. But three caveats apply: first, the statistics include CI bots rather than unique users; second, packages transitively depended on by ecosystems like LangGraph within LangChain will have inflated install counts due to upstream dependencies; third, PyPI only counts downloads and cannot distinguish repeated installs on the same machine. So when choosing a framework, install counts should be read as a relative signal (who is being used, who is being neglected), not as absolute user scale.

Three Mental Models

Every framework can call tools and pass messages, so a feature matrix cannot distinguish them. The real difference lies in what breaks at scale: LangGraph breaks as checkpoints grow, CrewAI breaks on prompt-mediated delegation, and AutoGen breaks on maintenance.

LangGraph is a directed graph centered on a central state object. Agents are nodes, edges define flow, conditional edges handle branching, and reducers merge concurrent state updates. You draw the control flow, and the LLM executes within it. The mental model is a state machine, enforced at the code level by the framework. Built-in primitives include durable execution, human-in-the-loop, and short- and long-term memory.

CrewAI is a role-based team. Each agent carries a role, goal, backstory, and tools. A crew executes tasks sequentially or hierarchically. In hierarchical mode, an auto-generated manager agent delegates and reviews. The runtime provides the hierarchy, but the delegation decisions inside are model-mediated rather than encoded as developer-defined conditional edges. Flows are a newer primitive offering more predictable production control: one LLM call per step, with no autonomous delegation.

AutoGen in its current maintenance mode is a conversation-driven multi-agent runtime. Its successor, Microsoft Agent Framework, has the same pattern but a different architecture. AutoGen itself is no longer developed. Its license status deserves a separate note: GitHub detects CC-BY-4.0, the README describes it as dual-licensed CC-BY-4.0 and MIT, and PyPI reports MIT—not a pleasant conversation for a legal team.

Where LangGraph Breaks in Production

The failure point is not the API, nor the toolchain, but the checkpoint store.

According to public records published by engineer Tadeo Donegana Braunschweig in April 2026, his team's checkpoint tables grew unbounded at a scale of over 120,000 conversations per week. The open-source checkpointer has no native TTL. On average, each conversation produces roughly 93 rows across four checkpoint tables after just two messages and three tool calls. In staging, checkpoint_blobs alone reached 56MB in a single week.

On the LangGraphJS tracker, issue #1138 has remained open since April 2025. LangChain's official documentation recommends running a cron job to delete old checkpoints, which clearly signals where lifecycle management responsibility lies.

The vendor shipped a fix in PR #7586, introducing DeltaChannel. For a 500-turn thread: the default add_messages configuration wrote 221MB, DeltaChannel snapshots every 50 steps for 10.53MB, and no snapshots yields 1.98MB. But three caveats apply: it landed in LangGraph 1.2.0 (May 12, 2026), it is marked beta, and it is opt-in—upgrading does not activate it automatically, and already-written bloat remains.

Braunschweig's three fixes are broadly applicable: move checkpoint table creation into an Alembic migration rather than calling LangGraph's setup(); run periodic TTL deletion; and checkpoint selectively, persisting only the supervisor graph while keeping subgraphs stateless.

The Typed State Controversy

StateGraph accepts real schemas: TypedDict, dataclass, or Pydantic BaseModel. LangGraph is not untyped. The problem is one layer up: LangChain documentation states that the higher-level create_agent factory does not support Pydantic state schemas, and that is exactly where most teams start. Types are available on the API you graduate to, not the one you start with.

Issue #5891 is a create_react_agent bug, precisely on the factory path that cannot accept a Pydantic schema. Issue #740 names the same root cause: state shape is discovered at runtime rather than at definition time. The practical advice: define schemas explicitly at important boundaries, and most of these bugs disappear.

What are checkpoints and TTL: In a durable execution framework like LangGraph, a checkpoint is a snapshot the framework serializes and writes to external storage (such as Postgres) after each superstep ends. It lets long-running tasks resume from a breakpoint after a crash, and it is the foundation for features like human-in-the-loop and time-travel debugging. The problem is that the open-source checkpointer has no native TTL (time-to-live) mechanism—written records do not expire automatically. A conversation can produce a large number of intermediate state snapshots, and a 500-turn thread can write 221MB under the default configuration. TTL is a common expiration cleanup mechanism in the database world, and here it means teams must write their own cron jobs or migration scripts to delete old checkpoints. Understanding this is key: the reliability that durable execution brings is not free—it transfers lifecycle management responsibility from the framework to the ops team.

Where CrewAI Breaks in Production

The delegation problem is not a theoretical concern but a documented, reproducible failure mode.

According to Partha Sarkar's records, a three-agent support team (triage, technical, billing) in hierarchical mode received a purely technical query. The manager invoked all three agents, including billing. The billing agent's response overrode the correct technical answer. The run consumed 38 seconds and 15,759 tokens to produce roughly 200 tokens of output. No error was reported.

The root cause is that hierarchical mode does not enforce conditional branching or true delegation. The manager decides, and when the model's judgment wavers, control flow wavers with it. His fix was to replace the built-in manager with a custom manager agent carrying explicit step-by-step instructions. After the fix, the pure technical run took 24 seconds and roughly 10,000 tokens. You recover about a third of the cost through manual orchestration.

Three Delegation Bugs in Eleven Months

Issue #2606 (April 2025): the manager passes a dict while the schema expects a string. Issue #4783 (March 2026): the manager executes tasks with its own tools but never delegates, collapsing hierarchical mode into sequential mode, closed as not_planned. Issue #3925 (November 2025): with an English task description the manager delegates correctly, but with a Japanese description the manager answers alone without delegating, reproducible in both directions.

The implication of that last issue deserves reflection: a production system's control flow changes due to natural-language variation in the task description. No framework that enforces orchestration in code could exhibit this behavior. If you run CrewAI in non-English markets, treat this as a pre-release regression test.

The Unclosed Security Issue

Issue #5057, "memory content injected un-sanitized into system prompt, leading to indirect prompt injection," has been open since March 2026. Mechanically, lite_agent.py concatenates retrieved memory directly into the system prompt, and anything written to memory inherits system-level instruction authority. Rated medium severity, citing the OWASP Agentic Security Index. Still unclosed nearly five months later. If you use CrewAI memory with any user-influenced content, apply the recommended mitigations before release.

What is prompt injection and the OWASP Agentic Security Index: Prompt injection is a class of attack against LLM applications in which an attacker injects extra instructions through controllable input (web text, user messages, retrieved memory) to hijack model behavior. In agent systems the risk is amplified, because agents have tool-calling permissions and a single successful injection can lead to data leakage or unauthorized actions. Issue #5057 describes precisely the "indirect" variant of this attack: CrewAI's lite_agent.py concatenates retrieved memory directly into the system prompt, and the system prompt semantically holds the highest authority. Anything written to memory (possibly from a user) therefore inherits system-level instruction authority. The OWASP Agentic Security Index is OWASP's risk checklist for agentic AI scenarios, used to rate such vulnerabilities. This means that when using CrewAI memory, input sanitization is not optional—it is a mandatory step before release.

Why AutoGen Should Be Replaced

AutoGen is in maintenance mode, and that sentence should end the discussion for any new project. But it is important to understand what this means in practice, because existing teams need to know the shape of the exit path.

The README states verbatim: "AutoGen is now in maintenance mode. It will not receive new features or enhancements and is now community-managed. New users should start with Microsoft Agent Framework." The last tagged release was September 30, 2025, and the last repository commit was April 15, 2026. The repository has no archive banner, so at first glance the project does not look dead—but it is.

The lineage is worth knowing. Original authors Chi Wang and Qingyun Wu left Microsoft in November 2024 and forked the project as AG2, now at v1.0.x under Apache-2.0. Microsoft released Microsoft Agent Framework 1.0 GA on April 3, 2026, developed by the AutoGen and Semantic Kernel core teams, in both Python and .NET, under MIT, with support for A2A and MCP interoperability, stable APIs, and an LTS commitment.

Migration Is a Rewrite, With One Silent Change

Microsoft's migration guide reads like a from-scratch guide rather than an upgrade guide. AssistantAgent becomes Agent, and state semantics invert beneath the rename. AssistantAgent maintains conversation history as part of its state. Agent is stateless and does not maintain history between calls. Porting code produces no error; the Agent simply stops remembering, and you find out from customer complaints.

There is a second inversion in the same rename: AssistantAgent is single-turn by default unless you raise max_tool_iterations; Agent is multi-turn by default. The migration turns a component from "remembers but acts once" into "acts many times but remembers nothing."

There is also a gap to assess in advance: AutoGen supports local code execution tools, and Microsoft's guide states this capability is planned for a future release. For now it is a hole.

String-Match Termination

AutoGen terminates when the LLM generates the exact token TERMINATE. Since models are not rigorous about exact tokens, they output terminate, Terminate., Task terminated, or wrap it in markdown. None of these match, the loop continues, and you pay for every turn. Speaker selection fails the same way: if the selector's output does not exactly match an agent name, the same agent gets reselected repeatedly, producing a single-agent infinite loop. Issue #12 dates back to July 2023 and will not be fixed in a framework in maintenance mode.

Why LLMs are bad at exact string matching: A large language model outputs sampled results from a probability distribution, so it is inherently unreliable at constraints like "must output a certain token verbatim." Even if the prompt explicitly requires generating TERMINATE, the model may output terminate, Terminate., Task terminated, or wrap it in code blocks or quotes. The underlying reason is that the tokenizer splits the same semantic unit into different token sequences, and sampling temperature and context further influence the choice. So in engineering practice, termination or routing decisions should not rely on exact string matching; they should use structured output (JSON schema, function calling), fuzzy matching, or explicit state flags. AutoGen uses string matching for termination and speaker selection, treating this model characteristic as a reliable interface—once it fails to match, it falls into repeated reselection or infinite loops, and every loop consumes tokens.

The Real Cost of Multi-Agent Orchestration

According to Kulkarni and Kulkarni's benchmark of multi-agent architectures on SEC filings, the reflective self-correction loop achieved the highest field-level F1 (0.943) at 2.3 times the cost of the sequential baseline. Hierarchical supervisor-worker achieved F1 0.921 at 1.4 times the cost, the best cost-performance point in the study. The hybrid approach recovered 89% of reflection's benefit at 1.15 times baseline cost.

These patterns map directly to frameworks: CrewAI's hierarchical process corresponds to the supervisor-worker row, LangGraph's cyclic graphs are used to build reflection loops, and AutoGen's group chat is a third form with less discipline than the other two. Practical advice: if you pay 2.3 times the cost for reflection on every field in a document, you are overpaying, because the hybrid approach recovers most of the accuracy at a 15% premium.

No Framework Prevents Overspending

A finding that should influence how you budget: across LangGraph, CrewAI, and Microsoft Agent Framework, every available control knob constrains structure, and none constrains money.

FrameworkKnobDefaultWhat It Actually Constrains
CrewAImax_iter20Iterations per agent
CrewAImax_retry_limit2Retries, which multiply spending
LangGraphrecursion_limit1000Supersteps per execution
Agent Frameworkmax_iterations100Workflow iterations

Default caps differ by 50x, yet nobody compares them. Structural limits also treat a 200-token call and a 200,000-token long-context call as the same event. This is why teams file tickets saying "we set max_iter, why is the bill still high?" You limited steps, but the bill counts tokens, and the two move independently.

If spending is a hard constraint, put the cap at the gateway or proxy layer, where you can actually count tokens as they are spent.

When to Skip Frameworks Entirely

Sometimes the right AI Agent framework is no framework.

Gartner predicts that by the end of 2027 more than 40% of agentic AI projects will be canceled, with cost, unclear business value, and inadequate risk controls as the main reasons. Cost and risk control are precisely the two things these frameworks do not natively provide.

Anthropic Engineering's "Building Effective AI Agents" argues this most directly: the most successful implementations did not use complex frameworks but simple, composable patterns. If your workflow is a fixed sequence of three LLM calls plus retries, a framework adds an abstraction layer, a dependency tree, and migration risk for little gain.

A useful test: first write the workflow as plain functions. If the function reads clearly, you do not need a framework. Once it starts accumulating retries, branches, and shared state, you need one—and at that point agent development becomes an architecture problem rather than a library choice.

Final Selection Recommendations

DimensionWinnerRationale
Production reliabilityLangGraphControl flow enforced in code, not prompts
Time to first usable team speedCrewAIHigher-level abstraction, fastest prototyping
Real production usageLangGraph71M monthly installs, carrying critical workloads
Release responsivenessCrewAI10 versions in 19 days
License clarityLangGraph / CrewAIBoth MIT; AutoGen reports three different answers
Cost controlNoneNone of the three can terminate a run as it spends
Operational burdenCrewAILangGraph's checkpointer requires upfront lifecycle management
Enterprise support pathMS Agent FrameworkGA April 2026, stable API, LTS commitment

Choose LangGraph if you need explicit, auditable control flow, durable execution or human-in-the-loop steps, workflows with real branching and shared state, and a team that will absorb the persistence work. Budget for this upfront: checkpoint TTL deletion, selective persistence on the supervisor graph only, and pinning the checkpoint package separately from the core.

Choose CrewAI if you are shipping a multi-agent prototype this quarter, want a higher-level abstraction, and can absorb operational risk. Pin versions, add delegation assertions to your test suite, and apply the #5057 mitigations before user content touches agent memory.

Do not choose AutoGen for new projects if you are selecting a framework today and have no legacy investment. If you are already using it, assess the MAF migration as a rewrite and put stateless Agent behavior first in your test plan.

Choose Microsoft Agent Framework if you are on the Microsoft stack, migrating from AutoGen or Semantic Kernel, or the LTS commitment on the vendor support path is key to getting your project approved.

Choose no framework if your workflow is a few deterministic LLM calls and plain functions plus retries remain readable. Write that function, add a retry, and only introduce a framework when the function stops being readable.

The lesson from AutoGen is not that Microsoft abandoned a project, but that a framework stuck at v0.x was never really a product: it was a research prototype that happened to become famous. Check maintenance status, release cadence, and the maintainer's roadmap before committing.

One-line Summary

Stars lie: when choosing an AI Agent framework, rely on maintenance status, install counts, and real failure points—not GitHub popularity.

Paragraph Summary

This article compares AutoGen, LangGraph, CrewAI, and Microsoft Agent Framework to argue that GitHub stars should not drive selection. AutoGen has the most stars yet has entered maintenance mode, with no stable release in 320 days, so new projects should move to Microsoft Agent Framework. LangGraph has roughly 65 times AutoGen's monthly installs, but at scale its checkpoint tables grow unbounded, requiring TTL deletion and selective persistence. CrewAI's hierarchical delegation is model-mediated rather than code-enforced, with documented cases of delegation failing under Japanese task descriptions and an unclosed prompt injection issue. All three frameworks' control knobs constrain structure rather than money, so cost control must be implemented at the gateway layer. In multi-agent orchestration, the hybrid pattern recovers 89% of reflection's benefit at 1.15x cost, the best value trade-off. The article concludes with scenario-based selection advice and a reminder that some workflows do not need a framework at all.

#AI Agent framework#LangGraph vs CrewAI#AutoGen maintenance mode#Microsoft Agent Framework#multi-agent orchestration#AI framework selection 2026
Share:

Related articles