MMatt Goren
← AI hub
ComparisonBuilding with LLMsAI AgentsPrompting

Single Prompt vs Agent vs Workflow: Choosing the Right Shape

The three shapes of LLM apps — one call, an agent loop, a deterministic workflow. How they compare and how to pick the simplest one that works.

By Matt Goren · Updated June 25, 2026 · 7 min read

Every LLM application is one of three shapes, and most of the trouble I see comes from people reaching for the wrong one. They build a sprawling autonomous agent for a job a single prompt would have nailed, or they cram a genuinely open-ended task into one giant prompt and wonder why it's flaky. The shape is the most important architectural decision you'll make, and it's usually made by accident.

Here are the three shapes, how they actually differ, and how I decide between them when I'm building.

The three shapes

A single prompt is the simplest thing that exists: one call to the model, context in, answer out. You give it the task and the material, it responds, you're done. Summarize this, classify that, rewrite this in a different tone, extract these fields. No loops, no orchestration, no decisions about what to do next — because there's only one step.

A workflow is a fixed sequence of steps that you, the developer, lay out in code. Step one does this, its output feeds step two, which feeds step three. Some steps are model calls, some are plain code, some are validators. The crucial part is that you decide the path in advance. The model fills in the hard parts; your code controls the flow. Drafting a piece of content might be: research → outline → draft → fact-check → polish. Five steps you chose, run in order, every time.

An agent is a loop where the model decides what to do next. You give it a goal and a set of tools, and it reasons about the situation, picks a tool, sees the result, reasons again, and keeps going until it decides it's finished. You don't script the path because you can't — the whole point is that the path depends on what it discovers along the way. A debugging agent that reads code, runs tests, reads the failures, and tries fixes is choosing each move based on the last result. Nobody wrote that sequence ahead of time.

The progression from prompt to workflow to agent is a progression in autonomy — and in exchange, a progression in cost, latency, and unpredictability. More freedom for the model means less control for you. That trade is the entire decision.

How they compare

DimensionSingle promptWorkflowAgent
ControlTotal — one call you fully shape.High — you own the sequence.Low — the model picks each step.
CostLowest — one call.Moderate — several calls.Highest — many calls, variable count.
LatencyFastest — one round trip.Predictable — sum of the steps.Slowest and variable — depends on the loop.
ReliabilityGood for simple tasks, fragile for complex ones.Highest — each step verifiable in isolation.Lowest — more moving parts, more drift.
DebuggabilityTrivial — one input, one output.Easy — inspect each step.Hard — the path differs every run.
When to useSingle, well-defined task.Known stages, needs reliability.Path can't be known in advance.

Read it top to bottom: as you move right, you gain autonomy and lose predictability. That's not a flaw in agents — it's the price of letting the model handle problems you couldn't pre-script. The error is paying that price when you didn't need to.

Why "just use an agent" is usually wrong

Agents are the exciting shape, so they're the over-used one. But every property that makes an agent powerful also makes it harder to live with. Because the model chooses its own next step, two runs of the same task can take different paths, different numbers of calls, and different amounts of time. That variability is the cost of autonomy — and it's a cost you should only pay when the autonomy is actually buying you something.

For any task where you already know the steps, scripting them yourself in a workflow is cheaper, faster, and dramatically easier to debug. You don't need the model to decide to research before it writes if research-then-write is always the right order — just write those two steps. Handing a known sequence to an agent is paying for flexibility you'll never use, and inheriting the unpredictability for free. I treat reaching for an agent as a decision that needs to be justified, not a default.

Why workflows beat one big prompt

The opposite mistake is stuffing everything into a single mega-prompt: "research this topic, outline it, write 1500 words, fact-check every claim, and match my brand voice." The model will try, and it'll do a mediocre job of all of it, because you've asked one call to hold five concerns at once.

Breaking it into a workflow turns one hard call into several easy ones. Each step does one thing well. And — this is the real win — each step becomes verifiable on its own. You can check that the research is solid before you outline, validate the outline before you draft, run the fact-check as its own gate, and retry any single step that fails without redoing the whole thing. That's how you get reliability: not by writing a better mega-prompt, but by decomposing the task so failures are isolated and catchable.

import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();

async function step(model, prompt) {
  const r = await client.messages.create({
    model,
    max_tokens: 2048,
    messages: [{ role: "user", content: prompt }],
  });
  return r.content[0].text;
}

// A workflow: a fixed sequence YOU control.
// Cheap model for the easy steps, a stronger one for the hard draft.
const research = await step("claude-haiku-4-5", researchPrompt(topic));
const outline  = await step("claude-sonnet-4-6", outlinePrompt(research));
const draft    = await step("claude-opus-4-8", draftPrompt(outline));
// ...each step verifiable, retryable, and swappable on its own.

This is how Otto works under the hood: a deterministic pipeline of well-defined steps, not one heroic prompt and not a free-roaming agent. The path is knowable, so I make it explicit, and I get to verify quality at each stage instead of praying over a single output.

Verdict

Default to the simplest shape that works, and escalate only when the task forces you to.

Start with a single prompt. If the task is one well-defined thing — summarize, classify, rewrite, extract — a single call is the whole answer. Don't build infrastructure around a problem that fits in one prompt. Most "AI features" are exactly this size and people over-engineer them.

Escalate to a workflow when the task has stages or needs reliability. The trigger is one of these: the task has natural steps you can name in advance; you need to verify quality partway through; a single prompt is producing inconsistent results because it's juggling too much; or different steps want different models. When you can write the recipe down, write it down as a workflow. This is where most serious LLM applications should live.

Escalate to an agent only when you genuinely cannot script the path. The trigger is real unpredictability: the next step depends on what the previous step discovered, the task is open-ended, and it needs to use tools and react to their results. Research that follows leads, debugging that responds to failures, problem-solving across many tools — that's true agent territory. If you can write the steps down in advance, you don't have an agent problem, you have a workflow.

The discipline is to escalate deliberately, one rung at a time, and only when the current shape demonstrably can't do the job. Every rung up costs you control, money, speed, and ease of debugging. Pay it on purpose, never by default. When you do decide an agent is right, build it well — I go deep on that in how to build AI agents that work.

FAQ

What's the difference between a prompt, an agent, and a workflow? A single prompt is one model call in, one answer out. A workflow is a fixed sequence of steps you orchestrate in code. An agent is a loop where the model decides its own next step and uses tools until it's done. They trade simplicity for autonomy in that order.

Which LLM app shape should I use by default? Start with a single prompt. Move to a deterministic workflow when the task has clear stages or needs reliability. Reach for an agent only when you genuinely can't predict the steps in advance. Most problems are smaller than they first look.

Why not just use an agent for everything? Agents are powerful but the loop makes them slower, more expensive, and harder to predict, since the model chooses its own path each turn. For tasks with known steps, a fixed workflow is cheaper, faster, and far easier to debug.

When is an agent actually the right choice? When the path can't be known ahead of time — the next step depends on what previous steps found, the task is open-ended, and it needs to use tools and react to results. Research, debugging, and multi-tool problem solving are real agent territory.

How do workflows improve reliability over a single prompt? By breaking one hard call into several easy ones, each verifiable on its own. You can validate the output of each step, retry failures in isolation, and keep deterministic logic in code instead of asking one prompt to do everything at once.

#llm architecture#ai agents
Want to apply this right now?

Use the free, no-API prompt generators to put it into practice.

Open Prompt Studio →
Keep reading