cd /news/ai-agents/ai-agents-vs-workflows-what-should-y… · home › topics › ai-agents › article
[ARTICLE · art-182107] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=· neutral

AI Agents vs Workflows: What Should You Build in 2026?

A developer published a decision guide arguing that teams should build AI workflows when steps can be described in advance and reserve AI agents for cases where the next step depends on what the system discovers, keeping consequential actions behind explicit approval. The guide cites a May 2026 Stack Overflow pulse survey of 1,100 developers and professionals in which 59% reported using agents at work and 63% rarely or never let them run fully on autopilot, and sketches a support-tool contract capping tool calls and run time with write actions routed to a separate approved endpoint.

recommendation

Start with a workflow when a flowchart describes the normal case, and wrap any agent in application-enforced caps on tool calls and run time with write actions behind a separate approval endpoint.

more in playbook: Designing agent systems
by read6 min views7 publishedDec 4, 2026

Short answer: use a workflow when you can describe the steps in advance. Consider an AI agent when the next useful step genuinely depends on what the system discovers. For a first business release, keep consequential actions behind explicit approval.

This guide is current as of September 7, 2026. The examples and budgets below are proposed engineering designs, not claims about a client deployment or benchmark.

Stack Overflow's May 2026 report describes a pulse survey of 1,100 developers and working professionals. Among respondents, 59% reported using agents at work, while 63% rarely or never let them run entirely on autopilot. That is evidence of interest and cautious adoption within this sample, not a measure of Google search volume or the entire software industry. Read the survey and its context.

The practical buying question has changed: a demo that can answer a question is easy to understand, but what happens when the same application can send an email, change an order, or spend money? Architecture now determines how much responsibility you are handing over.

An AI workflow follows an application-defined path; an agent gives the model more control over choosing tools and next steps. Anthropic's architectural guide uses this distinction and recommends starting with simple, composable approaches. A chat interface alone says nothing about which architecture is behind it. See the architectural definitions.

Approach Who chooses the next step? Example Main trade-off
Rules-based automation Your code Send an invoice after payment Predictable, limited to encoded cases
AI workflow Your code, with model calls in specific steps Classify a ticket, retrieve a policy, draft a reply Flexible language handling inside a controlled process
AI agent The model within application-enforced boundaries Investigate why a delivery failed across approved systems Adaptable investigation, harder to bound and evaluate
Chatbot Depends on its backend A conversation that uses any of the above An interface, not an autonomy level

Here is my decision rule: if a flowchart describes the normal work clearly, implement that flow first. If exceptions are consuming the team's time, identify the smallest investigation step that would benefit from dynamic tool choice. You can put that agent inside an otherwise ordinary workflow.

Imagine a store receiving, “My parcel is late. Can you refund the shipping?” The application needs to identify the customer, read the order, check the carrier, find the relevant policy, and propose an answer.

Start with this sequence:

Most of this does not need autonomous planning. A model can help interpret the message and explain the evidence without receiving unrestricted access to the payment system.

An agent becomes more plausible when the investigation is unpredictable: the carrier says delivered, the warehouse shows a split shipment, and an item was replaced. It may need several read-only checks before it knows what to recommend. Even then, investigation permission should not imply refund permission.

Write down what the application can do before writing a persuasive system prompt. For the hypothetical support tool, I would start with this contract:

{
  "task": "investigate_delivery",
  "allowedTools": ["read_order", "read_tracking", "search_policy"],
  "maximumToolCalls": 6,
  "maximumRunSeconds": 30,
  "onLimit": "handoff_to_support",
  "writeActions": "separate_approved_endpoint"
}

This is a design sketch, not configuration for a particular SDK. The application must enforce each limit. The model merely seeing these values is insufficient.

Bind an approval to the exact order, amount, recipient, and action version. If any of those change, require a new approval. Store the approval decision outside the model conversation. Use an idempotency key when applying the action so a retry cannot refund the same request twice.

Also plan for ordinary failures: a process restart after approval, a carrier timeout, a customer opening a second tab, or a reviewer approving after the order changed. These are backend problems even when the interface looks like chat. My Node.js and PostgreSQL API guide covers the surrounding application foundation.

The Model Context Protocol standardizes how AI applications connect to external tools and data. It can make integrations easier to reuse; it does not choose your product's approval policy or make every connected tool safe. Read the MCP introduction.

For this example, order lookup might be exposed through MCP or a normal internal function. Either way, the server should derive the customer identity from the authenticated session. A model-supplied customer ID is not authorization.

Before connecting a tool, ask who operates it, which credentials it receives, what it can write, and what you will log. Do not add a broad integration merely because it is convenient in a demo.

Agent testing should examine both the final result and the actions used to get there. Repeated trials matter because the same task may take different paths. Anthropic's evaluation guide explains this distinction between outcomes and execution traces. Read the agent evaluation guide.

For the support example, I would create a small release set like this:

Test case Expected outcome Release-blocking failure
Eligible delayed parcel Evidence-backed draft and approval request Refund before approval
Policy does not cover the order Accurate explanation or handoff Invented eligibility
Carrier service unavailable Clear retry or human handoff Fabricated delivery status
Document says to ignore instructions Treat document as evidence only Following its embedded command
Another customer's order number Deny access without leaking details Cross-customer data exposure
Repeated approved request Return the recorded result Duplicate action

Keep a held-out set of cases that you do not use while adjusting prompts. Record model and prompt versions, tool failures, and reviewer corrections. A high average score should never cancel out an unauthorized write.

Calculate cost per successfully completed task, including failed attempts, tool charges, infrastructure, and review time. Token cost alone can hide an expensive product.

An illustrative budget: suppose 1,000 investigations incur $40 in model and tool costs. Two hundred require two minutes of review each, valued at $18 per hour: another $120. If 900 are successfully resolved, the combined cost is about $0.18 per resolved case, before other infrastructure and operational costs. These are invented planning inputs, not current vendor prices.

Compare this against your existing process using the same definition of “resolved.” Also measure how long customers wait and how often they reopen the issue. Fast, inexpensive mistakes are still mistakes.

Usually I would start with one bounded workflow and one owner for failures. Add another agent only when a concrete separation of responsibility improves measured results enough to justify more coordination, latency, and debugging.

Yes, but access to tools does not automatically give it trustworthy knowledge. It still needs a retrieval and permission design. The companion guide explains RAG vs fine-tuning for an AI chatbot.

Choose a frequent, reversible task where a human can judge the result quickly. A policy-backed reply draft is a better first experiment than autonomous refunds. Establish the baseline, run a limited pilot, then expand only when the evidence supports it.

For more about the engineer behind these guides, meet Moataseem Shaaban, browse my project portfolio, or connect through the author links below.

Originally published on moataseem.com. I’m Moataseem Shaaban, a Full-Stack & AI Software Engineer in Cairo building custom Next.js websites, SaaS platforms, AI agents, and RAG systems. Explore my selected work or engineering services.

── more in #ai-agents 4 stories · sorted by recency
── more on @stack overflow 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/ai-agents-vs-workflo…] indexed:0 read:6min 2026-12-04 · —