Claude Dynamic Workflows vs LangGraph vs CrewAI (May 2026)
Claude Dynamic Workflows vs LangGraph vs CrewAI (May 2026)
Anthropic shipped Dynamic Workflows in Claude Code on May 28, 2026 — Claude generates JavaScript orchestration on the fly and spawns up to 1,000 parallel subagents per run. That’s a different abstraction from LangGraph (state-machine framework) and CrewAI (role-based crew framework). Here’s how to choose.
Last verified: May 31, 2026.
TL;DR
| Pattern | Best for |
|---|---|
| Claude Dynamic Workflows | One-shot codebase-scale engineering work — migrations, audits, repo-wide refactors, when you’re already in Claude Code. |
| LangGraph | Stateful production agents with custom topology, persistence, human-in-the-loop, model-agnostic routing. |
| CrewAI | Declarative role-based business-process automation with YAML config and clean crew abstractions. |
What are they actually?
Claude Dynamic Workflows
A runtime feature of Claude Code that ships with Opus 4.8 (May 28, 2026). When Claude judges a task large enough, it dynamically writes a JavaScript orchestration script that:
- Spawns tens to hundreds of parallel subagents (capped at 1,000 total per run, 16 concurrent).
- Coordinates intermediate results outside Claude’s context window — the JS script manages state.
- Runs adversarial verifier agents over subagent output before final integration.
- Returns only the final aggregated answer to your Claude session.
You don’t write the graph. Claude writes it. You write the task description (or just ask).
LangGraph
A Python / TypeScript framework from LangChain (open-source, model-agnostic). You explicitly model agent execution as a stateful graph of nodes (with edges, conditional routing, parallel branches, persistence, and checkpoint-based human-in-the-loop). LangGraph powers many production agents — particularly ones that run for hours or days with intermittent human review.
CrewAI
A Python framework focused on role-based crew orchestration. You declare:
- Agents with roles, goals, and backstories.
- Tasks with descriptions and expected outputs.
- A crew that runs tasks sequentially or hierarchically.
Strong YAML support, large library of templates, popular for business-process automation (sales sequencing, research workflows, content pipelines).
Side-by-side
| Dimension | Dynamic Workflows | LangGraph | CrewAI |
|---|---|---|---|
| Type | Runtime feature (Claude Code) | Framework | Framework |
| Language | JS (generated) | Python, TS | Python |
| Orchestration ownership | Claude generates | You define | You define |
| Model support | Claude Opus 4.8 only | Any (OpenAI, Anthropic, Google, local) | Any |
| Concurrency | Up to 16 concurrent, 1,000 total per run | Manual parallel branches | Sequential or hierarchical |
| State persistence | Script-managed, ephemeral | First-class checkpoint store | Limited (use with stores) |
| Human-in-the-loop | Not first-class | First-class | Limited |
| Best workload | Codebase-scale single-shot | Long-running stateful agents | Business-process automation |
| Setup cost | Zero (use Claude Code) | Medium (write graphs) | Medium (declare crew) |
| Production maturity | New (May 28, 2026) | Mature (2024–2026) | Mature (2024–2026) |
| Cost profile | High (token-heavy) | Tunable per node | Tunable per agent |
When each one wins
Dynamic Workflows win when…
- You’re tackling a codebase-scale single task — language migration, framework upgrade, security audit, bulk refactor, repo-wide bug hunt.
- You’re already in Claude Code and want zero framework setup.
- The work is inherently parallel and Claude-shaped — read many files, transform each, validate, integrate.
- You can tolerate the token cost — Anthropic explicitly warns Dynamic Workflows burn dramatically more tokens than normal Claude Code sessions.
- You don’t need persistence across days or human-checkpointed steps.
Real example from the launch: 750K-line Zig → Rust migration in 11 days with 99.8% test pass rate. Try writing that as a LangGraph graph.
LangGraph wins when…
- You’re running a long-lived production agent (customer support, devops assistant, research workflow) over days or weeks.
- You need custom state — vector store, SQL writes, external API state, checkpoint resumption.
- You need human-in-the-loop at specific graph nodes (approval gates, manual reviews).
- You want model routing — Opus 4.8 for hard nodes, Gemini Flash for cheap classification, GPT-5.5 for terminal work.
- You need observability — LangSmith trace integration is mature.
- You’re building agentic RAG with complex retrieval branching.
LangGraph is the framework if you’re operating an agent system as infrastructure.
CrewAI wins when…
- You want declarative role-based workflows — “researcher → writer → editor” reads cleanly in YAML.
- You’re doing business-process automation rather than engineering — sales sequencing, market research, content generation, customer onboarding.
- Your team prefers explicit role decomposition for stakeholder communication.
- You want a shorter time-to-first-agent than LangGraph but more structure than raw API calls.
CrewAI is widely deployed in non-engineering business workflows where the crew metaphor is genuinely useful.
What about Mastra, Pydantic AI, Autogen?
Brief context for related frameworks (mentioned for completeness):
- Mastra — TypeScript-first agent framework, strong workflow primitives, growing fast in 2026. Use it if you’re TS-native.
- Pydantic AI — Python framework with type-safe agent definitions. Best for teams that want pydantic-validated outputs end-to-end.
- Autogen — Microsoft’s multi-agent framework, strong for conversational multi-agent patterns; integrates with Microsoft Foundry and Copilot Studio.
Dynamic Workflows do not replace any of these — they’re complementary for a specific shape of work (Claude-driven codebase tasks).
Combining them in production
The teams running the most ambitious agentic systems in May 2026 are not picking one — they’re stacking:
LangGraph (outer orchestration, state, human-in-the-loop)
│
├── Node: codebase refactor → invoke Claude Code with Dynamic Workflows
├── Node: research → CrewAI researcher + writer crew
├── Node: classification → Gemini 3.5 Flash batch
└── Node: human approval gate → checkpoint, notify, resume
Dynamic Workflows are best thought of as a superpowered tool you call from a LangGraph node or a CrewAI task — not a replacement for your framework.
Cost reality check
| Workload shape | Approximate cost |
|---|---|
| 750K-line codebase migration with Dynamic Workflows | Hundreds to low thousands of dollars in Opus tokens |
| Same migration brute-forced with LangGraph + Opus | Likely higher (no script-managed intermediate state) |
| Same migration with CrewAI + Opus | Likely higher (sequential crew topology) |
| 100K-token document research with CrewAI + Gemini Flash | Cents |
| Long-running support agent with LangGraph + GPT-5.5 Nano | Cents per conversation |
Dynamic Workflows are token-expensive but not necessarily more expensive than the alternatives for the same job — they’re more efficient at large-scale Claude-shaped work because the orchestration overhead doesn’t burn context.
Quick decision tree
Is this a one-shot codebase-scale engineering task?
├── Yes → Dynamic Workflows (via Claude Code)
└── No → Is it a long-running production agent?
├── Yes, with custom state / HITL → LangGraph
└── No, business-process automation → CrewAI
Verdict
Dynamic Workflows are not a framework — they’re a feature. They’re the right answer for codebase-scale engineering megatasks you’d otherwise script by hand or assemble awkwardly with LangGraph. LangGraph remains the production-agent framework of choice for stateful, long-running, model-agnostic systems with human-in-the-loop. CrewAI remains the role-based business-automation framework of choice for declarative non-engineering workflows. In serious production stacks, you’ll likely use all three: LangGraph as the outer state machine, Dynamic Workflows for big codebase nodes, CrewAI for business-process subroutines.
Sources: Anthropic Dynamic Workflows launch (May 28, 2026), Marktechpost coverage, LangGraph docs (langchain-ai.github.io/langgraph), CrewAI docs (docs.crewai.com), Reworked.co analysis, Towards AI agent-building writeup (verified May 31, 2026).