Lesson 5 · Module 4: Agentic Systems: Manager and Worker Agents
Review loops: a checker agent that approves or sends work back
Video coming soon
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
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
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
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
One round, step by step
- Writer drafts: total $140
- Checker: 3 x $40 = $120, reject
- Note: set total to 120
- Writer fixes, checker approves
- Invoice goes to the outbox
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
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
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
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
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
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 rejects 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. Give it 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 reports problems, 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 checker is really the writer with 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.
Lesson summary
- Video watched
- 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