PMaker home
Pick the lowest rung that does the jobPlain codeStop when branches are expressibleModel callStop if it only judges or extractsTool loopMove up when next step is unknownWorkflowMove up for state machines and gatesMulti-agentMove up for isolation or real parallelismEvery step up must answer: why is the lower rung not enough

A higher rung is not better, just more expensive — prove the lower one fails first.

Do You Need an Agent at All

Not every project that calls a model is an agent. Walk the complexity ladder, pick the lowest rung that finishes the job, and write down which rungs you rejected.

Start at the lowest rung. Not every project that calls a model is an agent, and a process with twelve steps does not need twelve agents. The point of the complexity ladder is to force you to prove the cheaper rung is insufficient before you climb. Each step up buys autonomy and charges you tokens, latency, new failure modes, and a larger verification bill — and autonomy is only worth what you can verify.

Eight rungs, climbed from the bottom

  1. Deterministic function. Branches, loops, and error handling that ordinary code can express.
  2. Single model call. Text in, text out, nothing in between.
  3. Structured model call. The model judges or extracts; the output lands in a schema.
  4. Single agent tool loop. The next step depends on intermediate results, and tool choice cannot be fixed in advance.
  5. Program-controlled workflow. A fixed state machine with encodable branches and stop conditions, plus approval and audit.
  6. Durable workflow. The task survives days, tolerates human interruption, or must replay exactly.
  7. Multi-agent. Subtasks parallelize cleanly, context or permissions must be isolated, or review needs an independent view.
  8. Distributed agents. Deployed across services and teams, each with its own lifecycle.

Do not evaluate all eight from the bottom up. Start at rung eight and ask "do I actually need this?" until the answer flips.

A model in the loop is not an agent

Here is the quick test: replace the model call with a stub that returns a fixed value. Does the main flow still run? If it does, the model is one component in a pipeline — you are writing rung-three code, not building an agent.

The common mistake is calling anything that touches a model an agent. The real divider is who picks the next step. When your code fixes the next step, you have a workflow with a call inside it. When the model reads tool output and decides what comes next, you have an agent langchain-what-is-agent. The name matters less than the consequence: operate a rung-three system as if it were rung seven and you will pay for gates, rollbacks, and isolation that buy nothing.

This boundary is not one framework's opinion. Anthropic's Building Effective Agents defines workflows as "orchestration of LLMs and tools through predefined code paths" and agents as "the model deciding its own flow and tool calls," and recommends starting from the simplest working pattern — autonomy only earns its keep when the gain is measurable anthropic-bea. OpenAI's own build guide likewise puts "is this problem worth an agent" ahead of frameworks and implementation openai-agents-guide.

Rung zero: known intents should never reach the model

Below the ladder sits a deterministic front layer that intercepts known intents before they cost a call.

Semantic routing. Generate a few hundred reference utterances per known intent, embed them, and when a new request clears the similarity threshold, call the bound tool directly. That removes an entire round trip: the framework asks the model, the model names a tool, the result is pasted back, and the model is asked again.

Semantic caching. Store request and response pairs together; a similar request returns the cached answer. Seed pairs for official FAQs ahead of time.

Redis measured the gap plainly: 13 seconds and roughly 400 tokens for the full path, against 345ms and zero tokens on a cache hit redis-semantic-routing.

Three traps come with it. Calibrate the threshold against test data, never by intuition. Chunk long requests sentence by sentence, because users bury the real intent in chatter. And watch negation: "what is X" and "what is not X" sit very close together in general-purpose embeddings, so the cache can return the opposite answer — high-risk domains need a negation-sensitive model or an extra check. Both patterns also assume a converging intent set; they are not an answer to open-ended questions.

Many steps does not mean many agents

Eight steps is a workflow, not eight agents. Multi-agent only earns its cost when subtasks parallelize cleanly, context or permissions must be isolated, or an independent reviewer produces measurable gain. More tools is not more agents either: one agent holding ten tools is still one context and one owner.

Write the decision down

Record three things: the rung you chose, the higher rungs you rejected, and why. The record pays off a quarter later, when a new model ships and you need to know whether you were blocked by capability or by your own shortcut.

One more calibration before you invest. Taotian's retrospective puts code generation at only 20%–30% of the development chain; what dominates cycle time is requirements handoff, review, and waiting on integration taotian-loop. Spending at the most sophisticated rung does not automatically move the metric you care about. Measure where the bottleneck sits first.

References

  1. Reduce LLM calls with vector search design patterns
  2. What is an agent?
  3. Building Effective Agents
  4. A Practical Guide to Building Agents
  5. Taotian: from point tools to a closed development loop