When to use AI agents (and when not to)

Buyer's GuideApr 28, 2026 · 10 min read

Use AI agents when a task has multiple steps where each step's output affects the next, data is unstructured, and exceptions exceed 20% of cases. Don't use them for simple rule-based workflows, single-step API calls, or unmapped processes. RaftLabs has built 40+ agentic systems and found the clearest signal is when current automation breaks on the 20-30% of edge cases that don't fit the script.

Key Takeaways

  • The defining trait of an AI agent is autonomy across multiple steps: it plans, acts, checks the result, and decides what to do next, without a human in the loop for each step.
  • AI agents are the wrong tool when the workflow is fully rule-based and the data is structured. RPA or a simple integration is cheaper, faster, and more reliable for those cases.
  • The clearest signal you need an agent: your current automation breaks on 20-30% of cases that don't fit the script. That 20-30% is where agents earn their cost.
  • Before building an agent, map the workflow end-to-end. If you can't describe every decision point and exception, neither can the agent. You'll spend the budget debugging edge cases instead.

AI agents are getting a lot of attention. They're also getting applied to problems they're not suited for, producing expensive projects that underdeliver.

This is a decision framework, not a sales pitch for agents. The goal is to tell you when an agent is the right tool, when it isn't, and what to use instead.

Key Takeaways

  • An AI agent's defining trait is autonomy across multiple steps: plan, act, check the result, decide what to do next. No human confirmation at each step.

  • Agents are the wrong tool for rule-based, structured-data workflows. Use RPA or a direct integration instead. They're cheaper and more reliable for those cases.

  • The clearest signal you need an agent: your current automation breaks on 20-30% of cases. That exception bucket is where agents earn their cost.

  • Map the workflow before starting the build. If you can't describe every decision point, neither can the agent.


What an AI agent actually is

McKinsey's 2025 State of AI report found 78% of respondents used AI in at least one business function, up from 55% in 2023. Agentic AI is the next wave, but it's being applied indiscriminately. The distinction between an agent and a simpler AI system matters a lot for project cost and success rate.

An AI agent is a system that can use tools, make decisions across multiple steps, and act in the world, without a human confirming each action.

The key capabilities that distinguish an agent from a simpler system:

  • Tool use: it can call APIs, query databases, run code, search the web, read documents

  • Multi-step planning: it can break a goal into sub-tasks and execute them in sequence

  • Self-correction: if a step fails or returns an unexpected result, it can try a different approach

  • State management: it remembers what it's already done within a task and uses that context

A chatbot responds to one message with one response. An AI agent can receive a goal ("research this lead company and draft a personalized outreach email") and execute 8–12 actions to achieve it without further input.

That autonomy is powerful. It's also expensive to build correctly. The question is whether your problem actually needs it.


The five signals that mean you need an agent

1. The workflow has multiple steps where each step's output feeds the next

If step 3 can't proceed until step 2 is done, and step 2's result determines what step 3 does, you have a workflow with conditional logic across steps. Rule-based automation handles this when the conditions are finite and predictable. An agent handles it when the conditions are variable and context-dependent.

Example: processing an insurance claim. Step 1 extracts claim details from the form. Step 2 looks up the policy. Step 3 checks whether the claim type is covered. Step 4 either approves, routes to adjuster, or requests more information. Which path it takes depends on the combination of results from steps 1-3. This is agent territory.

2. The data is unstructured or varies in format

Structured data (consistent fields, predictable formats, fixed schemas) is what RPA and traditional integrations are built for. Unstructured or semi-structured data (emails, PDFs, contracts, voice calls, variable invoice formats) is where rigid automation breaks.

An agent can read an email, understand the intent, extract the relevant information even if it's phrased differently each time, and decide what to do with it. A rule-based system needs a template that the email must match.

"Unstructured" doesn't mean chaotic. Most business documents have predictable intent even when format varies. An agent recognizes "this is a purchase order" even when it comes from 40 different suppliers in 40 different layouts. The agent doesn't need a template for each supplier. It understands what a PO is. RaftLabs has built document-processing agents that handle 35+ distinct supplier formats with a single prompt rather than 35 separate rules.

3. Exceptions represent more than 20% of cases

Every automation project has exceptions: cases that don't fit the standard flow. The question is what percentage. If 95% of invoices are standard and 5% are edge cases, RPA handles the 95% and routes the 5% to humans. That's usually the right architecture.

When exceptions are 20-30% or more, routing them all to humans creates a bottleneck that defeats the purpose of automation. This is when an agent layer makes sense, not to replace the rule-based system, but to handle the exception bucket that the rule-based system can't.

4. The workflow requires judgment at decision points

Some decisions require context that can't be captured in a rule. "Is this customer complaint likely to churn the account?" requires reading tone, history, account size, and recent interactions. "Should this legal clause be flagged for review?" requires understanding the contract context and applicable jurisdiction.

Agents can exercise this kind of contextual judgment, imperfectly, but at a level that filters out clear cases and escalates ambiguous ones to humans. The right pattern is not "agent makes all decisions" but "agent handles clear cases, escalates uncertain ones."

5. The task spans multiple systems and requires orchestration

A workflow that touches CRM, ERP, email, and a customer portal, pulling data from each and writing to each in sequence, is a coordination problem as much as an automation problem. Agents handle this orchestration well because they can manage the failures and retries that complex multi-system workflows inevitably encounter.


When not to use AI agents

Gartner predicts over 40% of agentic AI projects will be canceled by end of 2027 due to escalating costs, unclear business value, or inadequate risk controls. Most of those cancellations will happen because teams chose agents for problems that didn't need them.

"Agents are most valuable when you have a workflow that's too complex for rules but too repetitive for humans. That's a specific sweet spot. Outside it, you're adding cost and latency for no gain." - Andrew Ng, founder of DeepLearning.AI and AI Fund, speaking at The Batch newsletter

When the workflow is fully rule-based and the data is structured

If you can write out the complete decision tree on a whiteboard and every input is predictable, you don't need an agent. RPA (robotic process automation) is faster to build, more reliable, and cheaper to maintain for these cases. Introducing an agent adds latency, cost, and unpredictability to a process that doesn't need any of those.

When you need 100% accuracy on critical decisions without human review

AI agents make mistakes. The rate depends on the task and the model, but it's never zero. If your workflow cannot tolerate a wrong output (drug dosage calculations, financial transaction instructions, legal document filings), the agent should not be the final decision maker. Use it for triage and draft generation; require human sign-off before the decision executes.

When you need a response in under 200–300 milliseconds

Real-time operations (live fraud detection on payment processing, synchronous API responses, embedded UX where the user is waiting) require latency budgets that multi-step agent reasoning can't meet. A direct model call can work here; a multi-step agent loop cannot.

When the workflow isn't documented yet

This is the most common reason agent projects stall. A company sees an agent demo, approves a budget, and starts building without a clear specification of what the agent should do. Agents can handle ambiguity within a workflow. They can't define the workflow for you. If you can't map every step, decision point, and exception path before the build starts, the project will spend its budget on discovery instead of delivery.

RaftLabs has declined agent projects where the brief was "make our [process] smarter." That's not a brief. It's a hope. The projects that deliver are the ones where the client can say: "here are the 8 steps the agent needs to perform, here are the 4 decision points where it needs to choose, and here are the 12 exception cases it needs to handle." That level of specificity is what makes an agent buildable.


The decision map

Use this to categorize your use case before choosing an approach:

SituationRight tool
Structured data, fixed rules, stable interfaceRPA or traditional integration
Unstructured data, variable formats, judgment neededAI agent
Single-step API call or lookupDirect integration (no AI needed)
Multi-step research and synthesisAI agent
100% accuracy required, no human reviewHuman process (AI as draft only)
Exception handling in an otherwise rule-based flowAI agent exception layer
Real-time response under 300msDirect model call or rule-based system
Process not yet documentedDocument first, build second
Multi-system orchestration with conditional logicAI agent
Simple chatbot or FAQ answersRAG-based chatbot (not a full agent)

What good agent scoping looks like

Before approving a budget for an AI agent, you should be able to answer these five questions:

  1. What triggers the agent? A user request, an incoming email, a scheduled time, a webhook from another system. The trigger must be defined.
  2. What tools does it need? List every system it needs to read from or write to. Each one is a potential integration and a potential failure point.
  3. What does success look like? Define the output: the email drafted, the record updated, the ticket closed, the approval sent. Vague success criteria produce vague agents.
  4. What are the exception cases? List the top 10 ways the workflow could go wrong and how the agent should respond to each.
  5. What requires human escalation? Identify the cases where the agent should stop, flag the issue, and wait for a human rather than making a judgment call.

If you can answer all five, you're ready to scope an agent build. If you can't, invest in workflow documentation first.

For detailed guidance on agent architecture, see our multi-agent systems guide. For AI agent development services, see our AI agent development page.


Frequently asked questions

What is an AI agent and how is it different from a chatbot?

A chatbot responds to a single message with a single response. It doesn't take action, use tools, or plan across multiple steps. An AI agent can use tools (search, APIs, databases), make multi-step plans, check results, and decide what to do next autonomously. The key difference is whether it acts or just talks.

When should I use an AI agent instead of RPA?

Use an AI agent when data is unstructured, exceptions are frequent (more than 20% of cases), interfaces change often, or the workflow requires judgment. Use RPA when data is structured, the process is fully rule-based, interfaces are stable, and exceptions are rare. Most mature automation programs use both.

What tasks are AI agents actually good at?

Agents excel at multi-step research and synthesis, document processing with variable formats, exception handling in larger automation flows, customer support resolution (account lookups, order status, refunds), and multi-system orchestration. They're poor at tasks requiring 100% accuracy without human review, real-time responses under 200ms, or fully deterministic outputs.

How do I know if my workflow is ready for an AI agent?

A workflow is ready when you can describe every step, decision point, and exception path, and the exceptions are genuinely the problem. If you can't map the workflow yourself, the agent can't navigate it. Document the current workflow, identify where it breaks or requires human judgment, and scope the agent around those specific breakpoints.

What's the biggest mistake companies make when building AI agents?

Building the agent before mapping the workflow. Companies see agent demos and expect the AI to figure out the process itself. It won't. An agent can navigate ambiguity within a defined workflow, but it can't define the workflow for you. Projects that stall at 60% are almost always ones where the process wasn't documented before the build started.

Frequently asked questions

A chatbot responds to a single message with a single response. It doesn't take action, use tools, or plan across multiple steps. An AI agent can use tools (search, APIs, databases, code execution), make multi-step plans, check results, and decide what to do next autonomously. The key difference is whether it acts or just talks.
Use an AI agent when data is unstructured (emails, PDFs, variable-format documents), exceptions are frequent (more than 20% of cases fall outside the script), interfaces change often, or the workflow requires judgment calls. Use RPA when data is structured, the process is fully rule-based, interfaces are stable, and exceptions are rare. Most mature automation programs use both: RPA for the predictable backbone, AI agents for exception handling.
AI agents excel at multi-step research and synthesis, document processing with variable formats, exception handling in larger automation flows, customer support resolution (account lookups, order status, refunds), and multi-system orchestration (CRM, ERP, email in sequence). They're poor at tasks requiring 100% accuracy, real-time responses under 200ms, or fully deterministic outputs.
A workflow is ready for an agent when you can describe every step, every decision point, and every exception path, and the exceptions are genuinely the problem. If you can't map the workflow yourself, the agent can't navigate it. Document the current workflow, identify where it breaks or requires human judgment, and scope the agent around those specific breakpoints.
Building the agent before mapping the workflow. Companies see agent demos and imagine the AI will figure out the workflow itself. It won't. An agent can navigate ambiguity within a defined workflow, but it can't define the workflow for you. Projects that stall at 60% completion are almost always ones where the process wasn't documented before the build started.

Ask an AI

Get an instant summary of this post from your preferred AI assistant.