- Day 31: Give an agent an outcome, a boundary and a stop condition first
- Day 32: Agent behavior is a loop, not a prompt
- Day 33: Plan before acting when actions cost money or carry risk
- Day 34: Tool access is where AI becomes operational risk
- Day 35: Agent memory is several stores, each with its own rules
- Day 36: Reflection is worth it only when it changes the next action
A workflow follows your steps. An agent pursues your goal. That difference sounds philosophical right up until you have to write the goal down.
Because the goal you hand an agent is a specification, and it gets executed with a compiler's literalism. Underspecify it and the agent fills the gaps with whatever best satisfies the words you actually used.
Three things that have to be written down
The first is success criteria a machine can check. "Improve the report" is a hope with nothing to check against. "Every section contains current-quarter figures, each with a cited source" is checkable, by the agent and by you. If success can only be assessed by a human squinting at the output, you have delegated a vibe.
The second is boundaries, enforced outside the prompt. What it may spend, which systems it may touch, what it must never modify. These belong in credentials and runtime limits, not in a politely worded instruction. More on that distinction in the guardrails post.
The third is stop conditions: done, blocked, out of budget, and the fourth one everyone forgets: looping. An agent repeating the same failing approach will do so cheerfully until something external intervenes.
if risk == "high":
escalate_to_human()
elif retries > 2:
stop_with_reason("retry budget exceeded")
elif evidence_quality < threshold:
ask_for_more_context()
elif tool_budget.remaining == 0:
stop_with_reason("tool budget exhausted")
else:
continue_workflow()The code bounds the action and gives an explicit reason for each stop.
The price is more early stops and escalations than an unbounded agent produces, so count them per condition. One that fires constantly is mis-set or pointing at a real defect; one that has never fired has never been tested.
The review exercise worth stealing
Hand your goal specification to a colleague and ask them a single question: what would a malicious-but-compliant reading of this do?
Leave "what should it do" aside and ask what it could do while technically satisfying every word you wrote. That reading is available to the agent too, and it is the one you will meet in production when the inputs stop resembling your test cases.
The answers are usually uncomfortable and always cheap to fix at this stage. "Reduce open ticket count" is satisfied by closing tickets without resolving them. "Maximise response quality" is satisfied by taking forty minutes and thirty tool calls per request.
Vague goals produce confident agents doing the wrong thing efficiently. The first run usually looks impressive, which is precisely what delays the discovery.
Write down what success means for your agent precisely enough that a stranger could verify it. Until you can, keep a human approving its output.
Terms in this piece
About this explainer
- Format
- Explainer
- Level
- Practitioner
- Read
- 2 min read
- Published
- Jun 21, 2026
- Disciplines
Short mental models: one idea, why it matters, what to do about it.
More on these topics
Comparison · · 8 min read
Direct APIs, MCP tools and Code Mode: three ways an agent reaches your systems
How I choose between hand-written tools, MCP tool calls and Code Mode by where the plan runs, and why I built codemcp to test it.
Decision note · · 2 min read
We built our own TypeScript orchestrator, and stayed on it
Why our enterprise AI platform runs agents on a TypeScript execution layer we started almost two years ago, and why reaching near-parity with the frameworks argued for staying.
Comparison · · 1 min read
LangGraph vs writing the agent loop yourself
Two ways to write the same supervisor, an explicit state graph or a loop your own code owns on the model API. Compared on control flow, tracing, testing, checkpointing and what each makes hard.
Discussion