WisyLink Blog

AI agentsagentic AItool callinghuman in the loopAI safety

Tool-Using Agents: AI Moving from Answering to Acting

What a tool-using AI agent is, how it decides to act, and where to put human approval, step limits and scoped permissions so its actions stay reversible.

10 min read
Tool-Using Agents: AI Moving from Answering to Acting

A tool-using AI agent is a language model that works in a loop: it picks a tool, calls it, reads the result and decides the next step until the goal is met. Moving from answering to acting changes the risk. A wrong sentence can be ignored, but a wrong action has to be undone, and some actions cannot be.

  • A chatbot returns text. An agent runs a loop of decide, act and observe, choosing its own next step.
  • Read tools and write tools carry different risks: reading changes nothing, writing leaves a trace.
  • Set the approval line by reversibility, not importance. Payments, deletions and outgoing messages should wait for a person.
  • OWASP traces damaging agent actions to three root causes: excessive functionality, excessive permissions and excessive autonomy.
  • Cap the loop with step limits, spend limits and a stop control, and log every action.
  • An agent earns trust by where it stops, not by how much it can do.

What is a tool-using AI agent?

An AI agent is a system that is given a goal, breaks it into steps, and at each step decides whether to use a tool, which one and with what inputs. It then reads the result and chooses what to do next. Anthropic's widely cited guide draws the line clearly: workflows are "systems where LLMs and tools are orchestrated through predefined code paths", while in agents the models "dynamically direct their own processes and tool usage" (Building effective agents).

A tool is any capability the model can trigger outside its own text: searching the web, reading a calendar, querying a database, sending an email, creating an invoice. The model does not run the tool itself. It produces a structured request, the surrounding application executes it, and the result is fed back into the model's context.

A concrete example: ask an assistant to "move my Thursday dentist appointment to next week and let the clinic know". A chatbot drafts a polite message for you to send. An agent checks your calendar, looks for free slots, calls the clinic's booking system, moves the appointment and sends the confirmation. Same request, very different consequences if something goes wrong.

How an agent differs from a chatbot

The difference lies in the loop. A chat model receives input and returns text, and the reader decides what to do with it. An agent receives input, acts, observes what happened and continues, so its output lands in systems rather than in front of a reader.

DimensionAnswering modelActing agent
Where the output landsIn text a person readsIn systems: records, messages, payments
Who chooses the next stepThe person readingThe model, at runtime
Cost of an errorReread and correctUndo, compensate or apologise
How errors spreadThey stop at the readerThey can chain across steps
What needs governingAccuracy of contentPermissions, approvals and limits

The capability that expands what an agent can do also expands what it can get wrong. Anthropic's guide states the trade-off plainly: "The autonomous nature of agents means higher costs, and the potential for compounding errors." So the useful question for any task is how much of it should be left to an agent's judgement. Often a fixed workflow is the safer and cheaper answer.

A rule of thumb helps. If you can write the steps down in advance, such as "when a form is submitted, save it, then email the owner", build a workflow: it is cheaper, faster and easier to test. Reach for an agent when the steps genuinely depend on what it finds along the way, such as comparing suppliers or untangling a messy support case, and accept that you will need the limits described below.

How an agent decides when to call a tool

An agent calls a tool when it judges that it cannot complete the next step with what it already knows. That judgement comes from the model's reading of the situation, not from a fixed rule, which makes it flexible and brittle at the same time.

The main input to that judgement is the tool's description. In the Model Context Protocol, an open standard for connecting models to tools, each tool is published with a name, a human-readable description and a JSON schema for its inputs (MCP tools specification). Vague descriptions produce vague behaviour. A tool described as "manages orders" will be called at the wrong moments, while "cancels one unpaid order by ID; cannot be undone" tells the model both what it does and what it costs. Writing those descriptions well is a form of context engineering.

Calling errors come in three kinds:

Premature calls
The agent reaches for a tool when it already had what it needed, which costs time and money and touches a live system for no reason.
Missing calls
The agent assumes it knows something, such as a price, a date or a stock level, and answers from its own guess instead of checking. It is wrong with confidence.
Wrong-tool calls
Two tools overlap and the agent picks the more powerful one, for example a bulk update where a single-record edit would do.

Good systems reduce all three with fewer, sharper tools rather than many overlapping ones.

Why reversibility sets the approval line

How freely an action can be allowed depends mainly on whether it can be undone. A reversible action can be corrected if it goes wrong. An irreversible one has to be compensated, and compensation is not always possible: a sent email stays sent, a record deleted without a backup stays deleted, and a payment taken from the wrong customer becomes a refund, a support ticket and a loss of trust.

A practical classification has four levels:

Action classExamplesDefault policy
ReadSearch, look up a record, check availabilityAllow freely and log it
Reversible writeCreate a draft, add a tag, move a record to a holding statusAllow, and make undo easy
Irreversible writeDelete data, cancel an order, change permissionsRequire approval or a delay window
External effectSend a message, take a payment, publish a postRequire human approval

This matches published security guidance. OWASP's 2025 list of risks for LLM applications advises: "Utilise human-in-the-loop control to require a human to approve high-impact actions before they are taken" (OWASP LLM06:2025 Excessive Agency). The MCP specification makes the same point for tool calls in general: there should always be a human in the loop with the ability to deny tool invocations.

The line moves with context. Sending a message to yourself is harmless; sending the same message to every customer is not. Good systems classify the action as it will actually run, with its real recipients and amounts, rather than by the tool's name.

The three ways agents get too much power

OWASP calls the vulnerability Excessive Agency and traces it to three root causes. Each has a plain fix.

  • Excessive functionality. The agent has tools it does not need, such as a general shell command when it only needs to read files. Fix: give each agent the smallest set of narrow tools that does the job.
  • Excessive permissions. The tools run with more access than the task requires, such as a database login that can delete when the agent only reads. Fix: scoped credentials per agent, read-only wherever possible.
  • Excessive autonomy. High-impact actions run without a check. Fix: the approval gates above, plus limits on steps and spend.

Prompt injection makes these risks sharper. An agent that reads web pages, emails or documents is also reading text written by strangers, and some of that text may contain instructions. With narrow tools and scoped permissions, an injected instruction has little to work with. With broad ones, it can act. Code-writing agents face a related risk when they install packages that do not exist, or that an attacker registered under a plausible name, the problem described in phantom packages.

How to build a responsible action loop

Safety works when it is designed in from the start rather than added as a warning dialog at the end. This order works for a personal automation as well as for a product feature.

  1. List the tools and classify each action. Mark every action as read, reversible write, irreversible write or external effect.
  2. Describe each tool precisely. State what it does, what it cannot do and what it costs, including whether it can be undone.
  3. Grant the least access that works. Use separate credentials per agent and per tool, read-only by default.
  4. Gate the irreversible. Put a human approval step before payments, deletions, permission changes and outgoing messages.
  5. Cap the loop. Set a maximum number of steps and a spending limit. Anthropic's guide recommends stopping conditions "such as a maximum number of iterations".
  6. Log every step. Record each tool call with its inputs and result, so you can trace a mistake back to where it started.
  7. Test in a sandbox first. Run realistic tasks against test data and test accounts before the agent touches anything live.
  8. Widen limits from evidence. Loosen a gate only when the logs show the agent handles that action reliably.

Most of this is ordinary engineering discipline applied to a new kind of actor. Checking whether an agent's output is good enough is a skill of its own, covered in evaluating what is generated.

How to tell whether an agent is trustworthy

For an answering system, trust meant correct answers. For an acting system, trust means predictable behaviour, and above all predictable stopping. A model that answers well can still break trust by calling the wrong tool at the wrong time.

Three properties are worth checking. An agent is auditable if it can show what it did, step by step. It is accountable if each action can be traced to a request and a permission. And it is cautious if it halts and asks when it is unsure, rather than guessing and carrying on.

Trust is also judged by worst behaviour, not by averages. An agent that works a hundred times and crosses a boundary once has a problem the average hides, because one irreversible mistake can outweigh many saved hours. When agents are combined into teams, these properties have to hold across every hand-off too, a challenge explored in multi-agent orchestration.

WisyLink is a tool-using agent you can try without writing code. In a chat, you say what site, web app or browser game you want. Wisy, the assistant, asks a short question when it needs to, then a build agent writes the app and deploys it to its own address. The patterns above are part of how it works:

  • Least privilege. The build agent works in an isolated environment, without standing access to your account, stored credentials, other people's sites or platform settings.
  • Visible steps and a stop control. A live report shows the build's tasks in the chat, and a Stop button halts the build.
  • Reversible by design. Deploys are all-or-nothing: if a build fails, visitors keep seeing the previous version.
  • Secrets kept out of the conversation. Provider keys are entered once under Integrations, stored encrypted and never displayed again. Never paste a key into a chat.
  • Verified actions in the apps it builds. When a built app takes payments, orders are confirmed by a verified webhook from the payment provider, never by the customer's redirect.
  • Spend limits for automation. If you drive WisyLink from your own scripts or agents through the API, each API key can carry its own spending cap per day, week or month, up to $10 per window.

For the isolation and deploy model, see the product page. To automate builds, start with the API reference and our walkthrough of the AI website builder API. To see the loop for yourself, start free, describe a small app, watch the build report and test the result before you share it.

F.A.Q.

Frequently asked questions

What is function calling in AI?
Function calling, also called tool calling, is how a language model asks for an action. The developer describes the available functions with names, descriptions and parameter schemas. When the model decides one is needed, it outputs a structured request with the function name and arguments instead of plain text. The application runs the function and returns the result, which is where permissions and approvals can be enforced.
Is a chatbot with web search an AI agent?
It sits on a spectrum. If the product always runs one search and then answers, that is a fixed workflow with a single tool. If the model decides whether to search, what to search for, reads the results and searches again until it is satisfied, it behaves like an agent. The distinction matters less for read-only tools like search than for tools that change things.
What is the Model Context Protocol (MCP)?
MCP is an open protocol for connecting AI applications to external tools and data. A server publishes tools, and a client lets the model discover and call them through a standard message format. Because many tools can be plugged in the same way, the main security question shifts to which tools a given agent may use, under which credentials, and which calls need a person to confirm them.
Can AI agents make payments on their own?
Technically yes, if they are given payment credentials and a tool that charges cards or sends transfers. Whether they should is a policy decision. Sensible setups keep payments behind human approval, use credentials scoped to the smallest accounts and amounts needed, set hard spending caps, and confirm completed payments through the provider's signed notifications rather than trusting the agent's own report that it paid.
What is prompt injection, and why is it worse for agents?
Prompt injection is text crafted to override a model's instructions, hidden in a web page, an email, a shared file or even a product review. For a chatbot the damage is usually a strange or misleading answer. For an agent with tools, the injected text can trigger real actions, such as forwarding private data or editing records. No filter catches every case, so limiting what tools can do remains the dependable defence.
How many steps should an AI agent take without human approval?
There is no universal number. Start with a low step limit and approval on anything irreversible, then raise limits for specific actions once logs show the agent handles them reliably. Budget caps often work better than step counts, because they limit the real cost of a runaway loop. Whatever the limit, the agent should stop and report when it reaches it rather than quietly retrying.
Share