All articles
5 min read
#CrewAI#Multi-Agent#LangGraph#Production

How I Evaluate CrewAI and LangGraph for Recovery

I compare roles, routing, structured state, memory, and recovery through explicit design criteria and official documentation.

On this page

Why this matters

I evaluate an agent framework by the execution contract I can inspect: who may call a tool, how a branch is selected, which outputs survive a restart, and what happens after an uncertain external write. A readable role description helps explain a workflow, but I also need explicit authorization, state, and recovery rules.

This article is a design comparison with illustrative code. It does not report a production migration, a framework benchmark, or measured failure rates. I have removed the earlier account of two private migrations because it did not include public artifacts that a reader could inspect.

1. Roles and authorization

CrewAI describes agents through properties including role, goal, backstory, and tools in its agent documentation. I distinguish those descriptions from application permissions.

For a researcher that may read sources but must not send messages, I would restrict available tools and enforce authorization at the effect boundary. I would test an unauthorized tool request with adversarial input. A role prompt alone would not satisfy that test, whichever framework I chose.

I also distinguish output validation from authorization: a well-formed tool call can still request an action that the principal is not allowed to perform.

2. Routing I can test

I separate the branch-selection function from the model when the decision can be expressed as a rule over validated state. For example:

def route_after_research(state: dict) -> str:
    status = state.get("research_status")
    if status == "insufficient":
        return "alternate_search"
    if status == "complete":
        return "writer"
    return "error_handler"

I can test this function with fixed inputs without calling a model. If a model produces research_status, I still need a separate evaluation of that classification; deterministic routing does not make the upstream judgment correct.

I can attach this kind of function to LangGraph conditional edges. CrewAI also documents conditional routing through @router in Flows. I would compare the actual configured paths, rather than assume that all CrewAI routing is delegated to an LLM.

3. Structured handoffs

Passing an entire research transcript to a writer can spend context on material the writer does not need. I prefer a bounded handoff with named fields and source references. An illustrative record is:

from pydantic import BaseModel, Field

class ResearchFinding(BaseModel):
    claim: str
    source_url: str
    confidence: float = Field(ge=0, le=1)
    relevance_to_query: str

The schema checks shape and range. It does not establish that the claim is true, that the source supports it, or that confidence is calibrated. I would verify those properties separately in evaluation cases.

CrewAI tasks are not limited to unstructured strings: its task documentation describes output_pydantic and output_json. I would configure and test the chosen output contract before attributing a context-management problem to the framework.

4. Memory as an inspectable dependency

For memory and retrieval, I want to inspect the query, selected records, source versions, permissions, and retention policy. I would capture a bounded retrieval receipt and relate it to the subsequent decision.

An explicit retrieval tool is one way to expose that boundary. Framework-managed memory can also be evaluated against the same requirements. I would inspect the configured backend and instrumentation before deciding whether to replace it. I do not infer data residency or auditability from the framework name.

5. Recovery beyond a checkpoint

I would test three crash points: before an external call, after the service accepts it but before success is recorded, and after success is durably recorded. Each case needs an expected outcome: retry safely, reuse the recorded result, or stop for reconciliation.

CrewAI documents state persistence for Flows, including @persist; LangGraph documents checkpoint-based persistence. Those are capabilities to configure and test, not evidence that an arbitrary workflow can safely repeat an external write.

For an unsupported non-idempotent operation with an unknown outcome, I would stop rather than retry through uncertainty. I would inspect retained state, tool receipts, and authorization records. Traces help diagnosis, but I would not use a sampled trace as the authoritative effect ledger.

6. How I would choose

I would build the same small workload in each candidate: bounded research input, a structured finding, a testable route, an approval bound to exact bytes, and one external HTTP effect. I would pin versions and configuration, inject the same faults, and retain inputs, outputs, traces, and costs.

I would evaluate framework ergonomics alongside observable behavior: how much custom code is required, whether the stored state is inspectable, and how an operator handles an uncertain effect. A model-driven manager and an explicit graph may serve different needs. Neither architecture establishes production readiness by itself.

For a framework comparison or migration review, send me the workflow and its constraints. I start with the actions it may take, the state it must preserve, and the evidence needed to authorize recovery.

Update — 29 October 2026

I replaced the private-migration narrative with explicit design criteria. I corrected the implication that CrewAI lacks structured task outputs, conditional routing, or persistence. The linked documentation establishes those capabilities; it does not establish performance, quality, or recovery guarantees for an untested application.

FAQ

Does an agent role enforce permissions?

I treat the role as a description. I enforce permissions through available tools, authenticated principals, and checks before external effects.

Can I test routing without a model?

I can test a rule over known state with fixed inputs. If a model supplies that state, I evaluate its classification separately.

Are CrewAI outputs always strings?

No. I can configure structured outputs using the task interfaces linked above and test validation and failure behavior.

Does persistence make an external write safe to retry?

No. I still need an idempotency contract or reconciliation for an uncertain outcome. A checkpoint alone does not prove what the external service did.

Which framework do I choose?

I choose after comparing a pinned workload against its authorization, state, observability, recovery, and cost requirements. This article does not publish a winning benchmark.

Share this article

Related articles

  • State as the API: Three LangGraph Designs

    I compare three LangGraph state designs: flat fields, nested models, and explicit reducers, with routing and replay constraints.

    Jan 8, 202511 min read
    #LangGraph#LLM#Multi-Agent#Orchestration
  • Around Three Agents, I Start Considering Message-Passing

    I compare shared fields and append-only messages, with explicit ownership, inbox tracking and supervisor routing.

    Dec 10, 202414 min read
    #LangChain#Agents#Multi-Agent#Architecture
  • Six Function-Calling Patterns I Evaluate

    I examine six tool-interface patterns with illustrative code: schemas, typed results, concurrency, loop limits, routing, and tool choice.

    Nov 25, 202413 min read
    #LLM#Function Calling#OpenAI#Production