Pick a framework by state, tools, durability, deployment, and team fit.
A framework should make the hard part easier.
Learners select from product constraints rather than popularity.
Why this matters: This prevents picking a framework that solves the wrong problem.
Problem anchor: a support triage app needs tool calls, customer data retrieval, human approval for refunds, and trace review. The best framework depends on which part is hardest: integration, RAG, explicit state, provider-native handoffs, or enterprise deployment.
A framework is not a quality guarantee. It gives you defaults and vocabulary. You still own security, evals, cost, and product behavior.
If the hardest part is broad provider/tool integrations, LangChain may fit. If the hard part is approval and resumable state, LangGraph or a workflow engine matters. If the hard part is private data indexing, LlamaIndex is stronger.
If the app is OpenAI-native with handoffs and tracing, OpenAI Agents SDK may be faster. If the org is Microsoft/Azure-heavy, Microsoft Agent Framework may fit better.
The native object tells you what the framework is good at.
Learners understand the key framework families.
Why this matters: Different frameworks can all “build agents” while optimizing for different surfaces.
LangChain centers models, tools, prompts, middleware, and integration breadth. LangGraph centers state graphs, nodes, edges, checkpoints, and interrupts. LlamaIndex centers documents, nodes, indexes, retrievers, query engines, agents, and workflows.
CrewAI centers agents, tasks, crews, and flows. OpenAI Agents SDK centers agents, runs, tools, handoffs, sessions, guardrails, and tracing. Microsoft stack centers kernels/plugins historically and newer Agent Framework workflows, middleware, telemetry, and Azure integration.
| Option | Best native abstraction | Use when | Watch | When to choose | Cost | Complexity |
|---|---|---|---|---|---|---|
| LangGraph | State graph with checkpoints and interrupts. | Control flow, resume, approval, branches matter. | You own graph design and tests. | Use for explicit agent workflows. | Medium | High |
| LlamaIndex | Documents, nodes, indexes, query engines. | Data/RAG quality dominates. | Agents still need tool and citation eval. | Use for data-centric RAG agents. | Medium | Medium |
| OpenAI Agents SDK | Agents, tools, handoffs, sessions, tracing. | OpenAI-native runtime is desired. | Provider coupling and state strategy. | Use for OpenAI-centered product agents. | Medium | Medium |
State needs are often more decisive than model choice.
Learners treat state as a first-class framework criterion.
Why this matters: Ignoring state leads to brittle demos that fail under real workflows.
If the agent only answers one question, a provider SDK or simple chain may be enough. If it branches, waits for review, resumes after interruption, or must survive deploys, state control becomes central.
LangGraph gives graph checkpoints and interrupts. OpenAI Agents SDK offers sessions and continuation strategies. Durable engines such as Temporal/Inngest/Restate may sit underneath when external orchestration spans long periods.
A refund agent retrieves policy, drafts a recommendation, pauses for human approval, then updates a ticket. LangGraph handles explicit pause/resume well. A durable workflow engine may wrap it if the approval can wait days.
A one-turn FAQ agent does not need that machinery.
The right prototype attacks the scary part first.
Learners implement a decision helper and use it critically.
Why this matters: Happy-path examples hide framework mismatch until late.
Prototype the slice that could fail expensively: approval resume, citation support, tool permission, query-engine retrieval, or handoff ownership. Do not choose based on how quickly a hello-world agent runs.
Spaced recall: from multi-agent orchestration, compare against a simpler baseline. Framework complexity must earn its place.
def choose_framework(needs): if needs.get("explicit_graph") or needs.get("interrupts"): return "LangGraph" if needs.get("data_rag") and needs.get("query_engines"): return "LlamaIndex" if needs.get("openai_native") and needs.get("handoffs"): return "OpenAI Agents SDK" if needs.get("microsoft_stack"): return "Microsoft Agent Framework / Semantic Kernel" if needs.get("role_tasks"): return "CrewAI" return "LangChain or direct provider SDK" print(choose_framework({"data_rag": True, "query_engines": True, "handoffs": False})) print(choose_framework({"explicit_graph": True, "interrupts": True}))
It prints LlamaIndex for data/query-engine needs and LangGraph for explicit graph plus interrupts.
A framework choice is an operating decision.
Learners add production criteria to framework choice.
Why this matters: Fast demos can hide telemetry gaps, provider coupling, and migration cost.
Ask how traces work, where prompts and tool outputs are logged, how evals run, how versions are pinned, how deployment works, and what happens if the provider or package changes.
Provider-native frameworks can be faster inside one ecosystem; provider-neutral frameworks can reduce lock-in but add integration work. Enterprise stacks can solve identity and hosting while constraining portability.
Use this checklist before committing a product team.
Retrieval prompt: compare frameworks by native abstraction, state/durability, data/RAG, tools, multi-agent shape, observability, deployment, and team ecosystem.
Choose a framework for a support triage agent and justify it against two alternatives. Include state needs, data/RAG needs, tool risk, deployment ecosystem, evaluation plan, and migration risk. Next rung: study the chosen framework in depth.
Your app must pause mid-run, wait for a human to approve a step, then resume exactly where it left off — possibly hours later. Which framework is best suited to this constraint out of the box?
LangGraph's graph checkpoints persist state at every node, making it the natural fit for durable, resumable human-in-the-loop workflows.
A team is evaluating frameworks by building a polished demo against a clean, happy-path dataset. Why is this a risky evaluation strategy?
Prototyping the riskiest slice — not the easiest path — is the only way to expose whether a framework's abstractions hold under the real constraint.
Name the 'center of gravity' (primary abstraction) for each of these three frameworks: LlamaIndex, CrewAI, and the OpenAI Agents SDK.
Each framework is designed around a distinct core abstraction; choosing one whose center of gravity matches your workflow shape avoids fighting the framework from day one.
You're adopting the Microsoft AutoGen / Semantic Kernel stack. Which lock-in tradeoff should you weigh most carefully?
The Microsoft stack's deep Azure integration is its strength and its lock-in risk — teams that later want cloud or model portability face significant migration cost.
When should you place a dedicated workflow engine (e.g., Temporal or Prefect) underneath your agent framework rather than relying on the framework's own state management?
Agent frameworks manage in-process state; a workflow engine adds cross-process durability, retries, and scheduling that frameworks are not designed to provide on their own.