Agent patterns, and how each one fails.
Three shapes that cover most of what people mean by “an AI agent”. The pattern is the easy part. The failure mode next to each one is what decides whether it reaches production.
Engineering notes · internalThese are public, documented patterns, described in our own words. Nothing here is a measured result, so nothing here carries a number. When we publish a measurement, we will say what we ran and you will be able to re-run it.
The ReAct loop
Think, act, check, decide. Repeat until the goal is met or the budget runs out.
Not done: repeat
- Think. Reason about the goal and choose one next step.
- Act. Call a tool. One call, not a plan of ten.
- Check. Read the result and note what actually changed.
- Decide. Goal met, budget spent, or go round again.
The next step genuinely depends on the previous result. If it does not, you want a fixed sequence and it will be cheaper and more reliable.
Router
Classify the request once, then send it to whatever handles that kind of work.
Not confident: a human
- Request. Arrives in whatever words the person used.
- Classify. Cheap and fast. Small model or plain rules.
- Dispatch. Hand to the handler for that kind of work.
- Fallback. No confident class means a human, not a guess.
Requests fall into a handful of recognisable kinds that need different skills. The fallback branch is not optional: without it, every unclassifiable request becomes a wrong answer.
Evaluator loop
Generate, judge against a written rule, revise. Stop after a fixed number of rounds.
Failed the gate: revise
- Generate. Produce a first draft from the task.
- Evaluate. Score against criteria written in advance.
- Revise. Feed the failure back, not just the score.
- Cap. Hard round limit, then escalate to a human.
Output quality is checkable against a rule you can write down. If you cannot write the rule, the evaluator has nothing to evaluate and you are paying twice for the same guess.