الدرس 6 · الوحدة 4: Agentic Systems: Manager and Worker Agents
Human in the loop: approvals, limits and logs for safe autonomy
- Decide which agent actions need a human approval
- Set hard limits that agents cannot cross
- Keep a log so every action can be traced and undone
Why this matters
An AI agent that acts on its own can do real damage in minutes: a single mistaken refund, an invoice sent to the wrong client, or a customer record deleted for good. Businesses hesitate to hand over real work until they can control how much an agent does alone, what it can never do, and how to see what it did. This lesson gives you the three tools for that control, so your agent team can run without surprises.
Key ideas
Autonomy is a dial per action. Each kind of action gets its own level: Suggest (the agent drafts and you act), Approve (the agent prepares and waits for your yes), or Auto (the agent acts and logs it). For example, a shop might set "answer opening-hours questions" to Auto, while "send an invoice" stays at Approve.
Approvals are for risky actions only. Ask a human when money above a set limit moves, or when a mistake cannot be undone. Here is a tiny sorting table:
| Action | Money moves? | Easy to undo? | Level |
|---|---|---|---|
| Refund of $40 | Yes, under $100 | Yes | Auto + log |
| Refund of $250 | Yes, over $100 | Yes | Approve |
| Move a booking | No | Yes | Auto + log |
| Delete a customer record | No | No | Approve |
Limits are hard rules inside the workflow. A limit such as "refunds above $100 wait" is built into the workflow as a condition step, so the agent cannot cross it. A prompt that says "please don't refund too much" can be misread or ignored, but a condition step cannot.
Logs are a diary of every action. Each action becomes one row with the time, the agent, the action, the amount and the decision. A simple spreadsheet works. Summing the Refund rows gives the day's total ($40 + $250 = $290), and the log shows exactly which orders to fix after a mistake.
Too many approvals backfire. When everything needs a yes, the owner clicks "approve" without reading, which is called approval fatigue. Keep approvals for the few risky actions and let the safe ones run on Auto.
Try it before you watch
A shop agent wants to refund a $60 order and also delete an old customer's account. Which action should be Approve, and why?
Show answerHide answer
Deleting the account should be Approve, because it cannot be undone. The $60 refund is under a $100 limit and can be reversed, so it can run on Auto and be logged. The check is whether money is above the limit and whether the action can be undone.
Words to know
Autonomy: how much an agent does on its own, without asking a person first.
Human in the loop: a design where a person approves, limits or reviews what an automated agent does.
Approval queue: a list of requests the agent has prepared and paused, waiting for a person's yes or no.
Hard limit: a rule, such as a maximum amount or daily count, that the workflow enforces so the agent cannot go past it.
Condition step: a workflow block that checks a value (like an amount) and sends the flow down one of two paths.
Audit log: a written, time-stamped record of every action an agent took, used to trace and fix mistakes.
What to watch for
- Notice how each action gets its own level on the dial, rather than one setting for the whole agent.
- Watch where the limit lives: in the workflow's condition step, not in the prompt text.
- Count the rows in the log example and see how a single sheet answers "what happened today?"
تعلّمه مع معلمك على السبورة المباشرة
أهم نقاط الفيديو
The night the agent got generous
- A support agent runs overnight for a small online shop
- One complaint: a cracked jar
- Forty refunds sent
- Exactly what it was allowed to do
layout: wide
parts:
shop: {box: "Online shop", holds: [agent, jar, refunds]}
agent: {chip: "Support agent"}
jar: {chip: "Cracked jar"}
refunds: {chip: "Refunds"}
steps:
- at: "small online shop"
zoom_out: shop
- at: "support agent answered"
highlight: agent
- at: "cracked jar"
highlight: jar
- at: "whole batch was faulty"
note: "Whole batch assumed faulty"
- at: "refunded forty orders"
vortex: {into: refunds, words: [forty, orders, refunded, batch]}
count: {to: 40, label: refunds}
- at: "stack of refunds"
highlight: refunds
note: "Never approved"
- at: "wasn't broken"
note: "The agent was not broken"
- at: "allowed to do"
note: "Allowed, with no line drawn"
- at: "nobody had drawn a line"
note: "No line drawn"
- at: "drawing that line"
note: "Draw the line"
- at: "without any surprises"
highlight: agent What you will learn
- Decide which agent actions need a human approval
- Set hard limits that agents cannot cross
- Keep a log so every action can be traced and undone
layout: wide
parts:
loop: {box: "Human in the loop", holds: [approvals, limits, logs]}
approvals: {chip: "Approvals"}
limits: {chip: "Limits"}
logs: {chip: "Logs"}
steps:
- at: "three tools for safe autonomy"
note: "Three tools"
- at: "acts on its own"
note: "Acts on its own"
- at: "The first tool is approvals"
highlight: approvals
- at: "The second is limits"
highlight: limits
- at: "The third is logs"
highlight: logs
- at: "called human in the loop"
zoom_out: loop The autonomy dial
- Level 1, Suggest: the agent drafts, you do it
- Level 2, Approve: the agent acts after your yes
- Level 3, Auto: the agent acts and logs it
- Each action gets its own setting
layout: wide
parts:
dial: {box: "Autonomy dial", holds: [sug, app, aut]}
sug: {chip: "Suggest", sub: "Drafts only"}
app: {chip: "Approve", sub: "Waits for your yes"}
aut: {chip: "Auto", sub: "Acts on its own"}
steps:
- at: "as a dial"
note: "A dial per action"
- at: "At Suggest"
highlight: sug
- at: "press send yourself"
note: "You press send"
- at: "At Approve"
highlight: app
- at: "it acts on its own"
highlight: aut
- at: "key idea"
note: "Key idea"
- at: "for the whole agent"
zoom_out: dial
note: "Not one dial for the whole agent"
- at: "one for each kind of action"
note: "One setting per action"
- at: "opening hours"
highlight: aut
note: "Opening hours: Auto"
- at: "sending an invoice"
highlight: app
note: "Invoice: Approve" Which actions need approval?
- Money above your limit: always ask
- Under the limit: auto, and logged
- Can it be undone easily? If not, ask
layout: side
direction: down
tree:
Agent action:
"[moves money] Above the limit?":
"[yes] Ask owner":
"[no] Auto, logged":
"[no money] Reversible?":
"[yes] Auto + log":
"[no] Owner approves":
steps:
- at: "start with any action"
grow: Agent action
- at: "always go to the owner"
grow: "Above the limit?"
- at: "Small amounts under"
highlight: "Auto, logged"
- at: "ask a second question"
grow: "Reversible?"
- at: "Moving a booking"
path: "Auto + log"
- at: "Deleting a customer record"
highlight: "Owner approves"
- at: "sticky note"
highlight: "Agent action" The approval step in a workflow
- The agent prepares, then pauses
- The owner sees one clear request
- Yes: the invoice goes out. No: back to the agent
layout: side
objects:
inv: {tex: 'Invoice = 900', pos: top}
queue: {text: "Approval queue", pos: center}
disc: {tex: '10\% \times 900 = 90', pos: bottom_left}
net: {tex: '900 - 90 = 810', pos: bottom_right}
steps:
- at: "drafts a nine hundred dollar invoice"
show: inv
- at: "approval queue"
show: queue
- at: "ten percent returning client discount"
show: [disc, net]
- at: "wait step or a form"
highlight: queue Limits the agent cannot cross
- Amount cap: refunds above 100 dollars wait
- Count cap: no more than five a day
- Scope cap: only this shop's customers
- Limits live in the workflow, not the prompt
layout: wide
parts:
outer: {box: "Workflow", holds: [agent, gate]}
agent: {chip: "Agent"}
gate: {box: "Limits", holds: [amount, count, scope]}
amount: {chip: "Above a hundred"}
count: {chip: "No more than five"}
scope: {chip: "Your customer list"}
steps:
- at: "Approvals catch big decisions"
note: "Big decisions: approvals"
- at: "Limits catch runaway behaviour"
zoom_out: gate
- at: "refunds above a hundred dollars"
highlight: amount
- at: "no more than five refunds"
highlight: count
- at: "only touches your own customer list"
highlight: scope
- at: "Think of the gate across the path"
zoom_out: outer
- at: "the cart still stops"
highlight: gate
- at: "Put limits in the workflow"
note: "Limits live in the workflow"
- at: "Never rely only on the prompt"
note: "Not the prompt alone"
- at: "can misread a prompt"
note: "Models can misread prompts"
- at: "A condition step can't"
highlight: gate Logs: a diary for your agents
- One row per action, every time
- When, which agent, what, how much, decision
- Shows exactly which orders to fix
cells:
A1: Time
B1: Agent
C1: Action
D1: Amount
E1: Decision
A2: "09:02"
B2: Support
C2: Refund
D2: 40
E2: Auto
A3: "09:15"
B3: Billing
C3: Invoice
D3: 900
E3: Rejected
A4: "10:30"
B4: Support
C4: Refund
D4: 250
E4: Approved
A5: "11:05"
B5: Booking
C5: Reschedule
D5: 0
E5: Auto
C6: Refunded
format: {D: currency}
steps:
- at: "A log is a diary"
select: A1:E1
- at: "becomes one row"
select: A2:E2
- at: "which agent acted"
select: B2:B5
- at: "the amount"
select: D2:D5
- at: "Look at the last column"
select: E2:E5
- at: "total refunded today"
note: "Refund rows: 40 and 250"
- at: "Two hundred ninety dollars"
type: {D6: "=D2+D4"}
highlight: D6
- at: "exactly which forty orders"
highlight: D2
- at: "Google Sheet or Airtable"
note: "Any sheet works as a log" The whole gate at a glance
- Under the limit: runs on auto
- Over the limit: waits for the owner
- Approved or rejected, then one log row
- Four actions, four rows in the log
layout: wide
parts:
gate: {box: "Approval gate", holds: [check, wait, log]}
check: {chip: "Under limit?"}
wait: {chip: "Wait for owner"}
log: {chip: "Log row"}
steps:
- at: "whole gate as one flow"
note: "Every action passes here"
- at: "Each action has a limit"
highlight: check
- at: "runs on auto"
note: "Under the limit: auto"
- at: "nobody has answered yet"
highlight: wait
note: "Over the limit: waits"
- at: "approved or rejected"
spokes: {of: wait, items: ["Approved", "Rejected"]}
- at: "one row goes into the log"
highlight: log
- at: "Look at the four examples"
note: "Four examples"
- at: "forty dollar refund ran alone"
note: "40: auto, runs alone"
- at: "two hundred fifty dollar one paused"
note: "250: waiting for owner"
- at: "nine hundred dollar invoice was rejected"
note: "900: rejected"
- at: "Four actions, four rows"
highlight: log
note: "Four rows in the log" Real example: the booking agent
- Move Friday to Saturday: reversible, Auto + log
- Cancel deposit: above the limit, owner approves
- Owner taps yes between clients
layout: wide
parts:
salon: {box: "Salon", holds: [customer, agent, owner]}
customer: {chip: "Customer"}
agent: {chip: "Booking agent"}
owner: {chip: "Owner"}
ask1: {chat: "Can I move my Friday haircut to Saturday?", reply: "Moved to Saturday"}
ask2: {chat: "And cancel my deposit, please."}
steps:
- at: "one small salon"
zoom_out: salon
- at: "A customer texts"
highlight: customer
- at: "Friday haircut"
send: ask1
- at: "checks the calendar"
highlight: agent
- at: "That's reversible"
note: "Reversible: Auto and log"
- at: "cancel my deposit"
send: ask2
- at: "Money is moving now"
note: "Money is moving: a limit check"
- at: "the agent pauses"
highlight: agent
- at: "sends the owner one message"
highlight: owner
- at: "taps approve on her phone"
highlight: owner
note: "Approve from the phone"
- at: "customer gets a fast answer"
highlight: customer
- at: "only decision that really needed her"
note: "The one decision that mattered" Common mistake: approval fatigue
- Asking approval for everything
- The owner clicks "yes" without reading
- Approval fatigue, a rubber stamp
- Fix: approve only risky actions, auto the rest
layout: wide
parts:
inbox: {box: "Owner's inbox", holds: [owner, approve, message]}
owner: {chip: "Owner"}
approve: {chip: "Approve"}
message: {chip: "This message"}
ask1: {chat: "May I reply to this message?"}
steps:
- at: "setting everything to Approve"
highlight: approve
note: "Everything set to Approve"
- at: "may I reply to this message"
send: ask1
- at: "starts pressing the button"
highlight: owner
- at: "without reading"
highlight: approve
- at: "approval fatigue"
note: "Approval fatigue"
- at: "worse than no approvals"
note: "Worse than no approvals"
- at: "think you're in control"
note: "False sense of control"
- at: "to be picky"
note: "The fix: be picky"
- at: "money above your limit moves"
highlight: message
note: "Only risky actions"
- at: "run on Auto"
note: "Auto for the rest"
- at: "trust your log to catch the rest"
note: "Trust the log" Recap
- Set an autonomy level for each action, not for the agent
- Put hard limits in the workflow, never only in the prompt
- Log every action: when, who, what, how much, decision
layout: wide
parts:
safe: {box: "Safe autonomy", holds: [dial, limits, log]}
dial: {chip: "Dial per action", sub: "Suggest, approve, auto"}
limits: {chip: "Hard limits", sub: "In the workflow"}
log: {chip: "Log of actions", sub: "Trace and undo"}
steps:
- at: "Let's recap"
note: "Recap"
- at: "autonomy is a dial"
highlight: dial
- at: "suggest, approve, or auto"
note: "Suggest, approve, or auto"
- at: "going to a human"
note: "Big money or no undo: a human"
- at: "limits are hard rules"
highlight: limits
- at: "physically can't cross them"
note: "Cannot be crossed"
- at: "leaves a row in a log"
highlight: log
- at: "trace mistakes and undo them"
note: "Trace and undo"
- at: "drink her coffee"
note: "Owner relaxes"
- at: "nothing big happens without her"
zoom_out: safe Your exercise
- List 8 actions your agent team could take
- Give each one a level: Suggest, Approve or Auto
- Set one amount limit and one daily count limit
- Build a log sheet with five columns
layout: wide
parts:
ex: {box: "Your exercise", holds: [plan, sheet]}
plan: {box: "The list", holds: [biz, actions, levels]}
biz: {chip: "Pick a business", sub: "Your own or a client's"}
actions: {chip: "List eight actions"}
levels: {chip: "Give each a level"}
sheet: {chip: "Log sheet", sub: "Five columns"}
steps:
- at: "Now it's your turn"
note: "Your turn"
- at: "your own or a client's"
zoom_out: plan
highlight: biz
- at: "eight actions an agent team"
vortex: {into: actions, words: [eight, actions, agent, team]}
count: {to: 8, label: actions}
- at: "replying to a message"
highlight: actions
note: "Reply, book, invoice, refund"
- at: "Give each one a level"
highlight: levels
- at: "two questions about money"
note: "Money and undoing"
- at: "one amount limit"
note: "Two limits"
- at: "create a log sheet"
zoom_out: ex
highlight: sheet
- at: "amount and decision"
note: "Five columns"
- at: "project lesson next"
note: "Next: the project lesson" النص المكتوب
The night the agent got generous. Picture this. You run a small online shop selling handmade candles. Last night your support agent answered customer messages while you slept. One customer complained about a cracked jar, and the agent, trying to be helpful, decided the whole batch was faulty. It refunded forty orders. Now you're sitting at the laptop at dawn, looking at a stack of refunds you never approved. The agent wasn't broken. It did exactly what it was allowed to do, and nobody had drawn a line. This lesson is about drawing that line, so your agent team can work on its own without any surprises.
What you will learn. By the end of this lesson you'll have three tools for safe autonomy. Autonomy just means the agent acts on its own, without asking first. The first tool is approvals: you'll learn to sort actions into ones the agent does alone and ones that wait for you. The second is limits: hard caps, like a maximum refund amount, that the agent can't cross even when it's sure it's right. The third is logs, a written record of every action, so you can see what happened and fix it. Together these are called human in the loop.
The autonomy dial. Think of autonomy as a dial, like the volume on a radio. At Suggest, the agent only drafts: it writes a reply to a customer, and you press send yourself. At Approve, the agent prepares the action and waits for your yes. At Auto, it acts on its own and writes down what it did. Here's the key idea. You don't set one dial for the whole agent. You set one for each kind of action. Answering "what are your opening hours" can sit at Auto, while sending an invoice might sit at Approve.
Which actions need approval?. Here's a simple rule. Start with any action and ask: does it move money? Refunds, discounts and payments above your limit always go to the owner. Small amounts under the limit run on Auto and get logged. If no money moves, ask a second question: can it be undone easily? Moving a booking from Tuesday to Wednesday can be undone with one message, so it runs on Auto and gets logged. Deleting a customer record, or emailing your whole mailing list, can't be taken back, so the owner approves. Write these two questions on a sticky note, and you've got your first safety policy.
The approval step in a workflow. Let's walk through a worked example. A client books a three-month coaching package, and your billing agent drafts a nine hundred dollar invoice. Instead of sending it, the agent prepares the draft, then pauses. It goes into an approval queue, a list of requests waiting for you. You, the owner, get one clear request: client name, amount, and what's being billed. If you say yes, the invoice goes out. If you say no, it goes back to the agent with your note, for example "apply the ten percent returning client discount." In no-code tools, this is usually a wait step or a form.
Limits the agent cannot cross. Approvals catch big decisions. Limits catch runaway behaviour. A limit is a hard rule, and there are three kinds. An amount cap makes refunds above a hundred dollars wait for you. A count cap allows no more than five refunds a day. A scope cap means the agent only touches your own customer list. Think of the gate across the path: the agent can push as hard as it wants, and the cart still stops. Put limits in the workflow itself, as a filter or condition step. Never rely only on the prompt saying "please don't refund too much." A language model can misread a prompt. A condition step can't.
Logs: a diary for your agents. A log is a diary for your agents. Every action becomes one row: the time, which agent acted, what it did, the amount, and who decided. Here's a morning across your agent team. Look at the last column, which shows who decided: the agent alone, or you. Now you can answer real questions in seconds. What's the total refunded today? Two hundred ninety dollars. And if that overnight disaster ever happens again, the log tells you exactly which forty orders to fix. A simple Google Sheet or Airtable table works perfectly as a log.
The whole gate at a glance. Here's the whole gate as one flow. Every workflow tool does exactly this, with no code needed. Each action has a limit. If the amount is at or under the limit, it runs on auto. If it's over and nobody has answered yet, it waits for the owner. Then it becomes approved or rejected. And whatever happens, one row goes into the log. Look at the four examples: the forty dollar refund ran alone, the two hundred fifty dollar one paused until you said yes, and the nine hundred dollar invoice was rejected. Four actions, four rows in the log.
Real example: the booking agent. Let's see all three tools in one small salon. A customer texts: "Can I move my Friday haircut to Saturday?" The booking agent checks the calendar, finds a free slot, and moves it. That's reversible, so it runs on Auto and writes a log row. Then she adds: "And cancel my deposit, please." Money is moving now, and the deposit is above the limit the owner set, so the agent pauses and sends the owner one message with the details. The owner taps approve on her phone between two clients. The customer gets a fast answer, and the owner made the only decision that really needed her.
Common mistake: approval fatigue. The most common mistake is the opposite of the opening story: setting everything to Approve. It feels safe. But after the fiftieth "may I reply to this message?" the owner starts pressing the button without reading. That's called approval fatigue, and it's worse than no approvals at all, because you think you're in control when you aren't. The fix is to be picky. Ask for approval only where money above your limit moves or a mistake can't be undone. Let the safe, reversible actions run on Auto, and trust your log to catch the rest.
Recap. Let's recap. First, autonomy is a dial you set per action: suggest, approve, or auto, with money above your limit and anything you can't undo going to a human. Second, limits are hard rules built into the workflow, like a refund cap or a daily count, so the agent physically can't cross them. Third, every action leaves a row in a log, so you can trace mistakes and undo them. With these three in place, your owner can drink her coffee while the agents work, knowing nothing big happens without her.
Your exercise. Now it's your turn. Pick a small business you know, maybe your own or a client's. Write a list of eight actions an agent team could take there, such as replying to a message, booking a call, sending an invoice or issuing a refund. Give each one a level: Suggest, Approve, or Auto, using the two questions about money and undoing. Then set one amount limit and one daily count limit. Finally, create a log sheet with five columns: time, agent, action, amount and decision. You'll use it in the project lesson next.
استكشف الرسوم المتحركة
الرسوم المتحركة نفسها التي في الفيديو، دقيقة وتفاعلية: شغّلها أو أوقفها، أو اسحب المؤشر، أو انتقل إلى أي خطوة بالسرعة التي تناسبك.
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...
Loading the animation...
Loading the animation...
أجب عن كل الأسئلة ثم تحقّق. تنجح بنسبة 70%، ويمكنك إعادة المحاولة كما تشاء.
ملخص الدرس
- القراءة
- مشاهدة الفيديو
- اجتياز الاختبار (70%)
- Set an autonomy level for each action, not for the agent
- Put hard limits in the workflow, never only in the prompt
- Log every action: when, who, what, how much, decision