Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The Unplanned Agent

Why would anyone want to develop an agent?

Ask it honestly and there is a good answer, and several bad ones dressed up to look like it. The Unplanned Agent is what you get from the bad ones.

What an agent is

An agent is a loop. The model looks at the situation, chooses a step, takes it, looks at the result, and chooses again. A chat answers you. An agent acts, then decides what to do next from what happened.

That’s all an agent is.

The good reason

An agent earns its keep when the path can’t be known in advance, but the goal and the check can.

Fixing a failing build is the classic case. Nobody can script “read the error, find the cause, change the right file,” because each step depends on what the last one turned up. But people can usually say what done looks like: the tests pass.

I once asked my own agent to find the “single source of truth” in an old workspace of mine. I couldn’t have written its steps down beforehand: search the files, read a README, find a second file claiming the same title, follow the imports to a library in another repository. A dozen steps, each chosen from the one before. But the question was narrow, the stopping point was clear, and I could check the answer. That’s a planned agent.

The rule

  • If you can write the steps down, write a script. It’s cheaper, it does the same thing every time, and it doesn’t bill by the token.
  • If you can write the goal and the check but not the steps, an agent may be worth it.
  • If you can’t write the goal or the check, you don’t need an agent yet. You need rule 1.

Some tasks given to agents could have been a script.

The bad reasons

To avoid writing the spec. “The agent will figure it out.” It will figure out something. Whatever the spec doesn’t say, the agent guesses, and then builds on the guess.

Because it demos well. Watching an agent work feels like progress. Files open, commands run, text scrolls by. Tokens are billed the whole time, and the bill measures activity, not progress.

Because a script felt beneath the project.

To reduce head count. This one gets its own section.

The head count pitch

The pitch is “AI will reduce your head count.” It’s sold to executives, it’s sold hard, and it leaves out the costs that come later.

Here is what the pitch leaves out. An agent removes typing. It does not remove judgment. Every system has exceptions, and people often manage the exceptions: the clerk who knows which orders to hold, the analyst who knows why a field exists. Cut them, and the agent keeps running, still confident, with nobody left who can tell it it’s wrong.

The cost doesn’t disappear either. It moves, from salaries to tokens and from tokens to rework. And when the people leave, what they knew leaves with them, and a model can’t recover what was never written down. A legacy system is hard to replace because its reasons were never written down. Letting go of the people who remember those reasons makes the next project harder still.

That isn’t an argument that nothing changes. Drafting gets cheaper, and a team can do more. But “the same people do more, and better” is a different promise from “fewer people,” and only one of them comes true often enough to plan on.

Per-token billing rewards volume: the more an agent reads, calls and re-sends, the more is billed. The discipline has to come from you.

Paying for I/O

In my experience the valuable insights are short. The bill measures the only thing it can measure: tokens in and tokens out. You are paying for I/O.

An insight is a sentence or two. What costs money is the reading, the tool calls, and the history re-sent on every step (see the chart in “Spending Tokens Wisely”). An agent multiplies all of it. An agent with a clear question spends its I/O getting to the insight, and then stops. An agent without one spends I/O as its product.

The Unplanned Agent

Put the bad reasons together and you get the Unplanned Agent: an agent turned loose with a goal and nothing else. No spec, no budget, no stopping rule, no reviewer. “Go modernize billing.”

It breaks all five considerations at once:

  1. No spec, so it guesses, and builds on its guesses.
  2. It doesn’t ask, so it invents the business rules, plausibly and well.
  3. No tests, so nothing checks what it did.
  4. No gate, so it builds before anyone has blessed anything.
  5. No stopping rule, so when it circles, it keeps circling, and every round is billed.

Two more wastes belong to agents in particular:

  • Feeding it the churn. Every file, every old chat, the whole repository “for context.” It often costs more and works worse, and the agent re-sends all of it on every step.
  • Reviewing its own work. The agent that did the work is also the one reporting that the work is done.

What to expect

From the machine. Expect an agent to act on whatever it’s given and to keep acting until something stops it. Expect it to report success fluently. Don’t expect it to notice that the question was wrong.

From your people. Expect them to write the goal and the check before the agent starts, and to read the result when it stops. Expect the exceptions to stay with them.

What to expect. A planned agent usually costs little and answers one question. An unplanned one can cost a lot and answers whatever it decided the question was. And the head count promise gets paid for later, by the people who are left.

In short

Write the goal and the check first. If you can’t, you don’t need an agent yet. You need a spec.

Divider: star and jewels. A thin horizontal band. A gold line with a dashed turquoise line above and below fades out toward both ends. At the centre is an eight-point gold star between two ruby and two turquoise jewels.