Short answer: start with a fixed workflow. Add a model call only at the steps where a rule cannot do the job, and move to an agent only when you cannot write the steps down before you see the input. On one email-triage task I priced a 2-call workflow at $0.0077 per run and a 6-turn tool-using agent at $0.0777, about 10 times more, at Anthropic's list prices on 12 November 2026. That is an estimate from a script, not a production bill. The script is below so you can change every assumption.

Updated November 2026. I wrote and ran the cost model on 12 November 2026 with Python 3.12.3 on Ubuntu 24.04 (4 vCPUs, 7.6 GB RAM). Token prices come from Anthropic's pricing page, which I read the same day. The workflow and agent definitions come from Anthropic's "Building effective agents" post (19 December 2024). The adoption figures come from Gartner (25 June 2025) and Menlo Ventures (9 December 2025). I did not run a live agent for this post, so every cost and reliability number here is labelled as an estimate or as arithmetic.

1. The decision

The question a CTO actually asks is: "Does this task need an agent, or can a workflow with a few model calls do it?" The CTO owns the architecture, but the product owner who carries the cost of a wrong action should sign off on the answer. Three things usually force the question. A demo shows an agent doing something a workflow could do. A usage bill arrives and nobody can say which feature caused it. Or a reviewer asks "why did it do that?" and the only answer is the transcript.

2. Why this is contested, not settled

The vocabulary first, because teams use "agent" for both. Fact, per Anthropic: "Workflows are systems where LLMs and tools are orchestrated through predefined code paths. Agents, on the other hand, are systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks." The same post says agents "trade latency and cost for better task performance" and tells you to consider "when this tradeoff makes sense." Source: Building effective agents, 19 December 2024.

Two outside data points show the market is still sorting this out, and they measure different things, so do not add them together.

Read together: most production AI today is a workflow, and a large share of the agent projects that were started are expected to be stopped on cost, value or risk grounds. That does not say agents are a mistake. It says the default should be the cheaper, more predictable thing, with a reason written down for anything more autonomous.

3. The options

There are four real options. "Keep the manual process" is a fifth, and for low-volume tasks with expensive mistakes it is sometimes correct.

OptionWhat it commits you toTypical shape
A. Deterministic workflowYou write every rule. No model in the path.Parse, validate, map fields, post to an API
B. Workflow with model stepsThe path is fixed in code. A model does language work inside named steps (classify, extract, draft). Anthropic's workflow patterns include prompt chaining, routing, parallelization and orchestrator-workers.Classify an email, look up the order in code, draft a reply, update the ticket
C. Bounded agent inside a workflowOne step lets a model choose tools in a loop, with a turn cap, a token cap and no write access without approval."Find why this order is stuck" as a read-only investigation step
D. Open agentThe model plans the whole task and acts on it. You need a sandbox, evals and a spend limit before launch.Multi-file code changes, open-ended research

4. Architecture implications

What you build differs more than the model call does. For a workflow you build an explicit state machine: a schema check at every step boundary, a retry policy per step, and fixed places to put a human approval. For an agent you build the tool layer, the credentials each tool runs with, a turn and token budget, trace logging that a reviewer can read, and an eval set that tells you whether last week's prompt change made things worse.

The approval point deserves its own sentence, because it is where the two designs differ most. In a workflow the approval node is a step, so it runs every time. In an agent, "ask before writing" is something the model has to choose to do. In my approval-gate lab on Postgres, a policy written in the prompt stopped none of the 5 harmful tool calls once the model emitted them, while a broker and scoped database grants stopped all five. If you pick an agent, the gate belongs in the layer the agent cannot talk to. If the work runs for hours or days, also read my note on durable execution, because a loop that dies mid-run needs somewhere to resume from.

5. Cost: the model, the assumptions and the output

I picked one task and priced it both ways: triage one inbound support email. Classify it, look up the order, draft a reply, update the ticket. The workflow makes 2 model calls and does the lookup and the ticket update in code. The agent is one model in a loop with 4 tools, and it re-sends the whole conversation on every turn, because that is how a tool-calling loop works.

Assumptions (all mine, not measured on a live system). Change them to match your task.

InputValueBasis
Email plus instructions1,200 tokensAssumption
Agent system prompt and 4 tool definitions2,500 tokensAssumption
Agent output per turn220 tokensAssumption
Each tool result added to history450 tokensAssumption
Workflow call 1 (classify and extract)1,200 in, 150 out, Claude Haiku 5.5Assumption
Workflow call 2 (draft reply)2,000 in, 350 out, Claude Sonnet 5.5Assumption
Claude Sonnet 5.5 price$2 in, $10 out, $0.10 cache read, per million tokensFact, Anthropic pricing page, read 12 Nov 2026
Claude Haiku 5.5 price (prompts up to 100,000 tokens)$0.10 in, $0.50 out, $0.01 cache read, per million tokensFact, same page and date

Pricing source: platform.claude.com/docs/en/about-claude/pricing. List prices change, so re-read the page before you reuse the numbers.

Here is the script exactly as I ran it:

# Cost and reliability model: fixed workflow vs tool-loop agent, same task.
# Prices: platform.claude.com/docs/en/about-claude/pricing, read 2026-11-12 ($ per million tokens)
PRICE = {
    "haiku-5.5":  {"in": 0.10, "out": 0.50, "cache_read": 0.01},
    "sonnet-5.5": {"in": 2.00, "out": 10.00, "cache_read": 0.10},
}

def usd(model, tok_in=0, tok_out=0, tok_cached=0):
    p = PRICE[model]
    return (tok_in * p["in"] + tok_out * p["out"] + tok_cached * p["cache_read"]) / 1e6

# --- Task: triage one inbound support email (classify, look up order, draft reply, update ticket)
EMAIL = 1200          # tokens: email + instructions
SYSTEM_TOOLS = 2500   # tokens: agent system prompt + 4 tool definitions
TURN_OUT = 220        # tokens the agent writes per turn (reasoning + tool call)
TOOL_RESULT = 450     # tokens each tool result adds to the history

def workflow_cost():
    classify = usd("haiku-5.5", tok_in=EMAIL, tok_out=150)
    draft = usd("sonnet-5.5", tok_in=2000, tok_out=350)
    return classify + draft, 2   # (usd, sequential LLM calls)

def agent_cost(turns, cached=False):
    total = 0.0
    history = SYSTEM_TOOLS + EMAIL
    for t in range(turns):
        if cached and t > 0:
            total += usd("sonnet-5.5", tok_in=TURN_OUT + TOOL_RESULT, tok_out=TURN_OUT, tok_cached=history)
        else:
            total += usd("sonnet-5.5", tok_in=history, tok_out=TURN_OUT)
        history += TURN_OUT + TOOL_RESULT      # every turn re-sends everything so far
    return total, turns

w, wcalls = workflow_cost()
print(f"workflow: ${w:.5f}/run, {wcalls} sequential LLM calls")
print()
print("agent, Sonnet 5.5 loop (history re-sent each turn):")
print(f"{'turns':>5} {'uncached $/run':>15} {'cached $/run':>13} {'x workflow (uncached)':>22}")
for turns in (4, 6, 10, 15):
    u, _ = agent_cost(turns)
    c, _ = agent_cost(turns, cached=True)
    print(f"{turns:>5} {u:>15.5f} {c:>13.5f} {u/w:>21.1f}x")

print()
print("monthly spend gap (6-turn agent, uncached, vs workflow):")
u6, _ = agent_cost(6)
for vol in (1_000, 10_000, 100_000, 1_000_000):
    print(f"  {vol:>9,} runs/month: workflow ${w*vol:>9,.2f}  agent ${u6*vol:>10,.2f}  gap ${(u6-w)*vol:>10,.2f}")

print()
print("end-to-end success if every step succeeds independently with probability p (p^n):")
print(f"{'n steps':>8}" + "".join(f"{'p='+str(p):>9}" for p in (0.99, 0.97, 0.95)))
for n in (2, 4, 8, 12):
    print(f"{n:>8}" + "".join(f"{p**n:>9.1%}" for p in (0.99, 0.97, 0.95)))

# Same-model control: workflow with Sonnet 5.5 on both calls, so the gap is not a model-choice artefact
w_same = usd("sonnet-5.5", tok_in=EMAIL, tok_out=150) + usd("sonnet-5.5", tok_in=2000, tok_out=350)
print()
print(f"control, workflow with Sonnet 5.5 on both calls: ${w_same:.5f}/run; 6-turn agent is {u6/w_same:.1f}x that")
c6, _ = agent_cost(6, cached=True)
print(f"6-turn agent with prompt caching: ${c6:.5f}/run = {c6/w:.1f}x the mixed-model workflow, {c6/w_same:.1f}x the same-model workflow")

# --- Scorecard: five yes/no questions -> architecture
QUESTIONS = [
    "steps_known_upfront",     # could you write the steps before seeing the input?
    "bounded_inputs",          # do inputs fall into a few known shapes?
    "needs_audit_replay",      # must a reviewer reproduce why it did X?
    "action_irreversible",     # does a wrong action cost money or trust you cannot undo?
    "cost_sensitive_volume",   # is volume high enough that per-run cost shows up on a P&L?
]
def recommend(a):
    det = sum([a["steps_known_upfront"], a["bounded_inputs"], a["needs_audit_replay"],
               a["action_irreversible"], a["cost_sensitive_volume"]])
    if det == 5: return "deterministic workflow, add an LLM step only where a rule cannot do the job"
    if det >= 3: return "workflow with LLM steps (chaining/routing), no autonomy"
    if a["action_irreversible"]: return "bounded agent inside a workflow, human approval before any write"
    return "agent in a sandbox, with evals and a cost cap"

TASKS = {
    "extract fields from supplier invoices": dict(steps_known_upfront=1, bounded_inputs=1, needs_audit_replay=1, action_irreversible=1, cost_sensitive_volume=1),
    "triage inbound support email":          dict(steps_known_upfront=1, bounded_inputs=0, needs_audit_replay=1, action_irreversible=0, cost_sensitive_volume=1),
    "research a prospect before a call":     dict(steps_known_upfront=0, bounded_inputs=0, needs_audit_replay=0, action_irreversible=0, cost_sensitive_volume=0),
    "change code across a large repository": dict(steps_known_upfront=0, bounded_inputs=0, needs_audit_replay=0, action_irreversible=1, cost_sensitive_volume=0),
}
print()
for name, ans in TASKS.items():
    print(f"{name:40s} -> {recommend(ans)}")

And its output:

workflow: $0.00769/run, 2 sequential LLM calls

agent, Sonnet 5.5 loop (history re-sent each turn):
turns  uncached $/run  cached $/run  x workflow (uncached)
    4         0.04644       0.02173                   6.0x
    6         0.07770       0.03015                  10.1x
   10         0.15630       0.04781                  20.3x
   15         0.28470       0.07138                  37.0x

monthly spend gap (6-turn agent, uncached, vs workflow):
      1,000 runs/month: workflow $     7.69  agent $     77.70  gap $     70.01
     10,000 runs/month: workflow $    76.95  agent $    777.00  gap $    700.05
    100,000 runs/month: workflow $   769.50  agent $  7,770.00  gap $  7,000.50
  1,000,000 runs/month: workflow $ 7,695.00  agent $ 77,700.00  gap $ 70,005.00

end-to-end success if every step succeeds independently with probability p (p^n):
 n steps   p=0.99   p=0.97   p=0.95
       2    98.0%    94.1%    90.2%
       4    96.1%    88.5%    81.5%
       8    92.3%    78.4%    66.3%
      12    88.6%    69.4%    54.0%

control, workflow with Sonnet 5.5 on both calls: $0.01140/run; 6-turn agent is 6.8x that
6-turn agent with prompt caching: $0.03015/run = 3.9x the mixed-model workflow, 2.6x the same-model workflow

extract fields from supplier invoices    -> deterministic workflow, add an LLM step only where a rule cannot do the job
triage inbound support email             -> workflow with LLM steps (chaining/routing), no autonomy
research a prospect before a call        -> agent in a sandbox, with evals and a cost cap
change code across a large repository    -> bounded agent inside a workflow, human approval before any write

Reading the output

The gap grows with turns, not just with price per token. A tool loop re-sends the system prompt, the tool definitions and every earlier turn on each call. At 4 turns the agent costs 6.0 times the workflow in this model. At 15 turns it costs 37.0 times. The relationship is worse than linear because each turn carries more history than the last.

I checked the obvious objection. My first run gave the workflow a cheap model for classification and gave the agent only the expensive one, which flatters the workflow. The control line prices the workflow with the expensive model on both calls. The 6-turn agent is still 6.8 times that, so the gap is not a model-choice artefact.

Prompt caching narrows the gap but does not close it. With cached history billed at the cache-read rate, the 6-turn agent comes down to $0.0302 per run, which is 3.9 times the mixed-model workflow and 2.6 times the same-model workflow. My caching line is generous to the agent: it ignores the cache-write premium on the first turn and assumes every later turn hits the cache. Treat 2.6 times as a floor for this task shape.

The dollar gap is small at low volume. At 1,000 runs a month the 6-turn agent costs about $70 more than the workflow. At 100,000 runs it is about $7,000 more, and at a million it is about $70,000. If you process a few hundred items a month, cost is not your argument for a workflow. Reliability, latency and audit are. The number of sequential model calls is a count, not an estimate: 2 for the workflow, 6 or more for the agent, and each one adds waiting time.

What this does not show. It does not show which design gets more tasks right. A workflow that misclassifies one email in ten is cheaper and worse. I have no success-rate data for this task, and I am not going to invent any. The next section covers why the structure still matters.

6. Reliability: why step count and checkpoints matter

The table in the output is plain arithmetic: if each of n steps succeeds independently with probability p, the whole chain succeeds with probability p to the power n. At p = 0.95 an 8-step chain succeeds 66.3% of the time. At p = 0.99 a 12-step chain succeeds 88.6% of the time. Real failures are not independent, because one bad retrieval poisons the next five steps, so treat the table as a way to see the shape, not as a forecast for your system.

Anthropic's own caution points the same way: "The autonomous nature of agents means higher costs, and the potential for compounding errors. We recommend extensive testing in sandboxed environments, along with the appropriate guardrails."

The structural point is the one I would keep. A workflow has a fixed number of steps and named boundaries between them, so you can put a schema check, a retry or a human review at each boundary and measure each step's own failure rate. An agent has a variable number of steps per run and the boundaries are whatever the model decides they are. You can still add checks, but you are adding them around a path you did not write. My post on evaluating an agent before deployment covers the release gate you need once you accept that.

7. Security, audit and compliance

Three questions matter more than any single regulation name. Can a reviewer reproduce why the system did what it did? Can a wrong action be undone? Does any single step combine untrusted input with write access? A workflow answers the first by construction: the same input takes the same path, and the model calls are recorded steps. An agent answers it only through its logs, and two runs on the same input can take different paths.

I did not research jurisdiction-specific AI regulation for this post, and I am not giving legal advice. If your task falls under sector rules, ask your counsel which of them require reproducibility or human review. If they do, that requirement alone often decides the question for you, before any cost math.

8. Operational complexity

After launch, a workflow costs you maintenance when an upstream API or a model version changes. An agent costs you that and also ongoing review: reading traces, tuning the tool descriptions, and re-running evals after each change, because a small wording change can alter which tools the model picks. Put a hard turn cap and a per-run spend cap in front of every agent. Without them, one confused run is your most expensive run.

9. Scale: where the answer flips

Three things move the recommendation as you grow. Volume: at a few hundred runs a month the cost gap is noise; at hundreds of thousands it is a line item, as the monthly table above shows, and a line item that large raises the separate question of whether to self-host the model or keep paying per token. Input variety: if your inputs start falling outside the shapes your workflow handles, the share of runs that end in "other" rises, and that residue is the legitimate place for an agent. Error cost: as an agent gains write access, the approval gate and the audit trail stop being optional.

10. Decision matrix and scorecard

I rated the four options on six dimensions. The reasons come first, so the table is not a bare list of opinions. Cost per run follows the model above: more model calls and a growing history mean more tokens. Reproducibility follows from whether the path is fixed in code. "Handles unseen inputs" is the one dimension where agents win outright, because a model can improvise where a rule cannot. Build effort counts the harness around the model (tool layer, caps, evals), which is why option C and D rate higher than B even though B has more rules to write. Every rating is my judgment (Recommendation), not a measurement.

DimensionA. DeterministicB. Workflow with model stepsC. Bounded agent in workflowD. Open agent
Cost per runLowestLowMedium to highHigh, and variable
Sequential model calls0Fixed, smallFixed outside the loop, variable insideVariable
Reproducible and auditableHighHighMediumLow
Handles unseen inputsLowMediumMedium to highHigh
Build and harness effortMedium (many rules)MediumHighHighest
Worst-case failureRule gap, visibleBad classification, caught by validatorsWasted loop, cappedWrong action taken, needs a sandbox

To make the matrix usable, I wrote it as five yes or no questions. This is the scorecard from the same script. It is a rule of thumb I wrote, not a validated instrument, and the four example tasks are generic illustrations, not client work.

  1. Could you write the steps before seeing the input?
  2. Do inputs fall into a few known shapes?
  3. Must a reviewer be able to reproduce why it acted?
  4. Would a wrong action cost money or trust you cannot undo?
  5. Is volume high enough that per-run cost shows up on a budget line?

Five yes answers point to option A. Three or four point to option B. Fewer than three point to an agent, bounded inside a workflow with human approval if the action is irreversible (question 4), and open in a sandbox otherwise. The same logic as a flow:

Can you write the steps before seeing the input?
  yes -> Is a rule enough for every step?
          yes -> A. deterministic workflow
          no  -> B. workflow, model only in the steps that need language
  no  -> Is the action irreversible?
          yes -> C. bounded agent inside a workflow, human approval before writes
          no  -> D. agent in a sandbox, with evals and a spend cap

One caution on the scorecard: it routes irreversible actions toward more structure, not less, on purpose. Reversibility is the factor I would weigh above cost.

11. Recommendation by scenario

12. Migration path

  1. Write the workflow version first, even if you expect to replace it. It becomes your baseline for cost, latency and accuracy.
  2. Build an eval set of real inputs with reviewed expected outputs before you add autonomy. Without it you cannot tell an improvement from a regression.
  3. Find the residue: the inputs the workflow gets wrong or sends to "other". Count them.
  4. Give an agent only that residue, with a turn cap, a spend cap, scoped credentials and read-only tools. Compare it with the baseline on the same eval set.
  5. Widen its permissions only when its measured error rate on the residue beats the cost of the review it would replace. Run the numbers with the ROI calculator, and use the AI readiness assessment to see which of your processes are stable enough for step one.

If you want a second opinion on a specific task, I do this kind of architecture review as part of my consulting work, and the AI agents page describes what I build.

13. What I did not measure

Frequently Asked Questions

When should I use an AI agent instead of a workflow?

Use an agent when you cannot write the steps down before seeing the input, and the cost of a wrong action is low or reversible. If the steps are known, a workflow with model calls in named steps is cheaper, easier to audit and easier to test. Anthropic's guidance is the same: add multi-step agentic systems only when simpler solutions fall short.

How much more does an AI agent cost than a workflow?

In my estimate for one email-triage task, a 6-turn tool-using agent cost $0.0777 per run against $0.0077 for a 2-call workflow, about 10 times more, at Anthropic's list prices on 12 November 2026. With prompt caching the agent was 2.6 to 3.9 times the workflow. These are modelled figures with stated assumptions, not a production bill.

Why does an agent cost grow faster than the number of turns?

A tool-calling loop re-sends the system prompt, tool definitions and all earlier turns on every call, so each turn carries more tokens than the one before. In my model, 4 turns cost 6.0 times the workflow and 15 turns cost 37.0 times.

Is a workflow with LLM steps an AI agent?

No. Anthropic defines workflows as systems where LLMs and tools are orchestrated through predefined code paths, and agents as systems where LLMs dynamically direct their own processes and tool usage. A fixed path in code with model calls inside it is a workflow, even if the vendor calls it an agent.

Can I put an agent inside a workflow?

Yes, and it is often the safest way to start. Give the agent one bounded step, such as a read-only investigation, with a turn cap, a spend cap and scoped credentials, and keep writes behind an approval node that the workflow runs every time.

Ready to Get Started?

Book a free 30-minute discovery call. We'll identify your biggest opportunities and show you exactly what AI automation can do for your business.

Book a Free Discovery Call

Suyash Raj
Suyash Raj Founder, Voxdonna AI and AiSewak. Writes here about n8n, AI agents, and voice automation.