+160 XP

Agents vs workflows vs automations: choosing the right level of autonomy

# Agents vs workflows vs automations: choosing the right level of autonomy

A support team spent three weeks building an "AI agent" to sort incoming emails. It called the model on every message, let it decide what to do, and cost them $400 a month. When they replaced it with a fixed pipeline (detect language, summarize, file by keyword), it ran in a fraction of the time, cost almost nothing, and stopped making bizarre filing mistakes.

The lesson: most tasks do not need an agent. The skill is knowing when they do.

The autonomy spectrum

Think of automation as a dial, not a switch. On the left, you decide every step. On the right, the AI decides. There are three useful stops along the way.

1. Automation (no AI decisions)

A fixed sequence of steps you wrote in advance. The computer follows them exactly. No model deciding anything.

Example: When a file lands in a folder, rename it with today's date and back it up. Tools like Zapier, Make, or a simple script do this. Zero AI.

2. Workflow (AI in fixed slots)

You still control the steps and their order. But at specific points, you call an AI model to do one job: summarize, classify, extract, rewrite. The model fills a slot. It does not choose what happens next.

Example: Email arrives → AI writes a one-line summary → AI classifies it as "billing," "sales," or "other" → your code files it in the matching folder. The model does two jobs. Your code decides the path.

This is where the support team should have started.

3. Agent (AI decides the steps)

An agent is a model that decides what to do next, in a loop, using tools (functions it can call, like "search the web" or "send an email"). You give it a goal, not a script. It picks actions, sees the results, and picks again until the goal is met.

Example: "Resolve this customer complaint." The agent reads the ticket, decides to look up the order, discovers a refund is needed, calls the refund tool, then drafts a reply. You did not tell it that order of steps. It chose them.

Why more autonomy costs more

Every stop to the right adds three costs.

Money. Agents call the model many times per task (once per decision). A workflow calls it a fixed, small number of times. In 2026, model calls are cheaper than they were, but an agent that loops 15 times still costs roughly 15x a single call.

Speed. Each decision is a round trip to the model. More decisions, more waiting. A fixed workflow with two calls is predictably fast.

Predictability. This is the big one. In a workflow, you know the exact path. In an agent, the path changes every run. That flexibility is the whole point, but it also means the agent can loop forever, call the wrong tool, or "solve" a problem in a way you never intended.

Anthropic's engineering team put it plainly in their widely shared guide: build the simplest thing that works, and add autonomy only when a simpler approach falls short. Worth reading: Building Effective Agents.

A decision rule you can actually use

Ask these questions in order. Stop at the first "yes" that fits.

1. Do the steps and their order never change? → Use a plain automation. No AI needed.

2. Are the steps fixed, but some steps need judgment (summarize, classify, extract)? → Use a workflow with AI in those slots.

3. Is the task different every time, so the steps cannot be known in advance? → Now consider an agent.

One more gate before you commit to an agent:

> Can you write down the steps for 80% of cases? If yes, build a workflow and handle the other 20% manually. If you genuinely cannot predict the steps, an agent earns its cost.

Side-by-Side Examples

| Task | Best choice | Why |

|---|---|---|

| Rename and back up files | Automation | Steps never change, no judgment |

| Summarize and file support emails | Workflow | Fixed order, AI just summarizes and classifies |

| Turn meeting notes into a formatted recap | Workflow | One AI step, one template |

| Research a company across many sources and write a brief | Agent | Steps depend on what it finds |

| Debug a failing script by trying fixes until it passes | Agent | Cannot predict which fix works |

| Book a trip given loose constraints | Agent | Requires exploring options and adapting |

Notice the pattern: agents shine when the path is unknown. If you can draw the flowchart, you do not need an agent.

What an agent loop actually looks like

The core idea is small. An agent is a loop: the model picks a tool, you run it, you feed the result back, repeat until done. Here is the shape of it, vendor-neutral:

python
# Vendor-neutral agent loop (pseudocode-ish)
tools = {
    "search_orders": search_orders,
    "issue_refund": issue_refund,
    "send_reply": send_reply,
}

messages = [{"role": "user", "content": "Resolve ticket #4821"}]

while True:
    # The model looks at the conversation and decides:
    # either call a tool, or give a final answer.
    response = model.generate(messages, available_tools=tools.keys())

    if response.tool_call:
        name = response.tool_call.name
        args = response.tool_call.args
        result = tools[name](**args)          # you run the real function
        messages.append(response)             # record what the model wanted
        messages.append({"role": "tool",      # feed the result back
                         "content": result})
    else:
        print(response.text)                  # final answer, we're done
        break

That while True loop is exactly why agents are less predictable. The model, not your code, chooses search_orders versus issue_refund on each pass. This same shape works across the OpenAI Agents SDK, the Claude Agent SDK, and Google's ADK. The provider deep-dive blocks cover each one's specifics. Here we care about the idea.

Two guardrails you should always add to a real loop:

  • A step limit (for example, stop after 10 tool calls) so it cannot loop forever.
  • Approval gates on risky tools (issuing refunds, sending emails, deleting data) so a human confirms before it acts.

Knowledge check

1. What is the defining characteristic that distinguishes an agent from a workflow?

2. In the support team's email example, why was replacing the agent with a fixed pipeline the better choice?

3. Which scenario is the strongest candidate for a true agent rather than a workflow?

MULTIPLE CHOICE

4. Select ALL correct answers about what defines an 'agent' as described in the lesson.

Select all the correct answers.

MULTIPLE CHOICE

5. Select ALL correct answers about the autonomy spectrum and choosing the right level.

Select all the correct answers.

Common Mistakes

Reaching for an agent first. It feels modern and impressive. It is usually the wrong starting point. Start at the left of the dial and move right only when forced.

Calling a workflow an "agent." Marketing blurs these words. If your steps are fixed and the model just fills slots, that is a workflow, and that is good. You do not lose points for not using an agent.

Giving an agent too many tools. A model choosing among 30 tools makes more mistakes than one choosing among 4. Keep the toolset small and the goal narrow.

No off-switch. An agent without a step limit or budget cap can rack up cost and take strange actions. Always cap it.

A worked decision

Say you want to process incoming invoices.

  • Extract the vendor, amount, and due date. Predictable, needs judgment → workflow step (AI extraction).
  • Flag invoices over $10,000 for review. Fixed rule → automation, no AI.
  • File in the right project folder. If folders map cleanly to a field, automation. If it needs to read the invoice and reason about which project, a small workflow classify step.
  • Chase a vendor about a disputed charge over email, back and forth, until resolved. Unpredictable, multi-turn, adaptive → this is the one part that might justify an agent.

The whole thing is 90% workflow and automation, with an agent only at the messy edge. That is a healthy design.

Key Takeaways

  • Start simple, move right only when forced. Automation → workflow → agent. Each step right adds cost, latency, and unpredictability.
  • Use the flowchart test. If you can draw the steps in advance, build a workflow, not an agent. Agents are for tasks where the path is genuinely unknown.
  • A workflow with AI in fixed slots is not a lesser choice. For summarizing, classifying, and extracting, it is cheaper, faster, and more reliable than an agent.
  • When you do build an agent, cap it. Add a step limit, a budget limit, and human approval on risky tools before it can act.
  • Keep the toolset small. Fewer tools and a narrow goal mean fewer wrong turns.

Related articles

Recent articles from the blog that build on this lesson.