When not to use an agent framework
If you can draw the steps before the model runs, you are writing a workflow, not an agent. Workflows do not need an agent framework.
In this essay 4 sections
The short answer: do not use an agent framework when you can write down the steps before the model runs. That is a workflow, and a workflow is best written as ordinary code that calls a model. Reach for a framework when the model genuinely has to decide what happens next, across several tools and steps, and you want that loop, its memory and its error handling built for you.
Most features are workflows
Summarise a document. Classify a ticket and route it. Extract fields from an invoice. Answer a question from retrieved passages. Each of these is a fixed sequence: fetch, prompt, parse, store. The model does the hard part of each step, but code decides the order.
Written as plain code, that sequence is a handful of functions. You can read it, unit-test it, put a breakpoint in it and see the exact prompt that went to the model. Wrapped in an agent framework, the same sequence becomes chains, runnables or graphs, and the prompt the model receives is assembled somewhere you did not write.
Anthropic, OpenAI and other providers' SDKs now handle tool calling and structured output directly. The gap that early frameworks filled, gluing a model to tools at all, has mostly closed.
Four signs you do not need one
You can draw the flowchart in advance. If the branches are known, code them. Let the model fill in steps, not choose them.
It is one call with tools. A single request in which the model may call a search tool or a calculator is a loop of a few lines. You do not need a framework to run it.
You need to see the prompt. Debugging an LLM feature mostly means reading what was sent and what came back. Every abstraction between you and that payload makes the bug harder to find. If a framework hides the prompt, the debugging cost lands in production.
The framework is bigger than the feature. If adopting it means the team learns a new vocabulary of chains, nodes and runnables to ship three model calls, the learning cost exceeds the code it saves.
When a framework earns its place
The calculus flips when the control flow really is decided at runtime:
- The model chooses among many tools over many steps, and the number of steps is not known in advance.
- You need memory, handoffs between agents, or human approval in the loop, and would otherwise build them yourself.
- Several teams are building agents and need one convention for tracing, tools and evaluation.
- You want the framework's integrations: loaders, vector stores and providers that would each be a small project to write.
Even then, prefer a framework that stays close to plain code and lets you see every prompt. The agent framework comparison sets the main options side by side, including when to skip each.
The part frameworks do not fix
Whatever you choose, an agent that runs for more than a request needs somewhere durable to live. A process restart mid-loop loses its state, and a retried tool call can charge a card twice. That is a job for durable execution and idempotency keys, not for the agent framework. Agents need a durable host covers that layer.
And whatever you choose, measure it. An agent that cannot be evaluated cannot be improved, because every change is a guess. Start with the eval set, then decide how much framework you need.