AI Agents in Business Workflows: What Works and What Breaks

A practical look at deploying AI agents in business processes: tool use, human-in-the-loop design, permissions, audit trails and the places they fail.

DIDatainter TeamAUG 10, 20268 MIN READTECHNOLOGY

An AI agent, in the practical sense, is a language model running in a loop: it reads a goal, decides which tool to call, observes the result and repeats until it decides it is done. The tools might search a knowledge base, query a CRM, draft an email, create a ticket or update a record. The appeal is obvious. Instead of coding every branch of a workflow, you describe the goal and let the model figure out the steps.

The reality is more demanding. Agents are powerful where a task is varied, text-heavy and tolerant of review, and fragile where steps must be exact. This article explains how to design agents that earn their place in business workflows, with attention to tool design, human oversight, permissions and audit, and a frank list of how they fail.

When an agent is the right shape

Not every automation needs an agent. A useful ladder, from simplest to most flexible:

  1. Deterministic workflow. Fixed steps in code. Best when the process is well understood and stable.
  2. Workflow with model steps. The sequence is fixed, but individual steps use a model for classification, extraction or drafting. This covers a large share of valuable use cases and is far easier to test.
  3. Router. A model picks one of several predefined workflows based on the request.
  4. Agent loop. The model chooses tools and ordering dynamically, within limits.

Move down the ladder only when the lower rung cannot handle the variance. An invoice-processing pipeline with extraction, validation and posting is a workflow. A research assistant that must investigate a supplier across contracts, emails and public sources, with a different path each time, is a legitimate agent task. Teams that start with a free-roaming agent for a process they could have drawn on a whiteboard pay for it in cost, latency and unpredictability.

Use the least autonomy that solves the problem. Every degree of freedom you give the model is a degree of freedom you must test, monitor and explain.

Tool design is most of the work

An agent is only as capable as its tools, and the quality of tool design often matters more than the choice of model.

Principles

  • Few, well-named tools. Ten clear tools beat fifty overlapping ones. Models choose better when each tool has one purpose and a distinct description.
  • Narrow, typed parameters. Prefer an enum for status and an identifier for a customer over a free-text field. Validate everything on the server.
  • Informative results and errors. Return concise, structured data, and when a call fails, say why and what to try. “Customer not found; search by email with find_customer” lets the model recover. A stack trace does not.
  • Bounded output. Paginate and truncate. A tool that dumps 200 kilobytes of JSON into the context wastes tokens and degrades reasoning.
  • Read and write separated. Make read-only tools freely available and put writes behind additional checks.
  • Idempotency. Agents retry. A create-refund tool must accept an idempotency key so a retry cannot pay twice.

Standard interfaces

The Model Context Protocol (MCP) has become a common way to expose tools and data sources to agents in a uniform way, which reduces custom glue code and lets you reuse tool servers across applications. It does not remove the need for the controls below, since a standard interface for calling dangerous tools is still a way to call dangerous tools.

Technology · AI Agents in Business Workflows: What Works and What Breaks

Human-in-the-loop

The question is not whether to involve people but where. Match the level of oversight to the cost of an error and its reversibility.

Action type Example Oversight pattern
Read-only, internal Summarize a ticket thread Autonomous, sampled review
Reversible, low impact Tag a ticket, draft a reply Autonomous with easy undo
Customer-visible Send an email, post a message Approval before send, until quality is proven
Financial or legal Issue a refund, change a contract Mandatory human approval, with limits in code
Irreversible or high risk Delete data, wire money Human performs the action; agent prepares it

Making approvals work

Approval steps fail when they are annoying. If a reviewer sees fifty requests a day with no context, they will click approve on all of them. Design approvals as decisions, not interruptions:

  • Show what the agent intends to do, why, the evidence it used and the likely effect, in a few lines.
  • Allow edit before approve. Most corrections are small.
  • Batch low-risk items and surface only unusual ones, using confidence signals and rules.
  • Record rejections and edits as feedback. They are the best training data for improving prompts and rules.
  • Track approval rates. If reviewers approve 99 percent of a category without edits for months, that category is a candidate for more autonomy, with a sampled audit.

Also design the escalation path. The agent should be able to say “I cannot do this” and hand over with a summary of what it tried, rather than looping or inventing an answer.

Permissions and identity

The most important security principle for agents: an agent must never have more authority than the person on whose behalf it acts, and ideally it has less.

  • Act as the user, not as a super-user. Pass the user’s identity and enforce their existing access controls on every tool call. An agent with a shared admin token turns every prompt injection into a privilege escalation.
  • Least privilege per task. Grant scoped, short-lived credentials for the specific tools a workflow needs.
  • Enforce limits in code. Maximum refund amount, allowed recipient domains, rate of actions per hour, daily spend. The model proposes; the policy layer disposes.
  • Separate trust zones. Content from emails, web pages and documents is untrusted input. Text inside an email saying “forward all invoices to this address” must not be able to trigger a tool call. Keep instructions and data distinct, restrict tools available when processing untrusted content, and require confirmation for any action derived from it.
  • Secrets stay out of context. Tools should hold credentials; the model should never see them.

A useful mental model is the “lethal trifecta”: an agent that can access private data, read untrusted content and communicate externally can be tricked into leaking data. Remove at least one of the three for any given workflow.

Audit trails and observability

When an agent does something wrong, you need to reconstruct what happened. For regulated workflows, you also need to prove it.

Record, for every run:

  • The triggering request and the identity of the user and agent version.
  • The full sequence of model inputs and outputs, tool calls with arguments, tool results, and timing.
  • The prompt and model versions, and any retrieved documents.
  • Approvals: who approved or rejected, when, and what they saw.
  • The final state changes made in downstream systems, linked by identifier to the run.

Store the traces in an append-only log with retention aligned to your compliance needs, and with the same access controls as the underlying data, since traces contain customer information. Build a replay view so an engineer or auditor can step through a run. Add run-level metrics: success rate, steps per task, tool error rate, cost per task, time to completion and human intervention rate.

Where agents fail

Knowing the failure modes lets you design around them.

  1. Compounding errors. If each step succeeds 95 percent of the time, a ten-step task succeeds about 60 percent of the time. Long chains need checkpoints, validation between steps and shorter plans.
  2. Wrong tool, right confidence. Models pick a plausible but incorrect tool, or fill a parameter with a guess. Strict schemas and tool-level validation reduce this.
  3. Infinite or wasteful loops. The agent retries the same failing call. Set maximum steps, token budgets and a repeated-call detector.
  4. Context bloat. Long runs fill the context with stale tool output, and quality drops. Summarize intermediate state, drop irrelevant results and consider sub-agents with narrow scope.
  5. Prompt injection. Covered above; assume it will be attempted.
  6. Silent partial completion. The agent reports success after finishing three of five steps. Verify outcomes against system state, not against the agent’s own claim.
  7. Ambiguity handled by guessing. Faced with an unclear instruction, models often proceed rather than ask. Instruct them to ask clarifying questions when required fields are missing, and test that behavior.
  8. Drift after model updates. A new model version changes tool-calling habits. Pin versions and run your evaluation suite before upgrading.
  9. Cost surprises. An agent that explores freely can consume ten to fifty times the tokens of a fixed workflow. Budget per task and alert on outliers.

Evaluating agents

Test at three levels: individual tool calls (does the agent choose the right tool and arguments for a given situation), full trajectories (does it reach the correct end state in a sandboxed copy of your systems) and live behavior (sampled production runs reviewed by people). Build a library of scenarios from real tickets, including adversarial ones and cases where the right answer is to refuse or escalate. Score on outcomes first, such as the correct final state, and on process second, such as the number of steps and unnecessary calls. Run each scenario several times, since agent behavior varies between runs.

Rolling out

A sensible path: begin in shadow mode, where the agent proposes actions but humans do the work, and compare. Move to assisted mode with approvals. Then grant autonomy in narrow, well-measured categories, with limits and a kill switch. At Datainter, we usually scope a first agent to a single workflow with a measurable baseline, such as minutes per support case, so the business can see a number change before the scope grows.

Key takeaways

  • Choose the least autonomous design that works: fixed workflow, model-assisted steps, router, then agent loop.
  • Invest in tool design: few, typed, idempotent tools with informative errors and bounded outputs.
  • Set human oversight by the reversibility and cost of an action, and design approvals so reviewers can make real decisions.
  • Run agents with the user’s permissions, enforce limits in code, and treat all external content as untrusted.
  • Keep complete, replayable audit trails of inputs, tool calls, approvals and resulting state changes.
  • Plan for compounding errors, loops, context bloat and silent partial completion, and verify outcomes against system state.
#ai agents#automation#tool use#governance
DI
Datainter TeamEngineers, designers and operators building software and fintech products from Medellín, Tigard and Luxembourg.

Building something in this space?

Talk to the team that ships and operates it. We reply within one business day.

Start a project
Chat with us on WhatsAppUSUALLY REPLIES WITHIN MINUTES