An AI agent for business is software in which a language model decides the next step of a task and calls your systems, such as the CRM, help desk or order database, to finish it. Agents pay off where each case takes a different path; where the steps are known, an ordinary workflow is cheaper and safer.

This guide is for the owner, operations lead or CTO deciding where an agent belongs: which tasks suit one, how it connects to your systems with limited access, what goes wrong, what it costs to run, whether to buy or build, how to test it and how to start. Product names, prices and rules are as published in October 2026.

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

In its December 2024 guide to building effective agents, Anthropic draws the line that matters for a business. Workflows are "systems where LLMs and tools are orchestrated through predefined code paths", while agents are "systems where LLMs dynamically direct their own processes and tool usage". OpenAI's guide adds that applications which use a model but do not let it control the workflow, such as simple chatbots, single-turn model calls or sentiment classifiers, are not agents.

Chatbot or assistantWorkflow with a model stepAgent
Who decides the next stepThe user, one question at a timeYour code, in a fixed orderThe model, case by case
Can it change data elsewhereUsually notYes, at steps you wroteYes, through any tool it holds
How you test itAnswers against known questionsEach step on its ownWhole cases, end to end, including attacks
Running costOne call per answerOne call per model stepMany calls per case, varying

Anthropic's advice is to find "the simplest solution possible", because agentic systems "often trade latency and cost for better task performance", and for many applications a single model call with retrieval and examples is usually enough. An agent is the last step up that ladder, not the first.

Two lanes. The top lane is a straight row of fixed boxes. In the bottom lane a gear sits in an orange loop, with dashed arrows coming in from a database, a ticket stack and an envelope.
Fig. 1 A workflow runs the steps you wrote; an agent loops, choosing a tool each time, until it decides the task is done.

Which business tasks are worth giving to an agent?

OpenAI's guide names three signs that a task resists ordinary automation: judgment calls full of exceptions (refund approval in customer service), rule sets that have grown so large that updates are costly or error-prone (vendor security reviews), and heavy reliance on unstructured text (processing a home insurance claim). If a task shows none of them, "a deterministic solution may suffice".

Anthropic describes two domains where its customers found particular value in agents, customer support and coding, and says agents add most value for tasks that need both conversation and action, have clear success criteria, allow feedback loops and keep meaningful human oversight. Gartner's analyst put the same split in one sentence: use "AI agents when decisions are needed, automation for routine workflows and assistants for simple retrieval".

The table is a starting point, with illustrative tasks; every business draws the lines differently.

TaskWhat the agent doesTools it needs (class)What a person still approves
Support tickets about ordersReads the ticket, checks the order and shipping, drafts the reply or a refundOrder lookup (read), reply draft (draft), refund (change)Refunds above a limit; any reply on a complaint
IT help desk triageAsks follow-up questions, checks device and account status, routes or resolvesDirectory and device lookups (read), ticket update (draft)Password resets and access changes
Account research before a sales callGathers the account's history, open tickets and public news into a briefCRM and ticket lookups (read), web search (read)Nothing is written, so nothing to approve
Accounts payable exceptionsExplains why an invoice failed matching and proposes the fixInvoice and PO lookups (read), note on the invoice (draft)Any change to amounts, vendors or payment dates
Code fixesReproduces an issue, edits files and runs the testsRepository and test runner, in a sandboxEvery merge

Tip

If you can draw the flowchart, build the workflow. Keep the agent for the part of the job where the next step genuinely depends on what the last one found.

How does an agent connect to your systems without too much access?

An agent has three parts in OpenAI's description: a model, tools ("external functions or APIs the agent can use to take action") and instructions. Tools come in three kinds: data tools that read, action tools that write or send, and other agents used as tools. The guide recommends rating each tool low, medium or high risk by read-only or write access, reversibility, required permissions and financial impact, and pausing or escalating to a person before high-risk calls.

A practical way to apply that is to class every tool as read, draft or change, and to put the classes in a file the agent cannot edit:

# tools.yaml for a support agent (illustrative)
agent: support-triage
model: claude-sonnet-5-5 # pinned; a change reruns the evaluation set
max_steps: 8
tools:
  - name: orders.get_status
    class: read
    scope: orders:read
  - name: crm.get_customer
    class: read
    scope: customers:read
  - name: helpdesk.draft_reply
    class: draft # goes to a review queue; nothing is sent
    scope: tickets:draft
  - name: payments.issue_refund
    class: change
    scope: payments:refund
    approval: named_person
    limits: { max_amount: 200, max_per_day: 20 }
# not offered at all: sending external email, fetching arbitrary URLs, running shell commands

The code that runs tool calls, not the model, enforces the file. The agent can ask for anything; the gateway decides:

def run_tool_call(call, policy, approvals):
    tool = policy.tools.get(call.name)
    if tool is None:
        return refuse(call, "not on the allow-list")
    if tool.cls == "change" and not approvals.is_granted(call.id):
        return queue_for_approval(call)  # the agent waits; nothing is written
    return execute(call, token=scoped_token_for(call.user, tool.scope))

OWASP's Excessive Agency entry (LLM06:2025) lists the same controls: minimize the tools offered, the functions inside each tool and their permissions; avoid open-ended tools such as "run a shell command" or "fetch a URL"; execute actions in the user's own context, for example through OAuth with the minimum scope; and require a person to approve high-impact actions.

The public assistants we build and run for Minute Notary, an online notary platform with its head office in Ottawa, and Good Cleaner Co., a local cleaning company serving Ottawa homes and businesses, sit at the read-only end of that scale. Their tools return prices, availability and booking checklists from the same code the booking flow runs, so the model fetches an answer instead of composing one, and no tool can book, cancel, reschedule or refund. When a visitor asks to cancel a booking or to talk to a person, a plain pattern check raises an alert for staff rather than leaving the request to the model.

Via Ottawa, a guide to local businesses across Ottawa that we also build and run, lets a business owner fill in a listing by chatting instead of working through the form. There the model is a parser with no authority. Each turn returns a change to the form the owner already has open, limited to a fixed list of fields and checked by the form's own validation; phone numbers, emails, web addresses and postal codes are read by code before the model sees the message; and the listing itself changes only when the owner presses Save or Publish. If the model or its budget is unavailable, the owner lands on the ordinary form with every answer already filled in.

An agent box sends calls down three lanes: a magnifier lane to a database, a pencil lane to a tray of draft cards, and a gear lane stopped at a closed orange gate before a payment terminal.
Fig. 2 Reading and drafting flow freely; only the lane that changes data meets a gate.

The Model Context Protocol (MCP) is an open protocol for exposing tools and data to agents. It uses JSON-RPC 2.0 between hosts (the AI applications), clients inside them and servers that provide tools and data. The specification says tools "represent arbitrary code execution", that tool descriptions should be treated as untrusted unless they come from a trusted server, and that hosts must get the user's explicit consent before invoking any tool. Its security best practices name "token passthrough" as an anti-pattern and say MCP servers "MUST NOT accept any tokens that were not explicitly issued for the MCP server". An MCP server is still an API, and the secure coding checklist applies to it like any other.

Events often start an agent's run, such as a new ticket or a payment that failed, and those arrive by webhook or a queue. Writes need the same care as any integration: retries with idempotency keys, and failed calls parked in a dead letter queue rather than retried by the model until it gives up. Our system integration guide covers those patterns.

What can go wrong, and what stops it?

OWASP defines prompt injection (LLM01:2025) as input that alters a model's behaviour or output in unintended ways. The indirect kind arrives in external content the agent reads, such as websites or files. OWASP adds that "it is unclear if there are fool-proof methods of prevention". The UK's National Cyber Security Centre goes further: because a model draws no line between data and instructions, prompt injection "may never be totally mitigated" the way SQL injection can be, so protections should focus on "deterministic (non-LLM) safeguards that constrain the actions of the system".

Simon Willison's "lethal trifecta" turns that into a design check. An agent that has access to private data, exposure to untrusted content and a way to communicate externally can be tricked into sending the data to an attacker. The fix is to make sure no single agent holds all three: no outbound email or arbitrary URLs for an agent that reads customer records and inbound mail, for example.

The same check settled a design choice on Via Ottawa. A "paste your website and we'll fill in the listing" option was turned down: fetching any address a visitor supplies invites server-side request forgery and delivers whatever instructions that page holds straight to the model. New listings and owner edits are screened by a model that may answer only clean, suspicious or violation. A timeout, a provider error or an answer of the wrong shape counts as unavailable and holds the listing for a moderator, so a broken screen never waves a page through.

Three overlapping circles hold a locked database, an open envelope with a letter inside, and an arrow leaving to a cloud. Only the small centre where all three overlap is orange.
Fig. 3 Private data, untrusted content and a way out: an agent that holds all three can be turned against you.

OWASP traces excessive agency to three root causes: excessive functionality, excessive permissions and excessive autonomy. Its Top 10 for Agentic Applications for 2026, published on December 9, 2025 with more than 100 contributors, adds a principle it calls Least-Agency: avoid unnecessary autonomy, because "deploying agentic behavior where it is not needed expands the attack surface without adding value". The entries a business deployment meets first:

OWASP entryWhat it means in practiceA control to start with (this guide's mapping)
ASI01 Agent Goal HijackContent the agent reads redirects its goal or planTreat inputs as data; approval for goal-changing actions
ASI02 Tool Misuse and ExploitationA legitimate tool used for exfiltration or the wrong actionPer-tool scopes, rate limits and egress allow-lists
ASI03 Identity and Privilege AbuseDelegated or cached credentials reach further than intendedShort-lived, per-user tokens; no shared admin keys
ASI04 Agentic Supply Chain VulnerabilitiesA third-party tool, server or package is maliciousPin and review MCP servers and packages like code
ASI06 Memory and Context PoisoningBad data in memory or retrieval stores steers later runsApproved sources only; review what the agent stores
ASI09 Human-Agent Trust ExploitationPeople approve because the agent sounds sureShow the evidence behind each proposal, not just the answer

The supply chain risk is not hypothetical. OWASP's document cites a malicious server impersonating postmark-mcp, reported as the first in-the-wild malicious MCP server on npm, which secretly sent blind copies of emails to the attacker.

How much does an AI agent cost to run?

Gartner predicted in June 2025 that over 40% of agentic AI projects will be canceled by the end of 2027 "due to escalating costs, unclear business value or inadequate risk controls". Cost is the easiest of the three to estimate before you build.

Model usage is billed per token. Claude's pricing page says tool-use requests are priced on all input tokens, including those in the tools parameter (where the tool names, descriptions and schemas go), plus output tokens. So an agent pays for its instructions and tool definitions again on every call of every case. Prompt caching stores that repeated prefix: on Claude Sonnet 5.5, a cache hit costs $0.10 per million tokens against $2 for uncached input.

An illustrative support case of six model calls, each with 8,000 input tokens (5,000 of them the fixed instructions and tool definitions) and 300 output tokens, priced at Claude Sonnet 5.5's list rates as of October 29, 2026 ($2 per million input tokens, $10 per million output tokens, $2.50 per million for a five-minute cache write):

Without cachingWith the fixed 5,000 tokens cached
Input48,000 tokens: $0.09618,000 uncached: $0.036; 5,000 written once: $0.0125; 25,000 read from cache: $0.0025
Output1,800 tokens: $0.0181,800 tokens: $0.018
Per caseabout $0.114about $0.069
10,000 cases a monthabout $1,140about $690
A fanned column of request cards, each with the same grey top block and a different lower part. Dashed arrows from every top block end at one orange drawer of a filing cabinet that holds the block once.
Fig. 4 Every call repeats the same instructions and tool list; caching stores that part once.

Three cautions make the estimate honest. Token counts depend on the model: the same page says Claude models from 4.7 onward use a newer tokenizer that produces about 30% more tokens for the same text, so measure on the model you will use. Steps vary, and each call also carries the results of earlier steps, so input grows within a case; that is why max_steps belongs in the configuration. Anthropic notes that agents' autonomy "means higher costs, and the potential for compounding errors". And the tokens are rarely the largest line: integrations, the evaluation runs before each change and the time people spend in the review queue usually cost more.

Put the ceiling in code, not only in a billing alert. The Minute Notary and Good Cleaner Co. assistants check a monthly spend cap before each request rather than after the bill arrives; past the hard limit, Minute Notary's assistant makes no model call at all and points the visitor to booking or contact instead. Via Ottawa gives its listing chat a daily and monthly cap of its own, separate from its question-answering assistant's, so abuse of one cannot switch the other off, and both refuse without calling a model when the counter cannot be read.

Should you buy an agent platform or build one?

Be sceptical of the label first. Gartner calls the rebranding of assistants, robotic process automation (RPA) and chatbots without substantial agentic capabilities "agent washing", and estimates that only about 130 of the thousands of agentic AI vendors are real.

OptionExamples (as described by their vendors)Fits whenWatch for
Agents inside software you already licenseCopilot Studio, "a graphical, low-code studio for building and managing AI-powered agents and workflows"; Agentforce, Salesforce's AI agent platformThe task stays inside that suite and its dataPermissions inherited from the suite; the billing unit (Agentforce lists Flex Credits, resolutions or per-user licences)
An agent step in a workflow tooln8n's AI Agent node: connect a chat model and tools, and the agent decides which tools to callMost of the flow is fixed, with one open-ended stepHow tool calls are approved and logged in your setup
An SDK or framework in your own codeOpenAI Agents SDK, the Claude Agent SDK, LangGraph for long-running, stateful agentsThe task spans several systems or needs custom approval rulesYou own the hosting, tracing and upgrades
A managed runtime for agents you buildAmazon Bedrock AgentCore, for building, deploying and operating agents with any framework and modelYou need identity, memory and scaling without running themLock-in to one cloud's identity and logs

Anthropic's 2024 advice for builders was to start with the model APIs directly, because frameworks "often create extra layers of abstraction that can obscure the underlying prompts and responses, making them harder to debug". The page now notes that much of the tooling it describes has changed, so read each framework's current documentation, and check that you can still see the exact prompts and tool calls it sends. Whatever you choose, ask the vendor or the team the same questions: which tools the agent can call and with whose permissions, what it can change without a person, where the logs go and for how long, whether your data trains anyone's model, and what happens when the model provider is down.

How do you test an agent before it touches real work?

Test whole cases, not single answers. OpenAI's guide recommends setting up evaluations to establish a baseline with the most capable model, then swapping in smaller models where they still meet the accuracy target. Anthropic recommends "extensive testing in sandboxed environments, along with the appropriate guardrails", and stopping conditions such as a maximum number of iterations.

An evaluation set for a business agent has three kinds of cases:

  1. Real cases with known outcomes, taken from your ticket or case history, including the awkward ones that took a person three attempts.
  2. Cases where the right answer is to stop: missing information, a request outside policy, a customer who should reach a person.
  3. Attacks: instructions hidden in an email or document the agent will read, requests to reveal its instructions, and attempts to reach a tool it does not hold. A penetration test of the systems behind the tools still applies.

Score task success, the share of cases sent to a person, wrong actions stopped at the approval gate and cost per case. Run the set before launch and again before every change to the model, prompt or tools, as a gate in the same CI/CD pipeline that ships the code.

Test the exact thing you rely on the model to do, and pin the model that passed. Via Ottawa has a model look at every business logo before the site shows it. In a September 2026 test, two other models on the same endpoint accepted the image, silently dropped it and answered confidently anyway: a photograph of the Canadian flag came back as a close-up of a human eye. The model that passed is now fixed in code rather than in a setting, and it is shown only the image that will be served, with none of the uploader's text, so there is nothing for an instruction to hide in.

After launch, keep reading real conversations. On Good Cleaner Co. a scheduled model review reads the stored transcripts, with personal details already removed, and can flag a conversation for a person. It has no way to reply to the visitor, so the worst a review mistake can do is miss an alert or raise a false one, never send a wrong answer.

A row of test cards passes through an agent box onto a scoring board of check marks with one cross. A lowered orange barrier holds the path to the production server closed.
Fig. 5 One failed case keeps the gate to production closed until it is fixed.

Plan for a person to take over. OpenAI names two triggers: exceeding failure thresholds, such as failing to understand the customer's intent after several attempts, and high-risk actions that are "sensitive, irreversible, or have high stakes", such as canceling orders, authorizing large refunds or making payments.

Which rules and frameworks apply?

Governance starts with names. The NCSC's May 2026 guidance on agentic AI says humans remain accountable for the decision to deploy, the access granted, the safeguards and the consequences, and that you should know who owns the agent, who approves its access, who monitors it, who reviews incidents and who can stop it. Its test is blunt: "If you cannot understand, monitor or contain an agent's actions, it is not ready for deployment."

  • NIST AI RMF. The AI Risk Management Framework, released on January 26, 2023, is voluntary, and NIST released its Generative Artificial Intelligence Profile (NIST AI 600-1) on July 26, 2024. Both give you a structure for the risk register.
  • EU AI Act. The European Commission says the Act entered into force on August 1, 2024 and became applicable on August 2, 2026, with exceptions; the strict obligations for high-risk systems, which cover uses such as recruitment and exam scoring, start on December 2, 2027. Its transparency rules mean people using a system such as a chatbot should be made aware they are interacting with a machine.
  • Privacy law applies wherever the agent reads personal data, whatever the AI rules say.

This is engineering guidance, not legal advice; your counsel decides how these apply to you.

Which mistakes sink agent projects?

MistakeWhat happensFix
An agent for a task with a known pathHigher cost and less predictable results than a workflowBuild the workflow; keep the model for the one step that needs judgment
One broad API key for all toolsA single bad step can read or change anything the key reachesPer-tool scopes and per-user tokens
Approval only in the promptA manipulated model skips the "ask first" instructionEnforce approval in the gateway that runs the call
No evaluation setNobody can tell whether a model or prompt change made it worseBuild the set before the pilot and run it on every change
Reading inbound mail with an outbound channel openA hidden instruction can send data outRemove one leg of the lethal trifecta
No owner and no off switchIncidents wait while people argue about who decidesName the owner, approver and person who can stop it before go-live

A 90-day plan for your first agent

  1. Weeks 1 to 2: choose one workflow. Pick a task with volume, a measurable outcome and a path that varies. Write down today's handling time and error rate, and name the owner. Done when the success measure is agreed.
  2. Weeks 2 to 4: build the evaluation set. Collect 50 to 200 real cases with known outcomes, plus the stop cases and attacks above. Done when a person can score the current process against it.
  3. Weeks 3 to 6: prototype with read-only tools. The agent reads and proposes; people do everything else. Done when it meets the agreed score on the evaluation set.
  4. Weeks 6 to 8: add draft tools. Replies and records land in a review queue. Done when reviewers accept most drafts with light edits and the cost per case is known.
  5. Weeks 8 to 11: add change tools behind approval. Each change waits for a named person; the gateway enforces limits. Done when every write has an approval record and a log entry.
  6. Weeks 11 to 13: widen carefully. Raise limits only where the evidence supports it, keep the evaluation set as the gate for every change, and rehearse switching the agent off.
Three steps of a staircase each hold the same agent box with more tool sockets connected: one reading socket, then a drafting socket, then a changing socket with an orange approval key.
Fig. 6 Access grows in steps: read first, then drafts, then changes that a person approves.

Computese builds this kind of system in its AI and automation work: agents call only tools on an allow-list, each classed by what it can change, with maker-checker approval for changes and every call logged. The first step is a review of one real workflow that ends with a fixed quote or a written recommendation not to build. A financial firm's disaster recovery drills show the same rule in a regulated setting: the AI advises but has no dispatch rights, and the gateway refuses any command without a recorded human approval.