# Beyond Chatbots: What It Takes to Build AI Agents That Actually Work

> A readiness ladder for AI agents: when to move from single calls to workflows to autonomy, and the controls each level needs.

Artificial Intelligence · Deep Dive · By iVirtualSoft Editorial · Published 2026-12-04 · 8 min read

Picture a hypothetical support agent with one job: read a complaint, look up the order, and issue a refund when policy allows. In a demo it handles the common cases. Then a customer email includes a line asking for the refund to go to a different card. The order system times out and the agent retries the refund call. None of this is the model getting a sentence wrong. It is about what the agent could reach, what it could do without asking, and what would have caught the mistake.

That is where agents succeed or fail: in the system around the model. This piece sets out that system as a ladder of autonomy, with the controls each rung needs, and ends with a checklist to run before anything ships.

**Short answer:** an AI agent is a model that chooses its own steps and tool calls in a loop until a task is done. It works in production when its tools are narrow, its permissions are enforced outside the model, its behavior is measured over repeated runs, and its autonomy is earned one level at a time.

## Agent or workflow: the first decision

Anthropic's [Building effective agents](https://www.anthropic.com/engineering/building-effective-agents) draws the line. Workflows are systems where models and tools are "orchestrated through predefined code paths". Agents are systems where models "dynamically direct their own processes and tool usage". The same article recommends "finding the simplest solution possible, and only increasing complexity when needed", and warns that agentic systems often trade latency and cost for better task performance.

If a person could write the procedure as a numbered list before the work starts, build a workflow and keep the model for the steps that need language understanding. An agent earns its place only when the next step depends on what the tools return. Settling where AI belongs, and where it does not, is the first stage of [our six-stage delivery approach](https://www.ivirtualsoft.com/engineering.html).

## The agent readiness ladder

Our view: autonomy should be promoted, not configured. Treat it as four levels, and move up only when the evidence for the level above exists.

| Level | Who decides the next step | Gate to move up |
|---|---|---|
| 1. Single call | Your code; the model does one transformation (classify, extract, draft) | The task needs several steps, and you can write them down |
| 2. Workflow | Your code, through a fixed path | The path depends on tool results you cannot predict; an outcome-scored eval set exists; every tool is narrow and runs under a scoped identity; every run is traced |
| 3. Agent with approvals | The model, but every consequential action waits for a person | For a given class of action: repeat-run success meets a threshold you set in advance; approval logs show reviewers rarely change those actions; the action is reversible or cheap to detect; injection tests pass |
| 4. Autonomous within budget | The model, inside hard limits on spend, count and scope | Not a destination. Sampled review, alerts and a demotion trigger stay on |

Two rules make the ladder work.

**Promote per action class, not per agent.** The hypothetical refund agent can sit at level 4 for refunds below a set amount on a verified order, and at level 3 for everything else. "Is the agent autonomous?" is the wrong question. "Which actions may it take alone, up to what limit?" is the right one.

**Demotion is automatic.** An incident in an action class drops that class one level until the cause is fixed and a test for it exists. Writing the demotion rule down before launch is what makes a promotion safe to grant.

The level-2 gate carries most of the work. The sections below are the controls behind each gate.

## Tools deserve the care of a public API

Anthropic advises investing in the agent-computer interface through tool documentation and testing. Its example: a coding agent made fewer errors once a tool was changed to always require absolute file paths. Change the tool so the mistake is hard to make.

- **Narrow beats general.** A `refund_order(order_id, amount)` tool with validation is safer, and easier for a model to use, than a database or shell tool.
- **Make parameters unambiguous.** Use enums, typed IDs and explicit units. Reject bad input with an error the model can act on.
- **Return only what the next step needs.** Large, noisy output wastes context and widens the surface for injected text.
- **Make writes idempotent.** Agents retry. A repeated call must not send a second email or issue a second refund.

## Permissions belong outside the model

[OWASP's entry on Excessive Agency](https://genai.owasp.org/llmrisk/llm062025-excessive-agency/) names three root causes: excessive functionality, excessive permissions and excessive autonomy. Its prevention advice is least privilege: minimize the functions available, avoid open-ended ones such as arbitrary shell execution, minimize downstream permissions, and require human approval for high-impact actions.

Enforce authorization downstream rather than asking the model whether an action is allowed. A prompt that says "never refund more than the order total" is a request. A refund service that rejects it is a control. For each tool, write down the identity it runs as and the worst thing that identity can do. If the answer is uncomfortable, the tool is too broad for any level of the ladder.

## State lives in your storage, not the context window

Anything the agent must not lose belongs in durable storage your code owns: the goal, decisions made, tool results that matter, approvals granted. A long task can then resume after a crash, and a reviewer can read what happened without replaying a conversation.

Long-term memory needs care. Anything an agent writes today and reads tomorrow is a persistence channel, so a one-time injection can become a standing one. Scope memory per user or tenant and keep it reviewable.

## How do you evaluate an agent's multi-step behavior?

The [tau-bench paper](https://arxiv.org/abs/2406.12045) is a useful model. It places an agent with domain tools and policy guidelines in a conversation with a simulated user, then compares the database state at the end with an annotated goal state. It introduces pass^k, a measure of reliability across repeated trials. Its authors report that state-of-the-art function-calling agents "succeed on <50% of the tasks" and are "quite inconsistent (pass^8 <25% in retail)". The follow-up [tau2-bench](https://arxiv.org/abs/2506.07982) reports significant performance drops when agents move from a no-user setting to dual control, where the user also acts on the environment. These are 2024 and 2025 results on the models of the time. The method carries over, and repeat-run success is the evidence the level-3 gate asks for.

- **Score outcomes, not prose.** Did the record end in the right state?
- **Run each case several times.** A task that passes once and fails twice will fail in production.
- **Test the policy edges.** Include cases where the right behavior is to refuse, escalate or ask.
- **Build cases from real work**, and treat the set as a release gate, as [our engineering approach](https://www.ivirtualsoft.com/engineering.html) does with evaluation before release.
- **Replay failures.** Every incident becomes a permanent test case, and the demotion rule above depends on it.

## Approval gates people actually read

Level 3 lives or dies on approval design. Anthropic describes agents pausing for human feedback at checkpoints or on blockers, and OWASP lists human approval for high-impact actions. Show the exact action, its parameters and the evidence behind it. A bare "Approve?" dialog trains people to click through, and then your approval log, the evidence for promotion, measures habit rather than judgment. Then tier the gates: reads and drafts run freely, reversible writes run with logging, and irreversible or external actions wait for a person, with a record of who approved what. This is [human approval for consequential actions](https://www.ivirtualsoft.com/enterprise-ai.html) in practice.

## Tool outputs are an injection path

Everything an agent reads can carry instructions. OWASP's [prompt injection entry](https://genai.owasp.org/llmrisk/llm01-prompt-injection/) separates direct injection, through a user's prompt, from indirect injection, through instructions embedded in external content. Its mitigations include least privilege, human approval for high-risk actions, and segregating and labeling untrusted content.

Assume some injection will get through. [AgentDojo](https://arxiv.org/abs/2406.13352), an evaluation framework for agents that run tools over untrusted data, includes 97 realistic tasks and 629 security test cases. Its authors find that existing attacks "break some security properties but not all". Test your own agent against injected content before it climbs past level 2.

Simon Willison's [lethal trifecta](https://simonwillison.net/2025/Jun/16/the-lethal-trifecta/) is a useful design check: private data, untrusted content and the ability to communicate externally. When one run combines all three, injected text can steal data. Our reading extends the third leg to any external action, not only communication. In the refund example, that suggests splitting a reader that sees the customer's email and has no write tools from an actor that can refund but sees only validated, structured fields.

## Budgets and traces

Each loop step is a model call, and each tool result grows the next prompt, so spend multiplies. Anthropic notes that it is common to include stopping conditions "such as a maximum number of iterations". Add caps on tokens, tool calls and wall-clock time per task, and a per-user ceiling above those. These hard limits are what "within budget" means at level 4. Enforcing them in one place rather than in every agent is a common reason to adopt [an AI gateway](https://www.ivirtualsoft.com/insights/what-is-an-ai-gateway).

Record every step as a structured trace: model and prompt version, tool name and arguments, result size, latency, tokens, cost and any approval. You cannot promote or demote what you cannot replay. Keep sensitive values out of traces by default.

## Decision rule and checklist

The rule: **give an agent the least autonomy that completes the job, and let it act alone only for action classes where a wrong action is cheap to detect and cheap to undo.**

Before an agent ships, you should be able to answer yes to each of these:

1. Could a fixed workflow do the job? If so, build that instead.
2. Is every tool narrow, typed, documented and tested with bad input?
3. Does each tool run under a scoped identity, with authorization enforced downstream?
4. Is durable state held outside the context window, with memory scoped per user or tenant?
5. Is there an outcome-scored evaluation set built from real examples and run repeatedly, with refusal and escalation cases?
6. Are consequential actions gated on informative human approval, with a log of who approved?
7. Does the design avoid combining private data, untrusted content and an outbound channel in one run?
8. Are iteration, token, tool-call, time and spend limits enforced in code?
9. Can you replay any run from its trace?
10. Is each action class assigned a ladder level, with the promotion evidence and demotion trigger written down?

[10 questions to ask before deploying an AI agent](https://www.ivirtualsoft.com/insights/questions-before-deploying-ai-agent) turns this into a review conversation, and [From AI Prototype to Production](https://www.ivirtualsoft.com/insights/ai-prototype-to-production) covers the wider path from demo to operation.

If you have a task in mind and want to place it on the ladder, [describe the task and its riskiest action](https://www.ivirtualsoft.com/start.html).

## References

- [Building effective agents (Anthropic Engineering)](https://www.anthropic.com/engineering/building-effective-agents)
- [LLM06:2025 Excessive Agency (OWASP)](https://genai.owasp.org/llmrisk/llm062025-excessive-agency/)
- [LLM01:2025 Prompt Injection (OWASP)](https://genai.owasp.org/llmrisk/llm01-prompt-injection/)
- [tau-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains (arXiv:2406.12045)](https://arxiv.org/abs/2406.12045)
- [tau2-Bench: Evaluating Conversational Agents in a Dual-Control Environment (arXiv:2506.07982)](https://arxiv.org/abs/2506.07982)
- [AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents (arXiv:2406.13352)](https://arxiv.org/abs/2406.13352)
- [The lethal trifecta for AI agents (Simon Willison, June 2025)](https://simonwillison.net/2025/Jun/16/the-lethal-trifecta/)

Source: https://www.ivirtualsoft.com/insights/ai-agents-that-work
