Skip to content
Ylabator
GuideBeginner

AI Agent vs. Chatbot vs. Workflow

A chatbot answers, a workflow follows steps your code sets, and an agent picks its own steps. Most products need a workflow, and an agent only where the steps cannot be known in advance.

4 min read / Updated / Last checked

Format
Guide · Beginner
Who it is for
Non-technical founders
You leave with
Know when autonomous tool use is needed, and describe a feature as chatbot, workflow or agent before anyone builds it.

The problem

In June 2024, the team behind τ-bench, a benchmark that tests AI agents in realistic customer-service conversations with tools and company policies, reported a sobering result. State-of-the-art function-calling agents such as gpt-4o completed fewer than 50% of the tasks. They were also inconsistent: in the retail domain, the chance of succeeding on all eight attempts at the same task was under 25% [5].

Those figures describe 2024 models, but the lesson about shape still holds. Every step an AI system decides for itself is a step that can go differently next time. Yet "agent" is now used for almost anything with a model inside: a help widget, a scheduled report, a form that drafts an email. OpenAI's own guide draws a line: applications that use a model but do not let it control how the work proceeds, such as simple chatbots, single-turn model calls or sentiment classifiers, are not agents [2].

For a founder the label matters because it sets cost, testing effort and risk. Calling a workflow an agent invites unbounded loops and surprise bills. Calling an agent a chatbot skips the permission design it needs. The first decision on any AI feature is which of the three it is.

How it works

A chatbot answers in conversation. The model reads the user's message, maybe some retrieved documents, and writes a reply. It takes no actions in other systems. Its risks are wrong answers and leaked information, not wrong actions.

A workflow is a process whose steps are fixed in code, with model calls inside some steps. Anthropic defines workflows as systems where models and tools are orchestrated "through predefined code paths" [1]. Extract the order number with a model, look it up in the database, apply the refund rule in code, draft the reply with a model. The model never decides what happens next. Workflows are predictable, cheap to test, and the right default for most business processes.

An agent is a system where the model directs its own process and tool use [1]. It runs in a loop: read the situation, choose a tool, read the result, choose again, stop when done. Anthropic recommends agents for open-ended problems where the number of steps is hard or impossible to predict, and warns that autonomy brings higher costs and compounding errors [1]. OpenAI lists three signs an agent is warranted: complex judgment calls with many exceptions, rule sets that have become too hard to maintain, and heavy reliance on unstructured data such as documents and conversation [2]. Its advice for everything else is that a deterministic solution may suffice [2].

Microsoft's architecture guidance frames the same choice as a ladder: a direct model call, then a single agent with tools, then several agents. It calls one agent with tools "often the right default" when an agent is needed, and tells builders to set iteration limits against endless tool loops [3].

Climb only as far as the task requires

Fig. 01
  1. Plain coderules, no model
  2. One model callclassify, extract, draft
  3. Workflowcode fixes the steps
  4. Agentmodel picks the steps
Each step up adds flexibility, cost and testing effort; most features stop at the workflow step.

By the numbers

of τ-bench tasks completed by state-of-the-art function-calling agents in June 2024 [5]
<50%
chance in τ-bench retail of an agent succeeding on all eight tries of one task [5]
<25%
more tokens used by an agent than by a chat interaction, in Anthropic's data [4]
About 4x
signs in OpenAI's guide that a task needs an agent rather than fixed rules [2]
3
ChatbotWorkflowAgent
Who decides the next stepNobody: one reply per messageYour code [1]The model, inside limits you set [1]
Takes actions in other systemsNoYes, at fixed pointsYes, chosen at run time
FitsQuestions, explanations, draftingKnown processes with a few judgment pointsOpen-ended tasks with unpredictable steps [1]
An agent by OpenAI's definition?No: the model does not run the process [2]No: code runs the process [2]Yes: the model manages execution and picks tools [2]
Main controlAnswer review, data accessTests per stepTool permissions, step limits, approvals [3]
Chatbot, workflow and agent compared, from the vendors' own guidance [1][2][3]

The τ-bench numbers measure agents on multi-turn tasks with tools and policies, the hardest setting [5]. The point for a product is the second figure. An agent that succeeds most of the time can still fail the same customer's request on a retry, which is why its permissions and limits matter more than its average score.

The cost figure comes from Anthropic's own production research system [4]. It is a rough multiplier, but it explains why the same feature can cost several times more as an agent than as a workflow.

Implementation

Classify every AI feature on one page before it is estimated. The worksheet below takes ten minutes per feature and gives a developer or agency a clear brief.

automation-shape.mdmarkdown
# Feature: ____________________

1. What triggers it? (user message / event / schedule)
2. What must be true when it finishes? (one sentence, checkable)
3. Can the steps be listed in advance?  yes -> workflow   no -> agent
4. Which steps need language? (read text, classify, draft)
5. Which systems does it read? Which does it change?
6. Actions that move money, delete data or message customers:
   ____________________  -> each needs human approval
7. Limits: max steps ___  max cost per run ___  timeout ___
8. When it cannot finish, who gets it? ____________________

Shape chosen: chatbot / workflow / agent
Reason: ____________________

The same refund request, built both ways, shows the difference in code. In the workflow, the refund policy is an if statement. In the agent, the model picks tools in a loop, and code sets the tools and the step limit.

shapes.pypython
"""The same refund request handled as a workflow and as an agent. `llm` is any model call."""

def refund_workflow(ticket, llm, orders):
    """Workflow: code fixes the steps. The model only reads and writes text."""
    order_id = llm(f"Extract the order id from this ticket, or NONE:\n{ticket}")
    order = orders.get(order_id)
    if order is None:
        return "ask_customer_for_order_id"
    if order["days_since_delivery"] > 30 or order["amount"] > 200:
        return "send_to_human"                      # the policy lives in code
    return llm(f"Draft a short refund confirmation for order {order_id}.")


def refund_agent(ticket, llm_with_tools, tools, max_steps=8):
    """Agent: the model picks the next tool each turn. Code sets the tools and the limits."""
    history = [("user", ticket)]
    for _ in range(max_steps):
        action = llm_with_tools(history, list(tools))  # e.g. {"tool": "lookup_order", "args": {...}}
        if action["tool"] == "finish":
            return action["args"]["reply"]
        result = tools[action["tool"]](**action["args"])  # each tool checks permissions itself
        history.append(("tool", result))
    return "send_to_human"                          # out of steps: stop and escalate


if __name__ == "__main__":
    orders = {"A-100": {"days_since_delivery": 12, "amount": 40}}
    fake_llm = lambda prompt: "A-100" if "Extract" in prompt else "Refund approved for A-100."
    print(refund_workflow("Order A-100 arrived broken", fake_llm, orders))

For refunds with a clear policy, the workflow is the better build: every path can be tested, and the policy cannot be talked out of. The agent version earns its place only when tickets vary so much that no fixed sequence covers them, and even then the refund itself stays behind a tool that enforces the limits.

Test it

Review each feature's worksheet before development starts. Expected results:

  • Question 3 has a concrete answer. If the steps can be listed, the build is a workflow, and a proposal for an agent should explain why it is not.
  • Every action in question 6 has a named approver, matching OpenAI's advice to require human oversight for high-risk actions such as canceling orders, large refunds or payments [2].
  • Question 7 has numbers. An agent with no step limit or cost cap is not ready to build [3].
  • For an agent, run the same 20 tasks three times each. Expected: the same outcome on all three runs for at least the tasks involving money or customer messages. Inconsistency there is a reason to move those steps into a workflow.

Decision

Default to the lowest rung that does the job.

  • Chatbot for answering and drafting with no actions. Cheapest to run and review.
  • Workflow for any process you can write down, including ones with model calls for reading and writing. This covers most early products.
  • Agent only for open-ended tasks with unpredictable steps, with step limits, cost caps, scoped tools and approval on irreversible actions [1][2].
  • Re-classify after launch: if logs show the agent follows the same path almost every time, turn that path into a workflow. If a single agent is not enough, see Do You Actually Need Multiple AI Agents? before adding more.

Sources

  1. [1]Building effective agents (opens in a new tab)Anthropic, December 2024
  2. [2]A practical guide to building agents (opens in a new tab)OpenAI, April 2025
  3. [3]AI agent orchestration patterns (opens in a new tab)Microsoft Azure Architecture Center, February 2026
  4. [4]How we built our multi-agent research system (opens in a new tab)Anthropic, June 2025
  5. [5]τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains (opens in a new tab)Yao et al., arXiv, June 2024

Technical guidance, not legal or security certification.

Need a technical review of an AI-built MVP?

Discuss your build