Autonomy is a budget you spend, not a feature you add. Give the model the least autonomy that solves the problem.
Priya runs operations for a regional distributor. Every week her team reconciles supplier invoices against deliveries, and every week a handful of mismatches eat an afternoon each: a short delivery here, a price change there, a credit note nobody can find. She has heard about AI agents, and her request is confident and simple: “Build us an agent that just handles invoice disputes end to end.”
It is the most expensive sentence in AI engineering right now — not because agents are bad, but because “agent” is doing four different jobs in that sentence, and three of them are cheaper, safer, and easier to debug than the one she named. This post separates those four jobs, shows what each one does to the same dispute, and gives you a way to choose between them with evidence instead of enthusiasm.
The scenario below is illustrative — a teaching example, not a client story. The decision framework is the point.
This post is the decision companion to Tool Calling & Agentic Workflows, which teaches how to build the agent loop itself. Read that one to build; read this one to decide whether to build, and how much autonomy to grant. It also builds on RAG vs Fine-Tuning vs Prompt Engineering (choosing the right technique), Guardrails, Approvals & Audit (approvals before side effects), and Evals & Tracing (measuring instead of guessing).
1. Autonomy, in plain language
Autonomy means: how many decisions the system makes on its own before a human sees them. A system with no autonomy makes no decisions — it follows a script you wrote. A system with high autonomy makes dozens of small decisions you never see: which tool to call, what the tool output means, whether it is done. Everything in this post is about choosing that number deliberately, instead of letting it default to “as much as possible.”
“Agent” gets used for everything from a single chatbot reply to a team of models running a department. That vagueness is the trap: if you cannot name which level of autonomy you mean, you cannot reason about its cost or its failure modes. Here are the four levels, in order of increasing autonomy.
| Level | Who decides the next step | What it looks like |
|---|---|---|
| Single call | You, once | One prompt in, one structured answer out. No tools, no retries, no memory beyond the prompt. |
| Workflow | You, in advance | A fixed chain you designed: parse → match → decide → draft. The model may run some steps, but the path is yours. |
| Agent loop | The model, step by step | The model observes, picks a tool, reads the result, and decides what to do next — until it finishes or hits a budget. |
| Multi-agent | Several models, by handoff | Specialized agents pass work to each other: one investigates, one resolves, one checks. |
The key insight is what actually changes as you move right: decision rights move from you to the model. At the left end, every decision is yours and the model is a calculator. At the right end, the model makes dozens of small decisions you never see. Each transfer buys flexibility and sells debuggability. When something goes wrong at the left end, you read the prompt. When something goes wrong at the right end, you reconstruct a trajectory.
Correction worth making early: multi-agent systems are not necessarily more autonomous than single-agent ones. A multi-agent system with rigid handoffs can be less autonomous than a single agent with broad tool freedom. Agent count and autonomy are separate dimensions. The spectrum above orders systems by who decides the next step, not by headcount — and the rest of this post follows that ordering.
2. Four architectures, one picture
Beginners need to see where the model, the application code, the tools, and the human approvals sit. Here is the same dispute handled four ways, as architecture:
- Single call: documents go in, a draft comes out. Nothing else runs. The human is the entire quality system.
- Workflow: application code controls the order. Each step is known in advance, and a failure stops at a step you can name.
- Agent loop: the model chooses the next permitted step, and code enforces the limits — budgets, allowed tools, and approval gates. The loop is the model’s; the guardrails are yours.
- Multi-agent: multiple model-driven roles coordinate under an orchestrator. The handoffs between roles are the new failure surface.
3. The worked example: calculating the $440 discrepancy
Take one concrete case and run it through all four levels. A supplier invoice claims 400 units delivered at $12.50 each. The receiving log shows 380 units, and the contract price changed to $12.00 last month. Work the arithmetic exactly, because this post teaches readers to use AI systems for invoice reconciliation — and the worked example must be right.
| Amount | Working | |
|---|---|---|
| Supplier invoice | $5,000 | 400 × $12.50 |
| Expected payable | $4,560 | 380 × $12.00 |
| Total discrepancy | $440 | $5,000 − $4,560 |
One valid breakdown of that $440:
- 20 undelivered units × $12.50 = $250
- 380 received units × $0.50 overcharge = $190
- $250 + $190 = $440
One more distinction matters before anything is finalized: a proposed discrepancy is not an approved credit. The $440 is what the arithmetic says. Before it becomes money, three things must be verified: the contract amendment’s effective date (was $12.00 actually in effect for this delivery?), the receiving evidence (is the 380 count confirmed, or is it itself disputed?), and existing credits (has part of this already been credited?). The approved credit may be less than $440 — and any system that skips those checks is not resolving disputes, it is manufacturing them.
4. One dispute, four approaches
| Level | What happens | What you get |
|---|---|---|
| Single call | The model reads the invoice, the receiving log, and the contract, and returns a structured verdict: short delivery of 20 units, price overcharge of $0.50, recommended action. | A fast classification and a draft reply. A human still checks it and sends it. |
| Workflow | A fixed chain: parse the invoice → match against the receiving log → look up the current contract price → compute the $440 discrepancy → draft the dispute note → queue it for review. | The same outcome, repeatable, with every step logged. If a document format changes, the chain breaks loudly at a known step. |
| Agent loop | The model decides what to check: it pulls the receiving log, notices the price mismatch, searches for the contract amendment, finds the credit-note policy, and drafts a resolution — asking a human only before sending anything to the supplier. | Handles the cases your chain did not anticipate — the missing credit note, the amended price — but its path varies run to run. |
| Multi-agent | An investigator agent gathers evidence, a resolver agent proposes the settlement, and a checker agent verifies the math and the policy citations before anything is drafted. | More thorough on paper — and three times the coordination, three times the cost, and a failure mode in every handoff. |
Notice that the outcome is the same in all four rows: a resolved or escalated dispute with evidence. What differs is who owned the path, how much it cost, and how hard it is to explain afterward. That is the whole decision in one table.
5. Why deterministic code still matters
Here is the principle beginners most often miss: an AI agent does not need to perform every step itself. Even in an agentic architecture, the steps that must be exact, permissioned, or financially binding should stay in deterministic, auditable systems. The model reasons where reasoning helps; code decides where correctness matters.
| Task | Recommended owner | Why |
|---|---|---|
| Extract invoice fields | Parser or document extraction model | Structured extraction |
| Validate invoice schema | Application code | Deterministic rules |
| Calculate $440 discrepancy | Application code | Exact arithmetic |
| Retrieve contract amendment | Authorized search/tool | Current source of truth |
| Explain conflicting evidence | LLM, when useful | Interpretation |
| Draft supplier response | LLM | Language generation |
| Approve credit or payment | Authorized human/system policy | Financial control |
Read that table as an architecture rule: the model should touch the steps where judgment is the bottleneck, and stay away from the steps where exactness is the requirement. An agent that computes money in prose is a bug waiting for an auditor. An agent that drafts the explanation of a discrepancy computed by code is a genuinely useful colleague.
6. Memory: three separate concepts
People choose agents for flexibility and then discover the real architectural question was memory. But memory is not one thing, and it is not a property of the architecture — it is an application design decision. A deterministic workflow can store past dispute history. An agent can be stateless between runs. A single LLM call can receive previously retrieved history as context. Teach three separate concepts:
- Context is information supplied to the model for the current call: the invoice, the log, the contract excerpt, and any history you choose to include. Every level has it. It is also the most expensive memory, because it is re-read (and re-paid for) on every call.
- Durable state is records, checkpoints, and outcomes stored by the application: past disputes, their resolutions, and what was approved. Any architecture can keep it; the question is what you store and who can change it.
- Retrievable knowledge is policies, contracts, and historical records fetched when needed. This is where RAG Systems End-to-End earns its keep — an agent that cannot retrieve the current contract price will confidently resolve disputes against last year’s price.
Whatever you store, stored facts need four disciplines:
- Provenance: where did this fact come from — a verified contract, or a supplier email?
- Access controls: who can read it, and who can write or change it?
- Retention rules: how long does it live, and when is it deleted?
- Freshness checks: is it still true? A policy remembered from last quarter, applied with full confidence today, is the stale-memory failure. A supplier claim stored as fact and reused in later runs is the poisoned-memory failure — untrusted content treated as authority. See Guardrails, Approvals & Audit.
The practical rule: persist as little as possible, and version what you persist. If a workflow solves the problem without durable memory, that is not a limitation — it is one fewer failure mode.
7. How each level breaks
| Level | How it breaks | What saves you |
|---|---|---|
| Single call | Cannot recover from a bad input, cannot check a fact, cannot use a tool. One shot, one verdict. | Structured output with validation (Structured Output: JSON You Can Trust), and a human in the loop for anything that matters. |
| Workflow | Brittle when inputs vary: a new document format, an unexpected field, and the chain stops at a step nobody owns. | Explicit failure handling per step, and a human-escalation path for the cases the chain cannot parse. |
| Agent loop | Loops that never terminate, tools called with wrong arguments, confident wandering, and cost that grows with every extra step. | Step and cost budgets, timeouts, dry-run previews before side effects, and approval gates — all covered in Tool Calling & Agentic Workflows. |
| Multi-agent | Coordination failures: handoffs that drop context, agents that disagree, and debugging that requires reconstructing three trajectories instead of one. | Usually, not building it. When you must, give each agent one job, log every handoff, and eval the handoffs themselves — not just the final answer. |
Do not confuse autonomy with intelligence
- An agent that loops for 40 steps is not smarter than a workflow that finishes in 4 — it is more expensive and harder to explain.
- “It handled a case we didn’t anticipate” is a point in favor of agents only if that case recurs. One surprising success is an anecdote, not an architecture.
- Multi-agent is not “agents, but better.” It is agents, with coordination costs. Default to one agent; earn the second one with evidence.
8. Choose with an eval, not an opinion
The RAG post’s rule applies here word for word: test, don’t assume. Before granting autonomy, run the same cases through the levels you are choosing between and measure what actually differs. The table below is illustrative — a teaching example showing the shape of such an eval, not measured results. A real pilot needs a held-out case set, ambiguous cases, and refusal/uncertain cases scored explicitly, not just the easy wins.
First, define the metrics so the categories cannot overlap. Every case lands in exactly one of three buckets: correctly resolved without human help, incorrectly resolved, or escalated to a human. The three buckets sum to 30 in every column. “Human interventions” is then derived, not separately counted: escalations plus incorrect resolutions that a human had to fix. The safety rows below are subsets or separate events, and are labeled as such.
| Measure (30 dispute cases, illustrative) | Single call | Workflow | Agent loop |
|---|---|---|---|
| Cases attempted autonomously | 30 | 30 | 30 |
| Correctly resolved, no human help | 18 | 24 | 25 |
| Incorrectly resolved | 3 | 1 | 2 |
| Escalated to a human | 9 | 5 | 3 |
| Human interventions (escalations + corrections) | 12 | 6 | 5 |
| Incorrect financial amount (subset of incorrect) | 2 | 0 | 1 |
| Unauthorized side-effect attempts, blocked by gate | 0 | 0 | 1 |
| Unsupported policy citations (subset of incorrect) | 3 | 1 | 2 |
| Recovered from missing/conflicting documents | 2 | 6 | 9 |
| Avg latency (illustrative) | 4s | 9s | 38s |
| p95 latency (illustrative) | 8s | 15s | 95s |
| Cost per case (relative) | 1× | 1.4× | 4× |
Read that table the way a buyer should, not the way a vendor would. The agent correctly resolves the most cases (25) and recovers best from messy documents (9) — and costs roughly four times as much per case, with the worst p95 latency and one unauthorized side-effect attempt that only the approval gate caught. Whether that trade is good depends on what a human hour costs you and what an incorrect resolution costs you. But one thing is not a trade at all: an incorrect resolution is never acceptable simply because human hours are expensive. Financial actions get hard safety gates — verification plus approval, every time — regardless of what the averages say. Some actions are not cost-benefit decisions; they are boundaries.
9. The approval boundary, concretely
“Human in the loop” is too vague for financial work. Here is what the boundary actually looks like. The agent proposes — it never executes:
{
"invoice_id": "INV-1042",
"proposed_dispute_amount": 440.00,
"currency": "USD",
"reason": "Quantity and contract-price mismatch",
"action": "DRAFT_DISPUTE",
"requires_approval": true
}
The full boundary, in order:
- The agent proposes the action. The proposal above is the most it can do on its own.
- Application code independently verifies the amount and supporting records. It recomputes the $440 from the invoice, the receiving log, and the current contract — it does not trust the agent’s arithmetic.
- An authorized reviewer approves the exact proposed action. Not “approve disputes in general” — this invoice, this amount, this action.
- The system checks that the approved payload has not changed. If anything differs between approval and execution, execution stops.
- An authorized service executes the approved action once and records the outcome. Once, not retry-until-it-works. The record is what makes the whole thing auditable.
Notice what this protects: the agent’s judgment is used where it helps (interpreting the mess), and it is fenced off from where it harms (moving money). That fence — proposal, independent verification, exact approval, unchanged payload, single audited execution — is the difference between “we have a human in the loop” and “we can prove what happened.”
10. The decision sequence
The old flowchart was too decisive: a task needing tools does not automatically need an agent — a fixed workflow can call APIs, and a single model call can use pre-fetched data. Ask in this order, and stop at the first “yes”:
Two exits deserve emphasis. First, “workflow + human checkpoints” is not a compromise for the timid — it is the right answer for most money-moving work, because it keeps the model’s flexibility inside a path a human can audit. Second, the multi-agent exit requires proof: an eval showing that one agent measurably fails where two succeed. “It feels more scalable” is not proof.
11. When not to build an agent
Do not build an agent when…
- A deterministic path already exists. If you can write the steps down, write them down — in code, not in a prompt.
- The inputs barely vary. Agents earn their keep on variation; on uniform input they are an expensive way to run a script.
- A wrong step is expensive and hard to reverse. Sending money, changing a contract, notifying a customer — these want approvals and audit trails, not autonomy.
- A human review is cheap and fast. If a person can check the output in thirty seconds, the agent’s autonomy buys you little and costs you explainability.
- You cannot eval it. If you have no held-out cases and no way to score trajectories, you are not choosing an architecture — you are guessing in production.
12. Production details, in one place
If the sequence lands you on the agent loop, these are the non-negotiables — each one links to the lesson that teaches it properly:
- Approvals before side effects. No agent sends, pays, or commits without a human-approved action snapshot. See Guardrails, Approvals & Audit.
- Budgets, timeouts, dry-run. Cap steps and cost per run, bound every tool call, and preview destructive actions before executing them. See Tool Calling & Agentic Workflows.
- Audit everything. Log the trajectory — every tool call, every observation, every decision — or you cannot debug, explain, or defend a single run. See Evals & Tracing.
- Facts come from retrieval, not memory. Contract prices, policies, and supplier histories are reads from a current source, not things the model remembers. See RAG Systems End-to-End and RAG vs Fine-Tuning vs Prompt Engineering.
- Structured output at every boundary. Tool arguments, verdicts, and handoffs are schemas, not prose. See Structured Output: JSON You Can Trust and Calling LLM APIs in Production.
- Version the system, not just the prompt. Tools, prompts, and retrieval sources change independently — record all three per run, or your evals stop being comparable.
Later, not now
- Multi-agent orchestration patterns in depth — earn this post with an eval that proves one agent insufficient.
- Voice and real-time agents — same decision framework, different latency and interruption constraints.
13. The principle
Every lesson on this site carries one principle. This one’s is the lede, because it is the whole post in a sentence:
Give the model the least autonomy that solves the problem. Autonomy is not a virtue. It is a budget: you spend it where variation demands it, and you save it everywhere else, because every unit of autonomy you grant is a unit of debuggability you surrender.
Field check
- Take one task you are considering for an agent. Write down its path as a workflow, step by step. If you can write it completely, you just saved yourself an agent — build the workflow.
- Run the same 20–30 cases through two levels of autonomy and score them on resolution rate, errors, interventions, and cost. Let the table choose, not the demo.
- Find the most expensive error your agent could make. Put an approval gate and an audit trail on exactly that action before you ship anything else.
- Ask what the agent remembers between runs, and who can change or delete it. If nobody can answer that, you have a memory design to do before you have an agent to ship.
Try it yourself
Before reading the worked solution, try this one on your own. A second supplier invoice claims 250 units at $9.80 each. The receiving log shows 240 units, and the contract price is $9.50. Your tasks:
- Calculate the discrepancy, with the breakdown.
- Select an architecture from section 1, and justify the choice.
- Identify the approval boundary: what gets proposed, verified, approved, and executed — and by whom.
Worked solution
Invoice total: 250 × $9.80 = $2,450. Expected payable: 240 × $9.50 = $2,280. Discrepancy: $2,450 − $2,280 = $170. Breakdown: 10 undelivered units × $9.80 = $98, plus 240 received units × $0.30 overcharge = $72; $98 + $72 = $170.
Recommended architecture: workflow + human checkpoint. The calculation is exact arithmetic, the path is stable (parse → match → calculate → draft → review), and money moves at the end — so the workflow computes, drafts, and queues for approval, and a human approves the exact $170 proposal before anything is sent. An agent loop is justified only if invoice formats or supplier terms vary so widely that the fixed chain keeps breaking — and that needs eval evidence, not a hunch.
Approval boundary: the workflow proposes DRAFT_DISPUTE for $170; application code independently recomputes the $170 and checks the contract price and receiving log; an authorized reviewer approves that exact proposal; the system verifies the payload is unchanged; an authorized service sends the dispute once and records the outcome.
Is multi-agent the future, and am I falling behind by not building it?
No — and this is worth saying plainly, because the hype suggests otherwise. Multi-agent is not automatically the future, nor automatically the best choice. It is a tool for a specific shape of problem: work that genuinely decomposes into independent specialties with clean handoffs, where one agent measurably fails. Most production agent work today is a single loop with good tools, good retrieval, and strict approvals. Falling behind looks like shipping no agent at all when a workflow would do, not like shipping one agent instead of three. If a future problem proves the need, the eval will show it — that is what the eval is for.
Can I start with a workflow and upgrade to an agent later?
Yes, and that is the recommended path. A workflow gives you the case set, the eval harness, the tool contracts, and the approval gates — everything an agent needs except the loop itself. When the workflow starts failing on cases it cannot anticipate, and your eval shows those cases recurring, you have both the evidence and the infrastructure to grant autonomy safely. Upgrading from a workflow is a small step; downgrading from a failed agent is a rewrite.
How do I eval an agent, not just its final answer?
Score the trajectory, not just the outcome. Record every tool call and observation, then check: did it call the right tools, in a sensible order, with valid arguments? Did it stop when it had enough evidence, or keep going? Did it ask for approval before the irreversible step? A correct final answer reached by luck — wrong tools, ignored evidence, skipped approval — is a failure your eval must catch, because it will not reproduce. That is why tracing is listed as a production non-negotiable in section 12, not as an afterthought.
Comments
Post a Comment