The agent framework space has moved faster in the last 18 months than most of us can keep up with. LangGraph rewrote how stateful graphs work. CrewAI hit 30k GitHub stars seemingly overnight. Microsoft shipped AutoGen, then rewrote it. OpenAI dropped their Agents SDK. Meanwhile, half the engineering teams I talk to are quietly running custom Python with no framework at all. After shipping multi-agent systems in production across several client engagements, here is my honest take on how to choose.
Spoiler before we start: the framework debate is largely a distraction. The gap between a good agent system and a bad one is almost never the framework. It is the eval pipeline, the observability setup, and the failure recovery logic. Pick a framework that does not get in your way, build those three things, and you will be ahead of 80% of teams shipping agents today.
The decision tree before you pick a framework
Before you compare API surfaces and GitHub stars, answer these five questions. They will narrow your options more than any benchmark.
Do you actually need agents, or just an LLM-augmented workflow?
This is the most important question and the most commonly skipped one. An agentic workflow has a loop: the model decides what to do next, takes an action, observes the result, and repeats. A DAG workflow has a fixed sequence of LLM calls with maybe some branching. Most projects that come in labeled "we need agents" are actually DAG workflows in disguise. They do not need CrewAI or LangGraph — they need a well-structured chain with a few tool calls. Agents add non-determinism, debugging complexity, and cost. Use them when the task genuinely requires iterative reasoning or parallel exploration. Otherwise, keep it simple.
How many agents? 1 vs. N
Single-agent systems have one failure point. Multi-agent systems have emergent failure modes: agents disagreeing, state getting corrupted mid-pipeline, one agent blocking the whole graph because it looped on a bad tool call. The coordination overhead is real. Before committing to N agents, be precise about what each agent uniquely owns and why that boundary cannot be handled with a tool call inside a single agent.
What is your determinism budget?
If your users are internal analysts who can tolerate occasional re-runs, you have more slack. If you are automating a customer-facing billing workflow, you need near-deterministic behavior — which means constrained graphs, strict tool schemas, and timeout policies. Your determinism budget directly constrains which frameworks are viable.
What are your observability requirements?
Some frameworks are black boxes. Others — LangGraph specifically — are designed to emit traces at every node transition. If you cannot afford a black box (regulated industry, complex multi-step workflows, large scale), your framework choice is driven by observability first. This eliminates most high-abstraction options.
What is the team's LLM experience level?
High-abstraction frameworks (CrewAI) reduce the time-to-demo for teams new to LLM engineering. They also accumulate technical debt faster when you need to customize behavior beyond the happy path. If your team has shipped LLM features before, the abstraction tax of CrewAI rarely pays off. If they have not, it might buy you time to learn.
Evaluating agent architectures for a real project?
We run AI architecture audits to help teams pick the right approach before committing to a stack.
Framework deep dives
LangGraph
LangGraph (part of the LangChain ecosystem, ~9k stars on its own) models agent behavior as a directed graph where each node is a function and edges represent conditional routing. State is typed, explicit, and flows through the graph as a typed dict or Pydantic model. You define nodes, edges, and a state schema — the graph engine handles execution.
What I actually like: the state model is the right abstraction for production agents. When something goes wrong, you can inspect exactly what the state looked like at every node transition. LangSmith integration is seamless — you get distributed traces, replay, and latency breakdowns with minimal instrumentation. The conditional edge API makes complex routing explicit rather than hidden in prompt logic. Human-in-the-loop checkpointing is first-class, which matters for approval workflows.
The real cost: LangChain's abstraction tax is real. If you use LangGraph without the broader LangChain ecosystem, you pay less of it — but the learning curve for stateful graphs is still steep for engineers new to the model. The LangChain ecosystem has also had too many API-breaking changes over its lifetime, which erodes trust. That said, LangGraph itself has been more stable than the parent library.
When to pick LangGraph
Production projects with complex, stateful flows. Teams already invested in the LangChain ecosystem. Projects where observability is non-negotiable and human-in-the-loop approval is a requirement.
CrewAI
CrewAI (~35k GitHub stars as of early 2026) takes a role-based abstraction: you define agents with roles, backstories, and goals, assign them tasks, and the framework handles the coordination loop. You think in terms of "a researcher agent, a writer agent, a reviewer agent" rather than state graphs and node routing.
What I actually like: the time-to-demo is genuinely fast. For content pipelines, research workflows, and anything that maps cleanly onto human team structures, the "crew of agents" metaphor works. You can get a multi-agent prototype running in an afternoon. The high-level abstraction also makes it readable for non-engineering stakeholders who need to understand the agent topology.
The real cost: once you leave the happy path, you are fighting the abstraction. Custom routing logic is awkward. Debugging a stuck agent in a multi-step crew is painful — the framework does not give you LangGraph-level state inspection. Observability is an afterthought relative to LangGraph + LangSmith. We have seen CrewAI prototypes that looked great in demos fail in production because the error handling is too coarse-grained and retry logic is not configurable enough for real workloads.
When to pick CrewAI
Prototypes, demos, research agents, content automation. Teams that want to ship something quickly and do not have strict reliability or observability requirements. Not for production systems where failure costs are high.
AutoGen (Microsoft Research)
AutoGen (~40k GitHub stars) is Microsoft Research's take on multi-agent conversation. The core primitive is a "conversable agent" — agents that communicate through a message-passing interface, including group chats where multiple agents deliberate before reaching a consensus. AutoGen v0.4 was a near-complete rewrite of the original, which introduces its own kind of risk for teams already using earlier versions.
What I actually like: the group chat primitive is genuinely interesting for tasks that benefit from debate and review — code generation with a test agent, document drafting with a critic. The multi-modal support and tool integration with Azure services is solid if you are already in the Microsoft stack. The research team publishes regularly, so the academic trajectory is clear.
The real cost: the v0.4 rewrite broke most existing integrations and the ecosystem is still stabilizing. Production patterns are less established compared to LangGraph — there is less community knowledge about how to operationalize AutoGen at scale. The message-passing model can become hard to reason about when conversations get long and the agent context windows start filling up with back-and-forth history.
When to pick AutoGen
Research, experimental multi-agent setups, and teams deeply invested in the Microsoft/Azure stack. Not a first choice for production systems that need long-term API stability.
OpenAI Agents SDK and provider-native patterns
The OpenAI Agents SDK is newer, simpler, and more opinionated than any of the above. It builds directly on OpenAI's tool calling API, handoffs between agents are first-class, and the surface area is deliberately small. Anthropic has published similar patterns for building agents against the Claude API. The common thread: tight integration with one provider's primitives, minimal abstraction overhead.
What I actually like: less code, fewer moving parts, clearer mental model for engineers who do not want to learn a framework DSL. If you are committing to one model provider and your agent patterns are relatively simple (a few tools, one or two handoffs), the provider SDK approach is often cleaner than reaching for LangGraph.
The real cost: provider lock-in is real. Switching models — or running experiments across providers — gets harder. Observability tooling is less mature than the LangGraph + LangSmith combination. And if your agent patterns grow complex, you will eventually hit the walls of what the SDK supports and start patching around it.
When to pick a provider SDK
Single-provider commitment, simple agent patterns (1-3 tools, minimal routing complexity), teams that want minimum dependencies and fast iteration. Works well when you have already validated the agent design and want to reduce framework overhead.
Custom (no framework)
This option gets underrated. "Custom" means: you define your own agent loop in Python, you manage state yourself, you call the LLM API directly, and you write your own routing logic. You are not building on top of someone else's abstractions — you are the abstraction.
What I actually like: zero framework lock-in. Full control over state, routing, retries, and error paths. When the agent design does not fit neatly into a graph or a crew metaphor, custom code is the only option that does not fight you. Long-lived production systems benefit enormously from not depending on a framework that might be rewritten (AutoGen v0.4) or that may push breaking changes (LangChain's history speaks for itself). Custom systems are also easier to evolve incrementally.
The real cost: you will re-implement everything the frameworks give you for free: observability hooks, retry logic, timeout handling, state serialization, human-in-the-loop checkpointing. This is significant work. For a senior team with good engineering discipline, it is often worth it. For a team shipping an MVP in 6 weeks, it is probably not.
When to go custom
Senior team, long-lived product, domain that does not map onto existing framework abstractions, or after you have genuinely outgrown a framework in production. Also: when the observability story of existing frameworks does not meet your requirements and you are willing to build it yourself.
Framework comparison at a glance
| Framework | Abstraction level | Observability | Production maturity | Best for |
|---|---|---|---|---|
| LangGraph | Medium (graph DSL) | Excellent (LangSmith) | High | Complex production flows |
| CrewAI | High (roles + tasks) | Limited | Medium | Prototypes, demos |
| AutoGen | Medium (conversations) | Partial | Medium (API unstable) | Research, Azure stack |
| Provider SDK | Low (API-level) | Basic | High (simple patterns) | Single-provider, simple agents |
| Custom | None (you own it all) | DIY (OpenTelemetry) | High (if team is senior) | Long-lived products, unique domains |
What actually matters more than framework choice
I want to be direct here. The framework debate gets outsized attention because it is concrete and debatable. The things that actually determine whether your agent system works in production are less glamorous.
Evaluation pipelines
If you cannot measure whether your agent is doing the right thing, you cannot improve it. This means: curated test sets that cover your failure modes, LLM-as-judge scoring for subjective outputs, and production sampling so you know what real users are actually triggering. Most teams skip this entirely until something goes wrong. Build the eval first — before you pick a framework, before you scale, before you demo to stakeholders. Read our deep dive on production failure modes for a detailed look at what goes wrong when you skip this.
Observability
At minimum, you need to trace every LLM call: the input prompt, the model used, the response, the latency, and the tool calls made. At production scale, you need distributed tracing across agent hops. The options here are: LangSmith (excellent if you are on LangGraph), Langfuse (open-source, works with anything), Helicone (lighter-weight proxy approach), or roll-your-own with OpenTelemetry. The right choice depends on your stack and compliance requirements — but having no observability is not an option.
Cost control
Multi-agent systems make more LLM calls than single-agent systems, often by an order of magnitude. Prompt caching, model routing (GPT-4o for complex reasoning, a smaller model for simple classification steps), and token budgeting need to be designed in from the start. We have seen prototype-to-production cost increases of 50x when this was not planned. See also our guide on agentic RAG architectures, which covers retrieval strategies that reduce unnecessary LLM calls.
Failure recovery
Agents fail. Tools time out. The LLM returns malformed JSON. A downstream API returns a 503. Your agent system needs explicit policies for all of these: per-node timeout limits, retry budgets with exponential backoff, fallback paths when a tool fails, and a graceful degradation strategy when the agent cannot complete its task. None of the frameworks give you this out of the box — they give you hooks to implement it.
Tool calling discipline
Your tools are the biggest source of non-determinism after the LLM itself. Every tool needs: a typed, well-documented schema that the model can actually use correctly; error handling that returns structured errors (not stack traces) to the agent; and idempotency guarantees so retries do not create duplicate side effects. This is boring infrastructure work, but it is what separates agents that ship from agents that demo well and then break.
Building AI agents for production?
We design and ship production-grade agent systems with the eval pipelines and observability baked in.
Our actual default
For most production projects we take on at Tensoria: LangGraph + LangSmith for anything with stateful, multi-step flows where observability is required. The graph model matches how we think about agent design, the state typing catches errors early, and LangSmith gives us the traces we need to debug production issues without guessing.
For teams that want zero framework lock-in and have the engineering depth to build their own primitives: custom Python + OpenTelemetry. It is more work upfront, but the long-term maintainability is better and you are not betting on a framework's roadmap.
We almost never reach for CrewAI or AutoGen in production. CrewAI is useful for internal prototypes where we want to validate a multi-agent design before committing to a LangGraph implementation. AutoGen is interesting research, and we will probably revisit it as the v0.4 ecosystem matures. The agent systems we deploy need to run reliably for months — and for that, the framework's debuggability and observability story has to be solid on day one.
If you are just starting out and want to validate a concept before committing to an architecture: use the OpenAI Agents SDK or CrewAI to get something running in a week. Then, before you harden it for production, stop and do an architecture review with a fresh set of eyes. The framework decisions you make while prototyping tend to calcify.
The one rule we have not broken yet
Before committing to any agent framework, run a structured AI architecture audit. Map your task decomposition, your failure modes, and your observability requirements. The right framework will be obvious once those are clear. Without that clarity, you are just picking based on GitHub stars.
Closing: framework is a 6-month decision, eval is a 2-year decision
Frameworks come and go. LangChain looked like the winner in 2023. LangGraph is the more serious production option today. Something else will emerge in 2027. The decisions that compound over time are not framework choices — they are your eval coverage, your observability instrumentation, and your team's understanding of agent failure modes.
Build your evaluation pipeline before you worry about which framework to use. Instrument your LLM calls before you optimize the agent topology. Then pick the framework that does not obstruct you, ship incrementally, and iterate on what the traces actually show you. That approach produces better agents than any framework choice.
If you are evaluating agent architectures for a real project and want a second opinion before committing to a stack, we are happy to talk through the trade-offs. Our AI architecture audit is designed exactly for this — a focused session before you build, not a postmortem after something breaks.
Related reading
- Agentic RAG: how retrieval fits inside agent loops, and when to use it vs. static RAG.
- Production failure modes: what actually breaks in production AI systems and how to prevent it.
- AI agent services: how we design and deploy agent systems at Tensoria.
Talk to an engineer
Discuss your agent architecture with Anas.
Conclusion
The agent framework ecosystem is genuinely useful — it has matured enough that you should not build everything from scratch on a 6-week timeline. LangGraph is the most production-ready option for stateful, observable agents. CrewAI is a legitimate prototyping accelerator. Custom code is the right long-term bet for teams that have outgrown framework abstractions. What ties all of this together is not the framework — it is the eval pipeline, the observability, and the failure recovery logic you build regardless of which abstraction layer sits above your LLM calls.
Pick a framework that gets out of your way. Build the infrastructure that makes it debuggable. Then iterate on what production traffic actually shows you. The teams that get this right ship better agents than the ones still debating which framework has the best GitHub star trajectory.