Lesson 5 · Module 4: Agentic Systems: Manager and Worker Agents
Review loops: a checker agent that approves or sends work back
- How a review loop works
- How to write a checklist the checker follows
- How to stop loops safely with round limits
Why this matters
An agent that writes customer-facing work can make mistakes that no one notices until the customer does. A single wrong total on an invoice can mean an apology, a corrected invoice, and lost trust. This lesson shows how to place a checker agent between the draft and the customer, so that weak work is sent back with specific notes and only sound work goes out.
Key ideas
Review loop. A writer agent produces a draft, a checker agent gives a verdict, and the loop either sends the work out or returns it with notes for another try.
Rubric. A rubric is a short grading sheet the checker follows, so every draft is judged on the same points. Hard facts such as totals are best checked by code, because code gives the same answer every time.
Structured verdict. The checker replies in a fixed shape rather than a paragraph, so the workflow can branch on it. For example:
{"verdict": "revise", "issues": [{"field": "total", "fix": "set total to 120"}]}
Here 3 x 40 = 120, so the draft's total of 140 is rejected and the fix tells the writer exactly what to change.
Round limit. Every loop stops after a fixed number of tries, usually three. If the draft still fails, it goes to a human instead of circling forever and using up budget.
Independent checker. The checker should use a different prompt from the writer, and ideally a different model, so it does not repeat the writer's blind spots. It judges the draft but never rewrites it.
Try it before you watch
An invoice draft says the total is 150, but the order is 4 items at 35 each. Should the checker approve it, and what should its note say?
Show answerHide answer
No. 4 x 35 = 140, so the checker should send it back with a note such as "set total to 140." It shows that a rubric check against a hard fact catches the slip and gives the writer one exact fix.
Words to know
- Agent: an AI model that can take actions, such as writing text or calling a tool, to finish a task.
- Rubric: a grading sheet listing the points every piece of work is judged against.
- Verdict: the checker's decision, either approve or revise.
- Round limit: a maximum number of tries a loop is allowed before it stops and hands off.
- Deterministic: giving the same answer every time for the same input, like a calculator.
- JSON: a plain text format that stores data in named fields, which software can read reliably.
What to watch for
- How the checker's verdict decides whether the draft goes out or returns to the writer.
- The example in the Python loop: notice how the writer only changes the total when the notes ask it to.
- The round counter, and what happens when the loop reaches its third round without approval.
Learn it with your tutor on the live board
Key points from the video
The invoice nobody checked
- A client orders 3 candle sets at $40 each
- The agent sends an invoice for $140
- Nothing stood between the draft and the client
layout: full
parts:
writer: {chip: Writer agent, sub: "drafts invoices", icon: pen-line}
invoice: {chat: "Invoice for Lina"}
steps:
- at: "handles invoices"
note: "your shop's invoices"
- at: "sent her an invoice"
send: invoice
- at: "Nobody looked at it"
highlight: writer
- at: "writing an apology"
note: "an apology and a cleanup"
- at: "wasn't broken"
note: "a slip, not a fault"
- at: "kind of slip"
note: "a common slip"
- at: "nothing stood between"
note: "nothing checked it"
- at: "a checker agent that approves"
note: "add a checker" What you will learn
- How a review loop works
- How to write a checklist the checker follows
- How to stop loops safely with round limits
layout: full
parts:
review: {chip: Review loop}
checklist: {chip: Checklist}
limit: {chip: Round limits}
goals: {box: Three skills, holds: [review, checklist, limit]}
steps:
- at: "three things"
note: "three skills to learn"
- at: "First, explain how"
highlight: review
- at: "Second, write a clear checklist"
highlight: checklist
- at: "Third, stop loops safely"
highlight: limit
- at: "invoices and customer replies"
zoom_out: goals The review loop
- Writer agent produces a draft
- Checker agent gives a verdict
- Approved: send it. Rejected: notes go back
- A second reader catches different mistakes
layout: full
parts:
writer: {chip: "Writer drafts", icon: "pen-line"}
checker: {chip: "Checker reviews", icon: "search"}
verdict: {chip: "Approved?"}
loop: {box: "Review loop", holds: [writer, checker, verdict]}
steps:
- at: "A review loop is simple"
highlight: loop
- at: "writer agent produces a draft"
highlight: writer
- at: "checker agent reads that draft"
highlight: checker
- at: "gives a verdict"
highlight: verdict
- at: "the reply goes out"
note: "Approved: reply goes out"
- at: "sends it back with specific notes"
highlight: checker
note: "Rejected: notes go back"
- at: "tries again using those notes"
highlight: writer
- at: "ask the writer to be more careful"
highlight: writer
- at: "same blind spots that caused the mistake"
note: "same blind spots"
- at: "A second reader with a different job"
highlight: checker The checker needs a rubric
- Facts: total equals quantity times price
- Completeness: due date and payment link
- Tone: polite, in your brand voice
- Rules: no discounts you never approved
layout: side
objects:
q: {text: "What does it check?", pos: [0, 3.2]}
rubric: {text: "Rubric", pos: [0, 2.2]}
formula: {tex: 'total = quantity \times price', pos: [0, 1.0]}
c1: {text: "Facts", pos: [0, 0.0]}
c2: {text: "Completeness", pos: [0, -1.0]}
c3: {text: "Tone", pos: [0, -2.0]}
c4: {text: "Rules", pos: [0, -3.0]}
steps:
- at: "So what does the checker actually check"
show: q
- at: "It follows a rubric"
show: rubric
- at: "A rubric is just a grading sheet"
highlight: rubric
- at: "the checklist covers facts"
show: c1
- at: "does the total equal quantity times price"
show: formula
- at: "Completeness"
show: c2
- at: "Tone"
show: c3
- at: "And rules"
show: c4
- at: "Without a rubric"
hide: [q, rubric, formula, c1, c2, c3, c4]
- at: "With one, it works like an inspector"
show: [rubric, formula, c1, c2, c3, c4] One round, step by step
- Writer drafts an invoice
- Checker: three times forty, so reject
- Note: set the total to 120
- Corrects it, then approves
- Invoice goes to the outbox
layout: side
objects:
order: {tex: '3 \times 40', pos: [0, 2.4]}
eq: {tex: '3 \times 40 = 120', pos: [0, 2.4]}
draft: {tex: 'total = 140', pos: [0, 0.6], color: red}
fix: {tex: 'total = 120', pos: [0, 0.6], color: green}
ok: {text: "Approved", pos: [0, -1.2], color: green}
outbox: {text: "Outbox", pos: [0, -2.4]}
steps:
- at: "walk through one round"
show: order
- at: "three candle sets"
highlight: order
- at: "types a total of"
show: draft
- at: "the checker compares the draft"
highlight: draft
- at: "Three times forty"
morph: [order, eq]
- at: "reject the draft"
highlight: draft
- at: "The writer corrects it"
morph: [draft, fix]
- at: "approves"
show: ok
- at: "reach the outbox"
show: outbox
- at: "apology email"
highlight: ok Feedback the writer can act on
- Verdict is approve or revise, nothing else
- Every issue names a field, a problem and a fix
{
"verdict": "revise",
"issues": [
{"field": "total",
"problem": "3 x 40 is 120, not 140",
"fix": "set total to 120"}
]
} The loop in Python
order = {"client": "Lina", "qty": 3, "price": 40}
def writer(notes):
total = 140 # the slip from our story
if "fix total" in notes:
total = order["qty"] * order["price"]
draft = {"client": order["client"], "total": total}
if "add due date" in notes:
draft["due"] = "2026-10-16"
return draft
def checker(draft):
problems = []
if draft["total"] != order["qty"] * order["price"]:
problems.append("fix total")
if "due" not in draft:
problems.append("add due date")
return problems
notes = []
for round_no in range(1, 4):
draft = writer(notes)
notes = checker(draft)
print("Round", round_no, draft, notes or "APPROVED")
if not notes:
break
else:
print("Escalate to a human") Building it in n8n
- An If node reads the verdict field
- Approve goes on to the send-email node
- Revise loops back with the notes
- A Set node counts rounds, stops at 3 and alerts you
layout: full
parts:
ifnode: {chip: If node, sub: "reads the verdict"}
send: {chip: Send email, sub: "on approval"}
counter: {chip: Set node, sub: "counts rounds"}
flow: {box: n8n workflow, holds: [ifnode, send, counter]}
steps:
- at: "no-code tool like n8n"
note: "the same loop, as nodes"
- at: "an If node reads the verdict field"
highlight: ifnode
- at: "Approve goes on"
highlight: send
- at: "Revise loops back"
note: "revise loops back"
- at: "A Set node keeps a round counter"
highlight: counter
- at: "counter reaches three"
note: "stop at three"
- at: "sensible starting limit"
zoom_out: flow Make the checker independent
- Check hard facts in code first
- Leave judgement calls to the AI checker
- Different prompt, ideally a different model
- The checker judges, it never rewrites
layout: full
parts:
code: {chip: "Code checks", sub: "totals and dates"}
ai: {chip: "AI checks", sub: "tone and answer"}
verdict: {chip: "Both pass?"}
checker: {box: "Checker", holds: [code, ai, verdict]}
steps:
- at: "splitting its job"
note: "splitting its job"
- at: "checked in code first"
highlight: code
- at: "like a calculator"
note: "same answer every time"
- at: "The AI checker then handles"
highlight: ai
- at: "both checks pass"
highlight: verdict
- at: "a different model"
zoom_out: checker
- at: "approves the draft or sends back notes"
spokes: {of: verdict, items: ["Approve", "Send back notes"]}
- at: "never rewrites the draft itself"
note: "never rewrites" Common mistake: the rubber stamp
- Vague prompt: "check this invoice"
- Same agent grading its own work
- Fix: plant known errors in test drafts
- Tighten the rubric until it catches them all
layout: full
parts:
checker: {chip: Checker, sub: "approves everything", icon: stamp}
steps:
- at: "approves everything"
highlight: checker
- at: "prompt is vague"
note: "vague prompt or self-grading"
- at: "every run shows a green approved"
note: "always green"
- at: "just a rubber stamp"
highlight: checker
- at: "test the checker on purpose"
note: "test it on purpose"
- at: "Plant known errors"
spokes: {of: checker, items: [Wrong total, Missing due date, Made-up discount]}
- at: "count how many it catches"
note: "count the catches"
- at: "tighten the rubric"
highlight: checker
- at: "guards a real client"
note: "before a real client" Recap
- A checker approves or sends work back with notes
- A rubric, with hard facts checked in code
- A round limit, then a human takes over
layout: full
parts:
writer: {chip: Writer, sub: "drafts the work"}
checker: {chip: Checker, sub: "approves or returns"}
rubric: {chip: Rubric, sub: "facts in code"}
loop: {box: Review loop, holds: [writer, checker, rubric]}
limit: {chip: Round limit, sub: "then a human"}
shop: {box: Your shop, holds: [loop, limit]}
steps:
- at: "A review loop pairs a writer"
highlight: writer
- at: "approves the work or sends it back"
highlight: checker
- at: "works from a rubric"
highlight: rubric
- at: "needs a round limit"
zoom_out: loop
- at: "goes to a human"
zoom_out: shop
highlight: limit
- at: "happy to send yourself"
note: "send only what you'd approve" Your exercise
- Pick an appointment confirmation flow
- Write a rubric with at least 4 points
- Make 5 test drafts, plant errors in 3
- Record which errors your checker catches
layout: full
parts:
flow: {chip: Confirmation flow, sub: "appointments", icon: calendar-check}
rubric: {chip: Rubric, sub: "four points"}
drafts: {chip: Test drafts, sub: "plant errors"}
exercise: {box: Your exercise, holds: [flow, rubric, drafts]}
steps:
- at: "Pick an appointment confirmation flow"
highlight: flow
- at: "Write a checker rubric"
highlight: rubric
- at: "make five test drafts"
highlight: drafts
- at: "Run your checker on all five"
note: "record what it catches"
- at: "Bring your rubric and your results"
zoom_out: exercise Transcript
The invoice nobody checked. Picture this. Your agent team handles invoices for your small online shop. A client named Lina ordered three candle sets at forty dollars each, and the writer agent sent her an invoice for one hundred and forty dollars. Nobody looked at it before it went out. Now you, the owner, are writing an apology and fixing your books. The writer agent wasn't broken. It made the kind of slip people make too. The real problem was that nothing stood between the draft and the client. In this lesson we add that missing piece: a checker agent that approves good work and sends weak work back before any customer sees it.
What you will learn. By the end of this lesson you'll be able to do three things. First, explain how a review loop works, where one agent drafts and another approves the work or sends it back. Second, write a clear checklist that your checker agent follows, so its judgement is consistent instead of random. Third, stop loops safely, with a round limit and a handoff to a human, so two agents never argue forever and burn through your budget. We'll use invoices and customer replies from a small online shop the whole way through.
The review loop. A review loop is simple. The writer agent produces a draft, say a reply to a customer asking about delivery times. The checker agent reads that draft and gives a verdict. If it's approved, the reply goes out. If not, the checker sends it back with specific notes, like the order number is missing, and the writer tries again using those notes. So why not just ask the writer to be more careful? Because the writer judges its own work with the same blind spots that caused the mistake. A second reader with a different job catches what the first one misses, just like a colleague proofreading your email.
The checker needs a rubric. So what does the checker actually check? It follows a rubric. A rubric is just a grading sheet, like the marking scheme a teacher uses, so every draft is judged against the same points. For an invoice, the checklist covers facts: does the total equal quantity times price? Completeness: is there a due date and a payment link? Tone: is it polite and in your brand voice? And rules: did the agent invent a discount you never approved? Without a rubric, the checker just says looks good. With one, it works like an inspector going down a list, point by point.
One round, step by step. Let's walk through one round slowly. At the first station, the writer receives Lina's order: three candle sets at forty dollars each. It drafts an invoice but types a total of one hundred and forty. Next, the checker compares the draft against the order and its rubric. Three times forty is one hundred and twenty, so it will reject the draft with a note: set the total to one hundred and twenty. The writer corrects it, and the checker reviews again and approves. Only then does the invoice reach the outbox, ready to send to Lina. One extra round, a few cents of model cost, and no apology email.
Feedback the writer can act on. The checker's answer should be structured, not a chatty paragraph. Structured here means the reply is JSON: text arranged in named fields, like a filled-in form. The verdict field is either approve or revise, so your workflow can branch on it without guessing. Each issue names the field, the problem and the fix. That fix line matters most. A note that says something's wrong with the numbers makes the writer guess. A note that says set total to one hundred and twenty gives it exactly one thing to change, and that makes it much more likely the next draft passes.
The loop in Python. Here's the whole loop in plain Python. You don't need to write code like this. Just follow its shape. Simple functions stand in for the two agents so we can watch it run. The writer starts with Lina's slip, a total of one hundred and forty, and only fixes it or adds the due date when the notes ask. The checker returns a list of problems, and an empty list means approved. The loop runs at most three rounds. In the output, round one comes back with fix total and add due date, and round two comes back approved with a total of one hundred and twenty, so the loop stops. The else part at the bottom runs only when no round was approved, and then it hands the job to a human.
Building it in n8n. In a no-code tool like n8n, the same loop is a handful of nodes. After the checker's model node, an If node reads the verdict field. Approve goes on to the send-email node. Revise loops back to the writer, carrying the notes in its prompt. A Set node keeps a round counter, a small number that goes up by one on every pass. Here's the shortcut that saves you: when the counter reaches three, stop looping and send yourself a message with the draft and the notes. Three rounds is a sensible starting limit, because most fixable slips are caught by then, and anything still failing needs your eyes anyway.
Make the checker independent. You can make the checker much more reliable by splitting its job. Anything with one right answer, like totals, dates and whether a payment link exists, should be checked in code first. Code is deterministic, which means it gives the same answer every time, like a calculator. The AI checker then handles judgement calls, such as tone and whether the reply actually answers the customer's question. A draft is approved only when both checks pass. Give the AI checker a different prompt from the writer and, if you can, a different model, so it doesn't share the writer's habits. And keep it a judge: it either approves the draft or sends back notes, and it never rewrites the draft itself.
Common mistake: the rubber stamp. The most common mistake is a checker that approves everything. It happens when the prompt is vague, like check this invoice, or when the same agent ends up grading its own work under a new name. It feels safe because every run shows a green approved, but it's just a rubber stamp. The fix is to test the checker on purpose. Plant known errors in a few drafts: a wrong total, a missing due date, a made-up discount. Then count how many it catches. If it misses any, tighten the rubric until it catches all of them, before it ever guards a real client.
Recap. Let's recap. A review loop pairs a writer with a checker, and the checker either approves the work or sends it back with specific, structured notes. The checker works from a rubric, with hard facts like totals checked in code and judgement calls left to the AI. And every loop needs a round limit, so after three tries the draft goes to a human instead of circling forever. With that in place, every envelope that leaves your shop is one you'd have been happy to send yourself.
Your exercise. Now it's your turn. Pick an appointment confirmation flow, where a writer agent drafts confirmation messages for the clients on your calendar. Write a checker rubric with at least four points: the correct date and time, the right service, a reschedule link, and a friendly tone. Then make five test drafts and plant mistakes in three of them, such as a wrong day or a missing link. Run your checker on all five and note which errors it catches. Bring your rubric and your results to the next lesson, where we add human approvals and logs on top of this loop.
Explore the animations
The animations from the video, exact and live: play them, pause, drag the slider or jump to a step at your own pace.
Loading the animation...
Loading the animation...
Loading the animation...
Loading the animation...
Loading the animation...
Loading the animation...
Loading the animation...
Loading the animation...
Loading the animation...
Loading the animation...
Answer every question, then check. 70% passes; you can retry as often as you like.
Lesson summary
- Reading
- Video watched
- Quiz passed (70%)
- A checker approves or sends work back with notes
- A rubric, with hard facts checked in code
- A round limit, then a human takes over