The agent reflection pattern is a design in which an AI agent reviews its own output, finds the flaws in it, and improves it before delivering a final answer. Instead of producing one draft and stopping, the agent works in a loop: generate, critique, revise, and repeat until the result meets a defined standard. The central question is whether this extra work is worth it. The answer is yes, whenever the cost of a wrong answer is higher than the cost of a second pass.
Reflection is familiar from human work. A writer drafts, rereads, and edits. A programmer writes code, tests it, and fixes what fails. The pattern gives agents the same habit: a deliberate pause between producing something and standing behind it, where many of the errors that slip through single-pass generation get caught.
Key takeaways
- The agent reflection pattern adds a review-and-revise loop after an agent produces a draft.
- Reflection catches factual slips and missing requirements before the user sees them.
- Self-critique, external critique and tool-based checks are the three main forms.
- Reflection is worth the extra cost when a wrong answer is expensive.
- Always set a stopping rule, or the loop can run longer than the work is worth.
What is the agent reflection pattern?
The agent reflection pattern separates the job of producing an answer from the job of judging it. In its simplest form, one pass generates a draft, and then a second pass reviews that draft against a set of criteria: Is it accurate? Does it answer the question asked? Does it follow the required format? Are there gaps, contradictions or unsupported claims? The reviewer then produces feedback, and the generator revises the draft in light of that feedback.
The pattern borrows its name from a familiar idea in human thinking. Metacognition, thinking about your own thinking, is what lets a person notice they have misunderstood a question before they answer it. Reflection gives an agent a structured version of that ability.
Reflection is not the same as simply asking the agent to try again. A retry repeats the same process and often repeats the same mistake. Reflection changes the process: the review step brings new information, in the form of a critique, that the revision step can act on.
There is also a useful distinction between reflection and verification. Verification checks a result against an outside source of truth, such as running code or querying a database. Reflection checks a result against criteria the agent itself can apply, such as consistency, completeness and adherence to instructions. The two complement each other, and the strongest designs use both.
Why reflection improves agent output
The first reason reflection works is that generation and criticism use different skills. Producing a fluent answer is one task; spotting that the answer missed a requirement or contradicted itself is another.
The second reason is that reflection gives errors a place to be caught before they reach the user. Most agent failures are not dramatic; they are small slips, a wrong figure, a missed constraint, a step skipped. A review pass reads the result carefully by design, while there is still time to fix the problem.
The third reason is that reflection creates a record of what was wrong and how it was fixed. That record is useful for debugging, because it shows which kinds of errors the agent makes repeatedly.
The three main forms of reflection
Reflection can be organised in several ways, and the differences matter. The form you choose decides who does the reviewing, what the review can catch, and how much the loop costs.
Self-critique
In self-critique, the same agent reviews its own draft. It is the cheapest form, because it needs no extra components, and it is easy to add to an existing agent: after generating, prompt the agent to critique its own work against a checklist, then revise. Best for: quick quality passes on drafts, summaries and writing where the criteria are clear and checkable.
The weakness of self-critique is shared blind spots. An agent that misunderstood the task while generating is likely to misunderstand it while reviewing, and an agent that invented a fact is unlikely to notice it invented it.
Critic agent
In the critic-agent form, a separate agent, often with different instructions or a different focus, reviews the draft. The critic might specialise in factual accuracy, or in checking that every requirement was covered. Because the critic starts from the draft rather than from the generation process, it is less likely to share the generator’s blind spots. Best for: high-stakes outputs, factual content, and work where an independent check is worth the extra cost.
The critic pattern is a close relative of the multi-agent designs in our guide to AI agent design patterns that hold up in production. The added cost is real: every review round consumes time and context, so reserve the critic for outputs where quality matters more than speed.
Tool-based checking
In tool-based checking, the review is done by tools rather than by language: code is executed, calculations are recomputed, or claims are looked up in a database. This form catches errors that no amount of re-reading would find, because the check is grounded in something outside the agent’s own text. Best for: code, arithmetic, structured data and any output that can be tested mechanically.
Tool-based checking is the most reliable form, but it only works where a mechanical test exists. For open-ended writing, judgement and taste, there is no tool to run, and language-based review remains the only option.
Comparing the three forms
| Form | Who reviews | Main strength | Main weakness |
|---|---|---|---|
| Self-critique | The generating agent itself | Cheap and easy to add | Shares the generator’s blind spots |
| Critic agent | A separate reviewing agent | Independent judgement | Costs extra time and context |
| Tool-based checking | Code, tests or lookups | Grounded in external truth | Only works where a test exists |
Most production systems combine forms. A coding agent might run its code through a test suite, then have a critic agent review the result for clarity and completeness, then do a final self-critique pass on style. Each form catches a different class of error.

How to build a reflection loop
Start by defining the review criteria before you write the loop. What counts as a good result? List the qualities the reviewer should check: accuracy, completeness, format, tone, and any constraints from the original request. Vague criteria produce vague reviews, so write them as questions the reviewer can answer yes or no to.
Next, decide what the reviewer produces. The most useful output is a short, specific list of issues, each with a location and a suggested fix. A review that says “this could be better” gives the reviser nothing to act on. A review that says “the third paragraph contradicts the figure in the second paragraph” gives the reviser a concrete job.
Then set the stopping rule. A reflection loop without a stopping rule can revise forever, polishing a draft that was already good enough. Common rules are a fixed number of rounds, stopping when the reviewer finds no issues, or stopping when the changes between rounds become trivial. Two or three rounds are usually enough.
Finally, decide what happens when the loop cannot fix the problem. Some drafts are wrong at the level of the plan, not the wording, and no amount of revision will save them. When the reviewer keeps finding the same class of problem, stop the loop, discard the draft and revisit the plan or the instructions. For more on handling failures gracefully, see our guide to AI agent failure recovery.
When reflection is worth the cost
Reflection costs time, tokens and latency, so it is not free. The question is whether the improvement is worth that cost, and the answer depends on what is at stake. A short chat reply probably does not need a reflection loop. A report that will be sent to a client, code that will run in production, or an answer that a decision will rest on almost certainly does.
A useful rule is to reflect in proportion to the cost of being wrong. If an error would be embarrassing, expensive or hard to undo, add review rounds. If an error would be trivial to spot and cheap to fix, a single pass is fine.
Reflection also pays off most where errors are common. Tasks with long outputs, many constraints or unfamiliar subject matter produce more slips, and therefore benefit more from a review pass. Short, simple, familiar tasks produce fewer errors, and the review finds little to fix.
Common reflection mistakes
The most common mistake is reviewing without criteria. A reviewer told only to “check this” will praise the draft, nitpick the wording, or invent problems that are not there. Give the reviewer a concrete checklist drawn from the original requirements, and the review becomes a test rather than an opinion.
The second mistake is letting the reviewer rewrite instead of critique. When the reviewer produces a new draft rather than a list of issues, you lose the record of what was wrong, and you cannot tell whether the revision actually fixed the problems. Keep the roles separate: the reviewer finds problems, the generator fixes them.
The third mistake is ignoring the stopping rule. Without one, loops run until they hit a timeout or a budget limit, and the final revision is often worse than an earlier one, because the agent keeps changing things that were already fine.
Reflection checklist
- Review criteria are written as specific yes-or-no questions drawn from the original requirements.
- The reviewer produces a concrete list of issues, each with a location and a suggested fix.
- The reviewer critiques; it does not silently rewrite the draft.
- A stopping rule is set: a maximum number of rounds, or stop when no issues remain.
- Tool-based checks run first wherever a mechanical test exists.
- A separate critic agent is used for high-stakes outputs, not for every reply.
- Repeated failures of the same kind trigger a rethink of the plan, not another revision round.
- Reflection strength matches the cost of being wrong, not a fixed habit.
Frequently asked questions
Does reflection make agents slower?
Yes, each review round adds latency and cost. You pay more time and tokens in exchange for fewer errors. For low-stakes replies the trade is rarely worth it; for high-stakes outputs it usually is.
Can reflection fix hallucinations?
Partly. Reflection catches contradictions, unsupported claims and reasoning errors, which covers many hallucinations. It cannot catch a confidently stated falsehood that is internally consistent, because the reviewer has no outside source to check it against. Tool-based verification is needed for those cases.
How many reflection rounds are enough?
Two or three rounds are usually enough for most tasks. The first round catches the obvious errors, the second catches subtler ones, and by the third the changes are usually cosmetic. If the reviewer still finds serious issues after three rounds, the plan or the instructions probably need work.
Is reflection the same as chain-of-thought reasoning?
No. Chain-of-thought is reasoning that happens while the agent produces its answer, step by step. Reflection happens after a draft exists: the agent looks back at what it produced and judges it.
Should the critic be a different model?
It can help, because a different model brings different blind spots, but it is not required. A separate agent with different instructions, even on the same model, already gives you much of the benefit.
Does reflection help with tool use?
Yes. A reflection step can check whether the agent called the right tools, used their results correctly and handled errors sensibly. This is one of the most reliable uses of the pattern, because tool calls leave a trace that is easy to review. Our guide to AI agent observability explains how to keep that trace visible.







