Agent frameworks & orchestration.
Choose a framework on the elegance of its abstractions and you will have agonised over the one part you could replace in a week. The loops have converged — LangChain, which maintains the largest of them, now describes the field as hundreds of frameworks sharing the same core abstraction — so the decision that actually binds you is the interpose surface: whether you can stop the loop between the model's decision and the tool's execution to demand an approval, check a policy, carry a provenance label, or persist and resume tomorrow. That is what you cannot retrofit, and it is why LangChain's 1.0 release rebuilt the library around middleware rather than around better chains.
Step 1The loop is commodity. Say so out loud before you shop.
Calling a model API is a few lines of code. The hard parts of an agentic system are everything around the call: the multi-step loop, wiring tools and validating their arguments, assembling and trimming context, retrieval, memory, retries, streaming, tracing and evaluation. A framework is a set of pre-built abstractions over some subset of that. It does not give the model new capabilities, and in 2026 it does not give you a loop anyone else lacks.
The convergence is not a rumour, it is the vendors' own position. LangChain 1.0, released on 22 October 2025, collapsed its own surface area into a single create_agent entry point, moved the legacy chains out into a separate langchain-classic package, and pulled MCP support into its own namespace after archiving the standalone adapters. The replaced function was called create_react_agent, and the pattern it implemented — reason, call a tool, read the result, repeat — is the same one every competitor ships, documented on this wiki as the ReAct pattern. When the market leader's headline feature is a smaller API over the same loop, the loop has stopped being the product.
So keep the honest baseline the old version of this page opened with. For a single-step or short-loop application, a thin layer of your own code over the raw API is often clearer, easier to debug and has fewer moving parts than any framework; a few hundred lines gets you a tool-calling loop with retries. "Do I need one at all?" remains a legitimate first question — and not every task needs an agent in the first place. What has changed is the reason to answer yes. It is no longer "they wrote the loop for me." It is the four paragraphs below.
Step 2What you are actually choosing: where you can get between the decision and the action.
An agent is dangerous and expensive at exactly one instant: after the model has decided to call a tool and before the tool runs. Everything you will be asked for in the first production review lives at that boundary, and a framework either lets you occupy it or it does not.
- Approval. Pause before a write, show a human the exact arguments, and accept approve, edit or reject — not just yes or no. LangChain 1.0 ships this as middleware precisely because editing the call is the part teams need; the design space is approval and confirmation UX.
- Policy on arguments. A decision made against the actual arguments every time, by code the model cannot talk out of it: policy as code for agents. A refusal written into the system prompt is not this.
- Provenance. A label that says the context now contains attacker-controlled text, surviving every later step so the egress tool can refuse — context taint tracking. This one is nearly impossible to add later, because it has to be threaded through the loop's state.
- Budget and termination. A step ceiling and a token ceiling that stop the run and hand back partial work rather than looping — planning and termination and agent cost control.
- The trace. Every prompt, tool call and result emitted as structured spans without you writing the instrumentation: agent observability.
Test a candidate by writing one thing before you commit: an approval gate on a single destructive tool, where the human can edit the arguments and the run resumes afterwards from where it paused. If that is a documented hook, you have found your framework. If it means wrapping the tool, keeping your own queue and reconstructing state on resume, the framework's loop is a closed box and you are going to be fighting it for a year. The mechanisms this kind of hook competes with inside coding harnesses are laid out in skills vs subagents vs MCP vs hooks.
Adopting a framework does not de-risk an agent — it relocates the risk into a dependency that moves faster than your model provider. Reliability comes from the evaluation harness and the control-flow design, not from which library wraps the model call. What a framework can genuinely give you is a sanctioned place to insert the controls, and that is worth choosing on.
Step 3The second choice you cannot reverse: where the loop's state lives.
The interpose surface decides what you can build. The state boundary decides what you can leave. Three arrangements, in rising order of how hard they are to undo:
- In your process. The loop runs inside your request handler and the conversation lives in your database. Simplest, and the agent dies when the process does. Fine for runs that finish in a minute.
- In a durable execution engine. The loop becomes a workflow whose every step is journaled, so it survives a deploy, a crash and a three-day wait for a human approval. This is the arrangement that makes pausing for approval practical, and it is the subject of durable execution and durable state and resumability. Note that LangChain's own 1.0 framing is that
create_agentruns the ReAct loop on LangGraph's durable runtime underneath — the library and the engine shipped as one answer. - In a vendor's managed runtime. Compute, loop, tool gateway, identity broker and conversation store sold together. The first four are replaceable; the store is the one that is hard to leave, which is the argument in managed agent runtimes and the migration cost in exiting a managed agent runtime.
Rank the two decisions honestly. Swapping the library is days of work on the glue; swapping where state lives is a rewrite of everything that reads it. So pick the state arrangement from how long your runs last and how often a human has to be in them, then pick a library that is comfortable in that arrangement — not the other way round.
Step 4The landscape as of October 2026, and the five questions that pick one.
Place any tool you meet into one of four categories; the brands churn and the categories have been stable for two years.
- General orchestration. LangChain with LangGraph underneath is the largest ecosystem and the usual default for branching, stateful Python work; CrewAI leads with role-and-crew abstractions for multi-agent setups. Mastra is the consensus TypeScript answer and is actively versioned — its core was at 1.76.0 on 11 October 2026 — and Pydantic AI is the choice when type safety and a small surface matter more than breadth of integrations.
- Retrieval-centred. LlamaIndex remains the prototype: the centre of gravity is connecting models to your documents, with agent features built around ingestion, indexing and retrieval. Reach for this category when the problem is "answer over my corpus," not "run a long autonomous loop."
- Provider SDKs. OpenAI's Agents SDK and Google's ADK — the latter still under a year old — track their own platform's tool-use, structured-output and reasoning features closely, with minimal abstraction between you and the model. Least distance from the API, most provider flavour.
- Cross-cutting infrastructure. Tracing, evaluation, prompt management and gateways are a separate layer that complements any of the above, as is the interop substrate — MCP for tools, which frameworks now build on rather than reinvent.
Then ask five questions, in this order, and notice that only the first two are about the framework at all:
- Can I interpose? The approval-gate test from STEP 2. If this fails, stop here.
- Is there an escape hatch? Can you drop to the raw model call when the framework's path is wrong? Without one, the abstraction becomes a ceiling.
- Does it fit my state arrangement? Per STEP 3, and decided before the library.
- What is the abstraction tax? Every layer you do not need is one to learn, debug and work around. Prefer a framework whose concepts match your actual control flow.
- How large is the lock-in surface? How much of your code changes to swap the framework or the model? Keep the model call and the control flow inspectable, and pin versions — this layer still breaks between releases faster than the model layer does.
Before you adopt anything, spend an afternoon building the same small agent twice — once on the framework, once on the raw API — and make both of them pause for a human to edit a tool call and then resume. The framework earns its place if that second requirement is a hook rather than a weekend. If it does not, you have learned that the plumbing it removes was not the plumbing you needed, which is the cheapest lesson available in this part of the stack.
Related: the agent loop for what every framework is implementing, the agent harness for why the half you own decides your results, agent evaluation for the thing that actually makes an agent reliable, and the four-way comparisons in LangGraph vs CrewAI vs OpenAI Agents SDK vs Google ADK and Mastra vs LangGraph.js vs VoltAgent vs AI SDK for the current field in Python and TypeScript.