Framework comparisons often promise a winner. That is the wrong question.
An agent framework is a runtime choice inside a larger system containing a model, tools, identity, data, queues, storage, policy, observability, and operators. A framework that feels elegant in a demo may be a poor choice when a task must resume after a worker crash, prove who approved a refund, or prevent an untrusted document from selecting a tool.
This guide compares six families of agent runtime without inventing a universal leaderboard. It provides:
- a vocabulary for separating framework layers;
- a workload-first decision matrix;
- a fair, reproducible evaluation protocol;
- failure and security criteria that marketing tables usually omit;
- migration advice that preserves business logic instead of framework-specific glue.
The official documentation links at the end are the authority for current APIs. Product capabilities and versions change; this article records architectural trade-offs, not permanent feature claims.
The Short Answer
Start with the simplest runtime that can express the workflow:
| Requirement | Likely fit | Why |
|---|---|---|
| Explicit branches, durable state, replay, approval pauses | LangGraph or another low-level workflow runtime | The topology and state transitions remain visible |
| Small Python-first loop with handoffs, tools, guardrails, and tracing | OpenAI Agents SDK | Few primitives and a managed agent loop |
| Code-first loop across several model providers | Strands Agents | Lightweight agent abstraction with configurable providers |
| Business workflows expressed as agents, tasks, crews, and flows | CrewAI | Declarative task/process model and enterprise workflow concepts |
| Conversation-heavy group patterns or an existing AutoGen codebase | AG2 | Rich dialogue abstractions can reduce migration work |
| A Claude-centered runtime with its own workspace and sandbox model | Claude Agent SDK | Useful only when its current product and operational constraints fit |
These are starting hypotheses. A two-day spike with your real tools is stronger evidence than a popularity ranking.
First Decide Whether You Need an Agent
Do not compare frameworks before comparing architectures.
Use a deterministic workflow when:
- the steps and branches are known;
- each operation has a stable input and output;
- auditability matters more than open-ended exploration;
- failure recovery can be modeled as a state machine.
Use one agent with narrow tools when:
- the task needs flexible language interpretation;
- the available actions are limited;
- a human can review consequential results;
- the loop can be bounded.
Use multiple agents only when separate agents provide a real boundary:
- different credentials or data scopes;
- independent contexts that should not be shared;
- specialist work that can be evaluated separately;
- parallel work whose coordination cost is justified.
“More agents” is not a maturity level. It is another distributed system.
Separate the Layers
Many comparisons place unlike products in one row. A clearer model is:
model provider
|
agent loop / harness
|
orchestration runtime ---- state and persistence
|
tool and MCP adapters ---- identity and policy
|
external services -------- tracing and operations
- Model provider: generates text, structured output, or tool proposals.
- Agent loop: decides how to continue after a tool result.
- Orchestration runtime: represents branches, retries, events, and dependencies.
- State layer: stores working state, checkpoints, memory, and artifacts.
- Tool layer: executes capabilities under identity and authorization.
- Operations layer: supplies queues, deadlines, traces, evaluation, and incident response.
No framework removes the need for the other layers. A built-in tracing screen is not a substitute for tenant-aware audit logs. A checkpoint API is not automatically a transaction. An MCP connector is not an authorization system.
Capability Profiles
LangGraph: Explicit Orchestration Runtime
LangGraph describes itself as a low-level orchestration framework and runtime for long-running, stateful agents. Its useful abstraction is a graph whose nodes read and update state. The current documentation emphasizes persistence, durable execution, streaming, and human-in-the-loop interrupts.
Strengths
- visible topology and conditional routing;
- durable checkpoints and resumable work;
- explicit state reducers and subgraph composition;
- a good fit for approval, replay, and operational debugging.
Costs
- more design and state-modeling work;
- easy to build an overcomplicated graph;
- application code still owns authorization, transactions, and tool policy;
- the surrounding LangChain ecosystem is optional, but its abstractions can be mixed in.
Choose it when workflow shape is a product requirement, not merely an implementation detail.
OpenAI Agents SDK: Small Runtime Around an Agent Loop
The OpenAI Agents SDK provides a small set of primitives: agents, tools, handoffs or agents-as-tools, guardrails, sessions, and tracing. Its documentation distinguishes it from using the Responses API directly: the SDK adds a higher-level loop and runtime behavior.
Strengths
- fast path for Python applications;
- handoff and specialist composition;
- function-tool schema generation and validation;
- built-in tracing and optional sessions or sandbox workflows.
Costs
- provider and runtime assumptions must be checked for portability;
- a handoff is not a complete workflow transaction;
- guardrails do not replace object-level authorization;
- long-running durability still needs explicit operational design.
Use it when a small set of primitives maps to the task and the team wants to own the surrounding service.
Strands Agents: Code-First, Model-Driven Loop
Strands presents a lightweight code-first SDK for Python and TypeScript, with a simple Agent abstraction and configurable model providers. Its model-driven loop is concise, but concise code does not imply deterministic behavior.
Strengths
- low ceremony for single-agent and tool workflows;
- provider and deployment flexibility;
- straightforward path from a local prototype to a service;
- useful when the model should choose among a small set of tools.
Costs
- model-selected routing is harder to audit than an explicit graph;
- state durability and business transactions remain application responsibilities;
- community tools require supply-chain and permission review;
- AWS alignment may be an advantage or a coupling, depending on the deployment.
Use it for bounded, tool-oriented tasks after defining external budgets and policy.
CrewAI: Agents, Tasks, Crews, and Flows
CrewAI organizes work around agents, tasks, crews, and flows. Current documentation also describes state, persistence, resume behavior, guardrails, callbacks, and human-in-the-loop triggers.
Strengths
- vocabulary that maps well to business workflows;
- sequential, hierarchical, and hybrid task processes;
- a relatively accessible prototype path;
- flows can provide a more explicit outer workflow than a free-form crew.
Costs
- role and backstory are not a substitute for a permission model;
- task delegation can hide latency, token, and failure costs;
- durable behavior must be tested rather than inferred from the abstraction;
- enterprise features and open-source runtime capabilities may differ.
Use it when task/process semantics are valuable and the team will still inspect the underlying calls.
AG2: Conversation-Oriented Coordination
AG2 is a community project in the AutoGen family. Its differentiator is conversation-oriented coordination: agents exchange messages under a manager and termination policy.
Strengths
- expressive group, nested, and sequential conversation patterns;
- useful for an existing AutoGen-family codebase;
- natural fit for research simulations and deliberation experiments.
Costs
- free-form conversation can multiply model calls and make termination opaque;
- consensus is not evidence of correctness;
- code execution and generated artifacts need isolation;
- project direction, compatibility, and support should be verified at adoption time.
Use it when conversation is itself the workload, not simply because “multi-agent” sounds advanced.
Claude Agent SDK: Product-Coupled Runtime
Claude Agent SDK should be evaluated as a product-specific runtime, not as a generic function-call wrapper. Confirm the current package, model support, session semantics, workspace isolation, MCP lifecycle, network policy, pricing, and data residency before committing.
Potential fit
- Claude-centered applications;
- tasks needing a managed workspace or sandbox model;
- organizations willing to accept provider coupling.
Questions to answer first
- Which API and package are supported now?
- What is persisted, for how long, and where?
- Which tools and network routes are enabled by default?
- How are user identity, approvals, cancellation, and audit propagated?
- What is the exit plan if the runtime or model changes?
Do not copy an SDK snippet from a blog and infer production guarantees.
Compare by Decision Dimensions
| Dimension | Questions that matter |
|---|---|
| Workflow topology | Are branches, loops, dependencies, and termination explicit? |
| State | Can work resume after a crash? Is state versioned and tenant-scoped? |
| Human control | Can approval pause and resume the exact operation? |
| Model portability | Can the model change without rewriting business logic? |
| Tool governance | Are identity, object authorization, provenance, and egress external to the model? |
| Failure semantics | What happens on timeout, duplicate delivery, partial failure, and cancellation? |
| Observability | Can an operator reconstruct model, tool, state, policy, and user events? |
| Deployment | Can it run in the required region, network, queue, and compute model? |
| Cost | What is the cost per successful task, including retries and idle workers? |
| Exit cost | Which code is portable, and which code is tied to the framework? |
State Is Not Memory
Separate:
- thread state: the current run and its checkpoint;
- workflow state: business progress and external transaction IDs;
- long-term memory: reusable user or domain information with its own consent and deletion policy;
- artifacts: files and reports with ownership and retention;
- audit events: immutable evidence of what happened.
A framework may provide one of these while leaving the others to you.
Handoffs Are Not Authorization
Whether the framework calls it a handoff, delegation, sub-agent, or manager, the receiving component must receive a reduced capability set. Pass a typed task and scoped context, not the parent’s ambient credentials and entire transcript.
Security and Operations
Treat model output, tool descriptions, MCP metadata, retrieved documents, and tool results as untrusted input. The framework must not be allowed to turn a persuasive sentence into authority.
Minimum controls:
- authenticated principal and tenant context outside the model;
- object-level authorization on each tool call;
- narrow tools rather than generic SQL, HTTP, or shell;
- provenance for data derived from external sources;
- approval bound to canonical arguments and resource version;
- sandboxed code with no ambient secrets;
- egress allowlists and redirect controls;
- durable idempotency for writes;
- step, time, token, cost, and concurrency budgets;
- deletion propagation across checkpoints, memory, indexes, and artifacts.
Framework selection should include an abuse case:
A hostile document asks the agent to send private data to a new address while the worker restarts during approval.
The winning framework is the one whose surrounding architecture can prove that this cannot become an unauthorized side effect.
A Reproducible Evaluation Protocol
Do not publish a score unless another team can reproduce it.
1. Freeze the Variables
Record:
- exact package versions and commit;
- model, endpoint, temperature, and reasoning settings;
- prompts, tool schemas, and tool policy;
- hardware, region, concurrency, and network;
- dataset version and random seeds;
- retry, timeout, and token budgets.
2. Use a Task Matrix
Include:
- a deterministic read;
- a multi-step read with one failure;
- an approval-gated write;
- a duplicate delivery after timeout;
- a worker restart from a checkpoint;
- an adversarial document with an injected instruction;
- a cross-tenant access attempt;
- a cancellation during a tool call;
- a task where the correct answer is to refuse or ask for information.
3. Measure Outcomes
utility_success =
correct user-visible result with no policy violation
unsafe_success =
unauthorized read, write, disclosure, or external side effect
recovery_success =
correct continuation after the injected failure or restart
cost_per_success =
model + tool + compute + operator cost / successful tasks
Report distributions, not a single mean:
- task success and abstention quality;
- unauthorized-action rate;
- p50/p95 latency;
- model calls, tool calls, tokens, and retries;
- restart and duplicate recovery;
- operator minutes per incident;
- deployment and migration effort.
Do not compare raw accuracy across different models or prompts. A framework benchmark is meaningful only when the task, policy, model, and budget are held constant.
4. Test the Negative Path
The strongest framework is not the one that always completes. It is the one that:
- refuses an unauthorized request;
- preserves a failed transaction’s invariant;
- stops an infinite loop;
- reports partial results honestly;
- resumes without duplicating a side effect;
- leaves an auditable explanation for an operator.
Migration Strategy
Keep these boundaries framework-neutral:
domain commands
-> typed tool contracts
-> policy and authorization
-> idempotent adapters
-> state/event schema
-> framework runtime
Do not put business rules inside prompt strings, framework callbacks, or provider-specific message objects. Use contract tests around tools and state transitions. Then a migration changes orchestration code rather than payment, identity, or data policy.
A practical migration sequence:
- inventory tools, side effects, identities, and state;
- extract domain commands from the current agent loop;
- add authorization, idempotency, and result contracts;
- replay anonymized traces against the new runtime;
- run the negative-path matrix;
- shadow traffic before switching writes;
- retain a rollback path for state and external operations.
Frequently Asked Questions
Is a framework with more features more production-ready?
No. More features can increase unexamined behavior. Production readiness is the ability to enforce invariants, recover from failure, observe outcomes, and operate the system within its threat and cost model.
Should I start with a multi-agent design?
No. Start with a deterministic workflow or one bounded agent. Add another agent only when a separate context, permission, or independently testable capability justifies it.
Is vendor lock-in always bad?
No. A managed runtime can reduce operational work and provide useful capabilities. Treat coupling as a deliberate trade-off: document the data path, export state and traces, isolate domain contracts, and calculate the exit cost.
Can benchmark percentages decide the framework?
No. Agent performance is a property of the model, prompt, tools, data, policy, runtime, and budget together. Use published benchmarks as hypotheses, then run a controlled evaluation on your workload.
Conclusion
There is no meaningful “agent framework war” independent of workload. The durable choice is the framework that makes your important properties visible and enforceable:
- explicit state when recovery matters;
- narrow capabilities when security matters;
- controlled loops when cost matters;
- traces and replay when operations matter;
- portable domain contracts when strategy may change.
Prototype with the smallest runtime that expresses the real workflow. Promote it only after it survives failure, abuse, restart, and cost tests. That is a stronger selection method than choosing the framework with the loudest feature list.