Learn AI Agent in 2026
Lesson 01

AI Agent Architecture

Five core agent patterns: ReAct, Plan-and-Execute, Reflexion, and more.

0:00 / 0:00

Transcript

Lesson 1: AI Agent Architecture — Full Spoken Transcript (Cantonese)

Original podcast: Cantonese dialogue between two speakers (M = 主持 host 子謙, F = 嘉賓 expert 曉晴). Total spoken duration: ~13 min. The audio above plays the full conversation. The text below is the complete transcript of what was actually said — preserved verbatim, not summarised, not translated.

Course: Eight-lesson course on AI agents · Lesson 1 of 8 · learnagent.lmmlab.com Topic (EN): Five core agent patterns — ReAct, Plan-and-Execute, Reflexion, Supervisor-Worker, Event-Driven Workflow Graph. Topic (粵): 五大 agent 架構 pattern。 Speakers: 主持 M (host 子謙) and 嘉賓 F (expert 曉晴) · 33 spoken turns · ~13 min audio.


How to read this transcript

Each spoken turn from the podcast is shown as a separate paragraph, with the speaker label rendered in bold and an approximate timestamp (MM:SS) indicating where in the audio that turn occurs. Long turns are broken at natural sentence boundaries (。!?) and, where a sentence is still long, at clause boundaries (,;、). No English translation is provided — this is the exact spoken Cantonese audio transcript as it was synthesised for the lesson podcast.

Use browser Ctrl+F / ⌘+F to locate any phrase. On mobile (640 px viewport), the transcript scrolls as a single column.

Note: Sentence-level line breaks are for readability — the Cantonese text itself is preserved verbatim from the original podcast script (script_raw.json). No words have been altered, translated, summarised, or paraphrased.


Index of sections in this lesson

  • 1. Opening & Core Concepts (粵: 開場同基本概念) — turn 01 onwards
  • 2. Pattern 1 — ReAct (粵: 第一個 pattern:ReAct) — turn 05 onwards
  • 3. Pattern 2 — Plan-and-Execute (粵: 第二個 pattern:Plan-and-Execute) — turn 13 onwards
  • 4. Pattern 3 — Reflexion (粵: 第三個 pattern:Reflexion) — turn 19 onwards
  • 5. Pattern 4 — Supervisor-Worker & Pattern 5 — Workflow Graph (粵: 第四、五個 pattern:Supervisor-Worker 同 Workflow Graph) — turn 23 onwards
  • 6. Wrap-up (粵: 總結同下堂預覽) — turn 31 onwards

Section 1/6 — Opening & Core Concepts

開場同基本概念

Section overview: covers turns 01–04 (4 spoken segments).

Topic terms (extracted from spoken text): Plan-and-Execute, architecture, trade-off, Reflexion, poisoning, sanitise, control, pattern, context, output

Latin/English code-terms in this section (verbatim from speech): Plan-and-Execute, architecture, trade-off

Section character total: 554 characters across 4 spoken turns.

Section duration estimate: ~1:34 of 13:00 total.

Turns in this section: 01, 02, 03, 04.

First spoken sentence of this section (turn 01, verbatim): 各位同學早晨, 我係子謙。

Average characters per turn (this section): ~138 chars.

Cumulative characters through this section: 554 of 7,887 total.

[01 | 00:00] 主持 M (host 子謙):

Turn 1 of 33 · speaker M (host 子謙 — opens and closes) · audio timestamp 00:00 · section 1 (Opening & Core Concepts)

speaker=M · chars=71 · ts=00:00 · terms=Agent · sentences=3 · clauses=5

Verbatim phrases in this turn: 歡迎收聽第一課 AI 語音課程。 · 今日嘅主題係 AI Agent 嘅唔同架構結構, 同埋每一種結構對應可以處理嘅問題。

各位同學早晨, 我係子謙。歡迎收聽第一課 AI 語音課程。今日嘅主題係 AI Agent 嘅唔同架構結構, 同埋每一種結構對應可以處理嘅問題。

First clause (verbatim): 各位同學早晨,

Last clause (verbatim): 同埋每一種結構對應可以處理嘅問題。

各位同學早晨,

我係子謙。

歡迎收聽第一課 AI 語音課程。

今日嘅主題係 AI Agent 嘅唔同架構結構,

同埋每一種結構對應可以處理嘅問題。

[02 | 00:23] 嘉賓 F (expert 曉晴):

Turn 2 of 33 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 00:23 · section 1 (Opening & Core Concepts)

speaker=F · chars=97 · ts=00:23 · terms=control, pattern, Agent, loop · sentences=3 · clauses=7

Verbatim phrases in this turn: AI Agent 嘅架構唔係單一一個標準答案, 而係根據任務嘅長度、 · 單一一個標準答案, 而係根據任務嘅長度、可逆性同自主程度, 揀唔同嘅 control loop 結構。 · 今日我哋會逐個拆解五大主流 pattern。

大家好, 我係曉晴。AI Agent 嘅架構唔係單一一個標準答案, 而係根據任務嘅長度、可逆性同自主程度, 揀唔同嘅 control loop 結構。

First clause (verbatim): 大家好,

Last clause (verbatim): 今日我哋會逐個拆解五大主流 pattern。

大家好,

我係曉晴。

AI Agent 嘅架構唔係單一一個標準答案,

而係根據任務嘅長度、

可逆性同自主程度,

揀唔同嘅 control loop 結構。

今日我哋會逐個拆解五大主流 pattern。

[03 | 00:47] 主持 M (host 子謙):

Turn 3 of 33 · speaker M (host 子謙 — opens and closes) · audio timestamp 00:47 · section 1 (Opening & Core Concepts)

speaker=M · chars=125 · ts=00:47 · terms=architecture, output, Agent, check, Model · sentences=3 · clauses=7

Verbatim phrases in this turn: AI Agent 嘅架構其實係由四個問題組成: 點樣決定下一步行動、 · 幾時 call tool、 · 係咪要 check 自己嘅 output、

念。AI Agent 嘅架構其實係由四個問題組成: 點樣決定下一步行動、幾時 call tool、係咪要 check 自己嘅 output、同埋點樣將大目標拆細。

First clause (verbatim): 首先講解基本概念。

Last clause (verbatim): 但係 architecture 提供控制流嘅骨架。

首先講解基本概念。

AI Agent 嘅架構其實係由四個問題組成: 點樣決定下一步行動、

幾時 call tool、

係咪要 check 自己嘅 output、

同埋點樣將大目標拆細。

Model 提供智能,

但係 architecture 提供控制流嘅骨架。

[04 | 01:10] 嘉賓 F (expert 曉晴):

Turn 4 of 33 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 01:10 · section 1 (Opening & Core Concepts)

speaker=F · chars=261 · ts=01:10 · terms=Plan-and-Execute, trade-off, Reflexion, poisoning, sanitise · sentences=2 · clauses=8

Verbatim phrases in this turn: te 平但係 plan 容易 stale, Reflexion 準但係 token 用量係乘數級上升。 · 話錯誤會累積, Reflexion 唔 sanitise memory 嘅話會被 poisoning。

context window, Plan-and-Execute 平但係 plan 容易 stale, Reflexion 準但係 token 用量係乘數級上升。

First clause (verbatim): 每一個 pattern 都有明確嘅成本同 trade-off,

Last clause (verbatim): Reflexion 唔 sanitise memory 嘅話會被 poisoning。

每一個 pattern 都有明確嘅成本同 trade-off,

例如 ReAct 簡單但浪費 context window,

Plan-and-Execute 平但係 plan 容易 stale,

Reflexion 準但係 token 用量係乘數級上升。

揀錯 pattern 會產生明顯嘅失敗模式,

例如 ReAct 喺長任務度會 context thrash,

Plan-and-Execute 唔 replan 嘅話錯誤會累積,

Reflexion 唔 sanitise memory 嘅話會被 poisoning。

End-of-section recap (last spoken sentence of Opening & Core Concepts): 每一個 pattern 都有明確嘅成本同 trade-off, 例如 ReAct 簡單但浪費 context window, Plan-and-Execute 平但係 plan 容易 stale, Reflexion 準但係 token 用量係乘數級上升。


Section 2/6 — Pattern 1 — ReAct

第一個 pattern:ReAct

Section overview: covers turns 05–12 (8 spoken segments).

Topic terms (extracted from spoken text): one-action-at-a-time, create_react_agent, chain-of-thought, Plan-and-Execute, straightforward, hallucination, off-the-shelf, decomposition, pre-execution, ground-truth

Latin/English code-terms in this section (verbatim from speech): one-action-at-a-time, create_react_agent, chain-of-thought

Section character total: 1,641 characters across 8 spoken turns.

Section duration estimate: ~3:09 of 13:00 total.

Turns in this section: 05, 06, 07, 08, 09, 10, 11, 12.

First spoken sentence of this section (turn 05, verbatim): 好, 第一個 pattern 係 ReAct, 全名係 Reason plus Act, 二零二二年由姚等人提出。

Average characters per turn (this section): ~205 chars.

Cumulative characters through this section: 2,195 of 7,887 total.

[05 | 01:34] 主持 M (host 子謙):

Turn 5 of 33 · speaker M (host 子謙 — opens and closes) · audio timestamp 01:34 · section 2 (Pattern 1 — ReAct)

speaker=M · chars=158 · ts=01:34 · terms=pattern, observe, Reason, action, result · sentences=2 · clauses=8

Verbatim phrases in this turn: pattern 係 ReAct, 全名係 Reason plus Act, 二零二二年由姚等人提出。 · on 嘅同時 observe result, 然後再 think 多次, repeat 直到目標完成。

好, 第一個 pattern 係 ReAct, 全名係 Reason plus Act, 二零二二年由姚等人提出。

First clause (verbatim): 好,

Last clause (verbatim): repeat 直到目標完成。

好,

第一個 pattern 係 ReAct,

全名係 Reason plus Act,

二零二二年由姚等人提出。

佢嘅核心結構係將推理 trace 同 action 喺每一步交織,

即係 think 一個 action 嘅同時 observe result,

然後再 think 多次,

repeat 直到目標完成。

[06 | 01:58] 嘉賓 F (expert 曉晴):

Turn 6 of 33 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 01:58 · section 2 (Pattern 1 — ReAct)

speaker=F · chars=186 · ts=01:58 · terms=chain-of-thought, hallucination, ground-truth, observation, transcript · sentences=2 · clauses=6

Verbatim phrases in this turn: 題, 因為每個 reasoning step 都會有實際嘅 tool observation 去驗證。 · 易 debug, 因為個 transcript 一路都係 readable 嘅 scratchpad。

n-of-thought 嘅 hallucination 問題, 因為每個 reasoning step 都會有實際嘅 tool observation 去驗證。

First clause (verbatim): ReAct 嘅優勢係每一步都 ground-truth grounded,

Last clause (verbatim): 因為個 transcript 一路都係 readable 嘅 scratchpad。

ReAct 嘅優勢係每一步都 ground-truth grounded,

唔會出現純 chain-of-thought 嘅 hallucination 問題,

因為每個 reasoning step 都會有實際嘅 tool observation 去驗證。

佢最簡單、

最易 debug,

因為個 transcript 一路都係 readable 嘅 scratchpad。

[07 | 02:21] 主持 M (host 子謙):

Turn 7 of 33 · speaker M (host 子謙 — opens and closes) · audio timestamp 02:21 · section 2 (Pattern 1 — ReAct)

speaker=M · chars=210 · ts=02:21 · terms=long-horizon, scratchpad, reasoning, verbose, context · sentences=4 · clauses=10

Verbatim phrases in this turn: 但 ReAct 嘅弱點都幾明顯。 · 第一係 verbose, 每個 step 都要做 reasoning, 所以 token 消耗高。 · 第二係 long-horizon task 度會 wander, 因為佢冇全局 plan, 容易走偏。

但 ReAct 嘅弱點都幾明顯。第一係 verbose, 每個 step 都要做 reasoning, 所以 token 消耗高。

First clause (verbatim): 但 ReAct 嘅弱點都幾明顯。

Last clause (verbatim): 之後嘅 step 要 process 嘅 context 越來越細粒度嘅 cost 越來越高。

但 ReAct 嘅弱點都幾明顯。

第一係 verbose,

每個 step 都要做 reasoning,

所以 token 消耗高。

第二係 long-horizon task 度會 wander,

因為佢冇全局 plan,

容易走偏。

第三係 context window thrash,

因為 scratchpad 越積越長,

之後嘅 step 要 process 嘅 context 越來越細粒度嘅 cost 越來越高。

[08 | 02:45] 嘉賓 F (expert 曉晴):

Turn 8 of 33 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 02:45 · section 2 (Pattern 1 — ReAct)

speaker=F · chars=212 · ts=02:45 · terms=straightforward, question, autonomy, problem, command · sentences=3 · clauses=7

Verbatim phrases in this turn: short task, 一般係五個 tool call 或者以下, 同埋 action 可逆嘅情境。 · fact question, 或者一個 straightforward 嘅 bash command。 · L2 等級嘅 autonomy, 即係 human approve 每個重要 action 嘅工作流。

ReAct 適合嘅 problem class 係 short task, 一般係五個 tool call 或者以下, 同埋 action 可逆嘅情境。

First clause (verbatim): ReAct 適合嘅 problem class 係 short task,

Last clause (verbatim): 即係 human approve 每個重要 action 嘅工作流。

ReAct 適合嘅 problem class 係 short task,

一般係五個 tool call 或者以下,

同埋 action 可逆嘅情境。

例如下一個簡單嘅 web search 答一條 fact question,

或者一個 straightforward 嘅 bash command。

佢都適合 L1 同 L2 等級嘅 autonomy,

即係 human approve 每個重要 action 嘅工作流。

[09 | 03:09] 主持 M (host 子謙):

Turn 9 of 33 · speaker M (host 子謙 — opens and closes) · audio timestamp 03:09 · section 2 (Pattern 1 — ReAct)

speaker=M · chars=181 · ts=03:09 · terms=create_react_agent, off-the-shelf, complexity, LangGraph, framework · sentences=2 · clauses=6

Verbatim phrases in this turn: 同埋大部分 off-the-shelf agent framework 嘅 default loop。 · 因為佢最快教識你 agent 嘅 failure modes, 之後再考慮加 complexity。

ngGraph 嘅 create_react_agent, 同埋大部分 off-the-shelf agent framework 嘅 default loop。

First clause (verbatim): ReAct 嘅典型實作係 LangGraph 嘅 create_react_agent,

Last clause (verbatim): 之後再考慮加 complexity。

ReAct 嘅典型實作係 LangGraph 嘅 create_react_agent,

同埋大部分 off-the-shelf agent framework 嘅 default loop。

如果你係 prototype,

由 ReAct 開始係最穩陣嘅選擇,

因為佢最快教識你 agent 嘅 failure modes,

之後再考慮加 complexity。

[10 | 03:32] 嘉賓 F (expert 曉晴):

Turn 10 of 33 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 03:32 · section 2 (Pattern 1 — ReAct)

speaker=F · chars=193 · ts=03:32 · terms=Plan-and-Execute, decomposition, assignment, expected, Executor · sentences=2 · clauses=8

Verbatim phrases in this turn: 好, 第二個 pattern 係 Plan-and-Execute。 · ment 同 expected output, 然後 Executor agent 至開始執行每一步。

好, 第二個 pattern 係 Plan-and-Execute。

First clause (verbatim): 好,

Last clause (verbatim): 然後 Executor agent 至開始執行每一步。

好,

第二個 pattern 係 Plan-and-Execute。

佢將做咩同埋去做分開,

即係一個 Planner agent 收到 goal 之後,

先產生完整嘅 task decomposition,

一個有序嘅 step list,

每個 step 有 tool assignment 同 expected output,

然後 Executor agent 至開始執行每一步。

[11 | 03:56] 主持 M (host 子謙):

Turn 11 of 33 · speaker M (host 子謙 — opens and closes) · audio timestamp 03:56 · section 2 (Pattern 1 — ReAct)

speaker=M · chars=243 · ts=03:56 · terms=Plan-and-Execute, long-horizon, efficiency, scratchpad, Executor · sentences=3 · clauses=7

Verbatim phrases in this turn: Plan-and-Execute 嘅最大優勢係 context window efficiency。 · step 同 plan context 入面, 唔需要 replay 之前嘅 scratchpad。 · rizon task 上 token 用量大約減四至六成, 仲有四個百分點嘅 accuracy 提升。

Plan-and-Execute 嘅最大優勢係 context window efficiency。

First clause (verbatim): Plan-and-Execute 嘅最大優勢係 context window efficiency。

Last clause (verbatim): 仲有四個百分點嘅 accuracy 提升。

Plan-and-Execute 嘅最大優勢係 context window efficiency。

個 plan 通常只係五十至一百五十 token,

Executor 每一步嘅 context 都 bounded 喺 current step 同 plan context 入面,

唔需要 replay 之前嘅 scratchpad。

ReWOO 嘅實作報告指出,

喺 long-horizon task 上 token 用量大約減四至六成,

仲有四個百分點嘅 accuracy 提升。

[12 | 04:20] 嘉賓 F (expert 曉晴):

Turn 12 of 33 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 04:20 · section 2 (Pattern 1 — ReAct)

speaker=F · chars=258 · ts=04:20 · terms=one-action-at-a-time, Plan-and-Execute, pre-execution, prohibited, automated · sentences=1 · clauses=6

Verbatim phrases in this turn: e, 呢樣喺 ReAct 嘅 one-action-at-a-time execution 度做唔到。

ction 或者未授權嘅 resource reference, 呢樣喺 ReAct 嘅 one-action-at-a-time execution 度做唔到。

First clause (verbatim): Plan-and-Execute 嘅 plan 仲有一個好實用嘅好處,

Last clause (verbatim): 呢樣喺 ReAct 嘅 one-action-at-a-time execution 度做唔到。

Plan-and-Execute 嘅 plan 仲有一個好實用嘅好處,

就係 plan 係 discrete text artifact,

可以做 pre-execution policy check,

即係喺任何 tool call 之前,

automated system 可以 scan 個 plan 嚟 check 有冇 prohibited action 或者未授權嘅 resource reference,

呢樣喺 ReAct 嘅 one-action-at-a-time execution 度做唔到。

End-of-section recap (last spoken sentence of Pattern 1 — ReAct): Plan-and-Execute 嘅 plan 仲有一個好實用嘅好處, 就係 plan 係 discrete text artifact, 可以做 pre-execution policy check, 即係喺任何 tool call 之前, automated system 可以 scan 個 plan 嚟 check 有冇 prohibited action 或者未授權嘅 resource reference, 呢樣喺 ReAct 嘅 one-action-at-a-time execution 度做唔到。


Section 3/6 — Pattern 2 — Plan-and-Execute

第二個 pattern:Plan-and-Execute

Section overview: covers turns 13–18 (6 spoken segments).

Topic terms (extracted from spoken text): Plan-and-Execute, straightforward, medium-horizon, preconditions, mid-execution, pre-execution, self-critique, self-feedback, world-model, observation

Latin/English code-terms in this section (verbatim from speech): Plan-and-Execute, straightforward, medium-horizon

Section character total: 1,597 characters across 6 spoken turns.

Section duration estimate: ~2:21 of 13:00 total.

Turns in this section: 13, 14, 15, 16, 17, 18.

First spoken sentence of this section (turn 13, verbatim): Plan-and-Execute 嘅主要 failure mode 係 plan staleness。

Average characters per turn (this section): ~266 chars.

Cumulative characters through this section: 3,792 of 7,887 total.

[13 | 04:43] 主持 M (host 子謙):

Turn 13 of 33 · speaker M (host 子謙 — opens and closes) · audio timestamp 04:43 · section 3 (Pattern 2 — Plan-and-Execute)

speaker=M · chars=255 · ts=04:43 · terms=Plan-and-Execute, preconditions, world-model, unexpected, staleness · sentences=2 · clauses=7

Verbatim phrases in this turn: Plan-and-Execute 嘅主要 failure mode 係 plan staleness。 · 無預期嘅 error, 剩餘嘅 step 嘅 preconditions 可能已經 invalid。

Plan-and-Execute 嘅主要 failure mode 係 plan staleness。

First clause (verbatim): Plan-and-Execute 嘅主要 failure mode 係 plan staleness。

Last clause (verbatim): 剩餘嘅 step 嘅 preconditions 可能已經 invalid。

Plan-and-Execute 嘅主要 failure mode 係 plan staleness。

個 plan 係 T=0 嘅時候用 Planner 嘅 world-model 產生嘅,

如果執行期間環境變咗,

例如 step return 咗個 unexpected result,

或者 external data source update 咗,

或者 tool call fail 咗個 plan 無預期嘅 error,

剩餘嘅 step 嘅 preconditions 可能已經 invalid。

[14 | 05:07] 嘉賓 F (expert 曉晴):

Turn 14 of 33 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 05:07 · section 3 (Pattern 2 — Plan-and-Execute)

speaker=F · chars=287 · ts=05:07 · terms=Plan-and-Execute, mid-execution, observation, replanning, blackboard · sentences=3 · clauses=8

Verbatim phrases in this turn: 解決方法係 replanning trigger。 · 再 take current state 作 input, 重新 generate 餘下嘅 plan。 · external state mid-execution 會變嘅 task 度都會 brittle。

解決方法係 replanning trigger。

First clause (verbatim): 解決方法係 replanning trigger。

Last clause (verbatim): Plan-and-Execute 喺任何 external state mid-execution 會變嘅 task 度都會 brittle。

解決方法係 replanning trigger。

Executor 應該比較每一步嘅 expected output type 同 actual observation,

mismatch 或者 failure 嘅時候,

寫個 REPLAN signal 落 blackboard,

Planner 再 take current state 作 input,

重新 generate 餘下嘅 plan。

如果冇呢個 trigger,

Plan-and-Execute 喺任何 external state mid-execution 會變嘅 task 度都會 brittle。

[15 | 05:30] 主持 M (host 子謙):

Turn 15 of 33 · speaker M (host 子謙 — opens and closes) · audio timestamp 05:30 · section 3 (Pattern 2 — Plan-and-Execute)

speaker=M · chars=310 · ts=05:30 · terms=Plan-and-Execute, medium-horizon, pre-execution, regulatory, compliance · sentences=3 · clauses=11

Verbatim phrases in this turn: 例子包括 monthly financial close、 · data migration、 · on task, 即係六至二十個 step, 而且 full plan 可以預先 specified。

an-and-Execute 適合 medium-horizon task, 即係六至二十個 step, 而且 full plan 可以預先 specified。

First clause (verbatim): Plan-and-Execute 適合 medium-horizon task,

Last clause (verbatim): 例如涉及 regulatory compliance 嘅 workflow。

Plan-and-Execute 適合 medium-horizon task,

即係六至二十個 step,

而且 full plan 可以預先 specified。

例子包括 monthly financial close、

data migration、

多 section 嘅 report,

呢啲 task 結構穩定,

寫一次 plan 然後 execute 比一步一步 reasoning 平,

因為昂貴嘅 reasoning token 只係用喺 planning。

佢亦都適合需要 pre-execution audit 嘅 work,

例如涉及 regulatory compliance 嘅 workflow。

[16 | 05:54] 嘉賓 F (expert 曉晴):

Turn 16 of 33 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 05:54 · section 3 (Pattern 2 — Plan-and-Execute)

speaker=F · chars=289 · ts=05:54 · terms=Plan-and-Execute, straightforward, ReAct-style, GPT-4o-mini, adaptivity · sentences=2 · clauses=9

Verbatim phrases in this turn: te 做 skeleton, 喺每個 step 入面用 ReAct-style adaptivity。 · depth, 但 execution 通常係 straightforward 嘅 tool call。

agent 都係兩者混合, 用 plan-and-execute 做 skeleton, 喺每個 step 入面用 ReAct-style adaptivity。

First clause (verbatim): Plan-and-Execute 同 ReAct 唔係 rivals,

Last clause (verbatim): 但 execution 通常係 straightforward 嘅 tool call。

Plan-and-Execute 同 ReAct 唔係 rivals,

大部分 reliable agent 都係兩者混合,

用 plan-and-execute 做 skeleton,

喺每個 step 入面用 ReAct-style adaptivity。

實作嘅時候,

Planner 用 capable model 例如 GPT-4o,

Executor 可以用 cheap model 例如 GPT-4o-mini,

因為 planning 需要 reasoning depth,

但 execution 通常係 straightforward 嘅 tool call。

[17 | 06:18] 主持 M (host 子謙):

Turn 17 of 33 · speaker M (host 子謙 — opens and closes) · audio timestamp 06:18 · section 3 (Pattern 2 — Plan-and-Execute)

speaker=M · chars=245 · ts=06:18 · terms=self-critique, reflection, Reflexion, calendar, episodic · sentences=2 · clauses=7

Verbatim phrases in this turn: Reflexion, 喺同一個 attempt 之後加多一個 self-critique step。 · odic memory buffer, 下次 attempt 嘅時候 feed 返入 context。

第三個 pattern 係 Reflexion, 喺同一個 attempt 之後加多一個 self-critique step。

First clause (verbatim): 第三個 pattern 係 Reflexion,

Last clause (verbatim): 下次 attempt 嘅時候 feed 返入 context。

第三個 pattern 係 Reflexion,

喺同一個 attempt 之後加多一個 self-critique step。

個 agent 做完 task 之後,

寫一段 verbal reflection,

例如我原本 assume 咗 fiscal year 同 calendar year 一致所以查錯咗 date range,

然後將呢段 reflection 存去 episodic memory buffer,

下次 attempt 嘅時候 feed 返入 context。

[18 | 06:41] 嘉賓 F (expert 曉晴):

Turn 18 of 33 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 06:41 · section 3 (Pattern 2 — Plan-and-Execute)

speaker=F · chars=211 · ts=06:41 · terms=self-feedback, reflective, Reflexion, HumanEval, complete · sentences=2 · clauses=7

Verbatim phrases in this turn: 因為 self-feedback 將每次 attempt 嘅 mistake 變成下次嘅 prior。 · ound 係再一次 complete pass, 唔係令每次 pass 更平, 而係 pass 多次。

ss@1 由 GPT-4 嘅百分之八十提升到百分之九十一, 因為 self-feedback 將每次 attempt 嘅 mistake 變成下次嘅 prior。

First clause (verbatim): Reflexion 嘅原始 paper 報告,

Last clause (verbatim): 而係 pass 多次。

Reflexion 嘅原始 paper 報告,

HumanEval 嘅 pass@1 由 GPT-4 嘅百分之八十提升到百分之九十一,

因為 self-feedback 將每次 attempt 嘅 mistake 變成下次嘅 prior。

但係呢個 gain 係用 token 買返嚟,

因為每個 reflective round 係再一次 complete pass,

唔係令每次 pass 更平,

而係 pass 多次。

End-of-section recap (last spoken sentence of Pattern 2 — Plan-and-Execute): Reflexion 嘅原始 paper 報告, HumanEval 嘅 pass@1 由 GPT-4 嘅百分之八十提升到百分之九十一, 因為 self-feedback 將每次 attempt 嘅 mistake 變成下次嘅 prior。


Section 4/6 — Pattern 3 — Reflexion

第三個 pattern:Reflexion

Section overview: covers turns 19–22 (4 spoken segments).

Topic terms (extracted from spoken text): Orchestrator-Subagent, Supervisor-Worker, quality-critical, Plan-and-Execute, reconciliation, self-critique, sanitisation, coordination, high-volume, multi-agent

Latin/English code-terms in this section (verbatim from speech): Orchestrator-Subagent, Supervisor-Worker, quality-critical

Section character total: 1,006 characters across 4 spoken turns.

Section duration estimate: ~1:34 of 13:00 total.

Turns in this section: 19, 20, 21, 22.

First spoken sentence of this section (turn 19, verbatim): Reflexion 嘅適合情境係 quality-critical 而且有 retry budget 嘅 task, 例如 legal summary、financial reconciliation、multi-step coding problem。

Average characters per turn (this section): ~251 chars.

Cumulative characters through this section: 4,798 of 7,887 total.

[19 | 07:05] 主持 M (host 子謙):

Turn 19 of 33 · speaker M (host 子謙 — opens and closes) · audio timestamp 07:05 · section 4 (Pattern 3 — Reflexion)

speaker=M · chars=296 · ts=07:05 · terms=quality-critical, reconciliation, self-critique, high-volume, multi-step · sentences=3 · clauses=9

Verbatim phrases in this turn: 且有 retry budget 嘅 task, 例如 legal summary、 · financial reconciliation、 · financial reconciliation、multi-step coding problem。

dget 嘅 task, 例如 legal summary、financial reconciliation、multi-step coding problem。

First clause (verbatim): Reflexion 嘅適合情境係 quality-critical 而且有 retry budget 嘅 task,

Last clause (verbatim): 一個 lazy self-critique 只會加 latency 唔會提升 accuracy。

Reflexion 嘅適合情境係 quality-critical 而且有 retry budget 嘅 task,

例如 legal summary、

financial reconciliation、

multi-step coding problem。

佢唔適合 high-volume cheap task,

因為 reflection 嘅 overhead 喺嗰度唔值得。

Reflexion 仲需要 strong evaluator,

唔係每個 task 都有 honest critic,

一個 lazy self-critique 只會加 latency 唔會提升 accuracy。

[20 | 07:29] 嘉賓 F (expert 曉晴):

Turn 20 of 33 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 07:29 · section 4 (Pattern 3 — Reflexion)

speaker=F · chars=249 · ts=07:29 · terms=self-critique, sanitisation, reflection, production, Reflexion · sentences=2 · clauses=6

Verbatim phrases in this turn: 後, 唔 sanitise 嘅話, 錯誤嘅 self-critique 會污染之後嘅 session。 · yer, 否則個 agent 會將過去嘅 mistake 學成 future 嘅 behaviour。

eflection 寫落 episodic buffer 之後, 唔 sanitise 嘅話, 錯誤嘅 self-critique 會污染之後嘅 session。

First clause (verbatim): Reflexion 嘅主要 failure mode 係 memory poisoning,

Last clause (verbatim): 否則個 agent 會將過去嘅 mistake 學成 future 嘅 behaviour。

Reflexion 嘅主要 failure mode 係 memory poisoning,

因為 reflection 寫落 episodic buffer 之後,

唔 sanitise 嘅話,

錯誤嘅 self-critique 會污染之後嘅 session。

所以 production 嘅 Reflexion 系統需要 versioned memory 同埋 sanitisation layer,

否則個 agent 會將過去嘅 mistake 學成 future 嘅 behaviour。

[21 | 07:52] 主持 M (host 子謙):

Turn 21 of 33 · speaker M (host 子謙 — opens and closes) · audio timestamp 07:52 · section 4 (Pattern 3 — Reflexion)

speaker=M · chars=201 · ts=07:52 · terms=Plan-and-Execute, reflection, standalone, Reflexion, improved · sentences=3 · clauses=9

Verbatim phrases in this turn: eAct 或者 Plan-and-Execute 做底, 外面再加 reflection layer。 · 所以 Reflexion 唔係 standalone 嘅架構, 係 augment 工具。 · 觸發反思, 反思寫落 memory 之後, 下次 retry 用 improved context。

xion 通常係 wrap 其他 pattern, 即係 ReAct 或者 Plan-and-Execute 做底, 外面再加 reflection layer。

First clause (verbatim): Reflexion 通常係 wrap 其他 pattern,

Last clause (verbatim): 下次 retry 用 improved context。

Reflexion 通常係 wrap 其他 pattern,

即係 ReAct 或者 Plan-and-Execute 做底,

外面再加 reflection layer。

所以 Reflexion 唔係 standalone 嘅架構,

係 augment 工具。

實作上常見嘅做法係,

失敗嘅 step 觸發反思,

反思寫落 memory 之後,

下次 retry 用 improved context。

[22 | 08:16] 嘉賓 F (expert 曉晴):

Turn 22 of 33 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 08:16 · section 4 (Pattern 3 — Reflexion)

speaker=F · chars=260 · ts=08:16 · terms=Orchestrator-Subagent, Supervisor-Worker, coordination, multi-agent, specialized · sentences=3 · clauses=8

Verbatim phrases in this turn: ern 係 Supervisor-Worker, 又叫做 Orchestrator-Subagent。 · production 系統嘅主流 multi-agent coordination pattern。 · nt, 每個 Worker 有 defined role 同 restricted tool set。

好, 第四個 pattern 係 Supervisor-Worker, 又叫做 Orchestrator-Subagent。

First clause (verbatim): 好,

Last clause (verbatim): 每個 Worker 有 defined role 同 restricted tool set。

好,

第四個 pattern 係 Supervisor-Worker,

又叫做 Orchestrator-Subagent。

呢個係 production 系統嘅主流 multi-agent coordination pattern。

一個 Supervisor agent 收到 goal 之後,

decompose 做 tasks,

dispatch 每一個 task 俾 specialized Worker agent,

每個 Worker 有 defined role 同 restricted tool set。

End-of-section recap (last spoken sentence of Pattern 3 — Reflexion): 好, 第四個 pattern 係 Supervisor-Worker, 又叫做 Orchestrator-Subagent。


Section 5/6 — Pattern 4 — Supervisor-Worker & Pattern 5 — Workflow Graph

第四、五個 pattern:Supervisor-Worker 同 Workflow Graph

Section overview: covers turns 23–30 (8 spoken segments).

Topic terms (extracted from spoken text): Supervisor-Worker, human-in-the-loop, auto-negotiation, least-privilege, configuration, orchestration, deterministic, single-agent, Event-Driven, conversation

Latin/English code-terms in this section (verbatim from speech): Supervisor-Worker, human-in-the-loop, auto-negotiation

Section character total: 2,325 characters across 8 spoken turns.

Section duration estimate: ~3:09 of 13:00 total.

Turns in this section: 23, 24, 25, 26, 27, 28, 29, 30.

First spoken sentence of this section (turn 23, verbatim): Anthropic 嘅 multi-agent research system 用嘅就係呢個 pattern, Lead agent plan approach, 同時 spawn 三至五個 subagent 平行做研究, 每個 subagent 用自己嘅 tools 同 context window, 最後 synthesize 佢哋 distilled 嘅 findings 做 final answer。

Average characters per turn (this section): ~290 chars.

Cumulative characters through this section: 7,123 of 7,887 total.

[23 | 08:40] 主持 M (host 子謙):

Turn 23 of 33 · speaker M (host 子謙 — opens and closes) · audio timestamp 08:40 · section 5 (Pattern 4 — Supervisor-Worker & Pattern 5 — Workflow Graph)

speaker=M · chars=370 · ts=08:40 · terms=configuration, single-agent, multi-agent, engineering, synthesize · sentences=2 · clauses=8

Verbatim phrases in this turn: synthesize 佢哋 distilled 嘅 findings 做 final answer。 · research time 縮短九成, 評估贏 single-agent baseline 九成二。

自己嘅 tools 同 context window, 最後 synthesize 佢哋 distilled 嘅 findings 做 final answer。

First clause (verbatim): Anthropic 嘅 multi-agent research system 用嘅就係呢個 pattern,

Last clause (verbatim): 評估贏 single-agent baseline 九成二。

Anthropic 嘅 multi-agent research system 用嘅就係呢個 pattern,

Lead agent plan approach,

同時 spawn 三至五個 subagent 平行做研究,

每個 subagent 用自己嘅 tools 同 context window,

最後 synthesize 佢哋 distilled 嘅 findings 做 final answer。

Anthropic 嘅 engineering write-up 報告 multi-agent configuration 用大約十五倍 single chat 嘅 token,

但係 parallel execution 將 research time 縮短九成,

評估贏 single-agent baseline 九成二。

[24 | 09:03] 嘉賓 F (expert 曉晴):

Turn 24 of 33 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 09:03 · section 5 (Pattern 4 — Supervisor-Worker & Pattern 5 — Workflow Graph)

speaker=F · chars=213 · ts=09:03 · terms=Supervisor-Worker, least-privilege, restriction, attribution, role-based · sentences=1 · clauses=5

Verbatim phrases in this turn: gent_id, 方便 forensic analysis, 每個 Worker 可以獨立 test。

og 入面 attribution 到 specific agent_id, 方便 forensic analysis, 每個 Worker 可以獨立 test。

First clause (verbatim): Supervisor-Worker 嘅優勢係 role-based tool restriction 強制 least-privilege per Worker,

Last clause (verbatim): 每個 Worker 可以獨立 test。

Supervisor-Worker 嘅優勢係 role-based tool restriction 強制 least-privilege per Worker,

獨立嘅 Worker 可以平行執行,

每個 Worker 嘅 tool call 喺 audit log 入面 attribution 到 specific agent_id,

方便 forensic analysis,

每個 Worker 可以獨立 test。

[25 | 09:27] 主持 M (host 子謙):

Turn 25 of 33 · speaker M (host 子謙 — opens and closes) · audio timestamp 09:27 · section 5 (Pattern 4 — Supervisor-Worker & Pattern 5 — Workflow Graph)

speaker=M · chars=299 · ts=09:27 · terms=Supervisor-Worker, round-trip, Supervisor, monolithic, sequential · sentences=2 · clauses=11

Verbatim phrases in this turn: 唔細, 因為每個 task 要 round-trip 經 Supervisor 嘅 hand_off。 · 再出 result, 再 final synthesize, 每個 cycle 加 latency。

但 Supervisor-Worker 嘅成本都唔細, 因為每個 task 要 round-trip 經 Supervisor 嘅 hand_off。

First clause (verbatim): 但 Supervisor-Worker 嘅成本都唔細,

Last clause (verbatim): 每個 cycle 加 latency。

但 Supervisor-Worker 嘅成本都唔細,

因為每個 task 要 round-trip 經 Supervisor 嘅 hand_off。

一個 monolithic ReAct agent 五個 sequential tool call 嘅 task,

Supervisor-Worker 要做三個 hand_off cycle,

即 Supervisor 去 Worker,

Worker 出 result,

Supervisor synthesize,

再去第二個 Worker,

再出 result,

再 final synthesize,

每個 cycle 加 latency。

[26 | 09:50] 嘉賓 F (expert 曉晴):

Turn 26 of 33 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 09:50 · section 5 (Pattern 4 — Supervisor-Worker & Pattern 5 — Workflow Graph)

speaker=F · chars=346 · ts=09:50 · terms=Supervisor-Worker, multi-agent, specialist, competitor, comparison · sentences=3 · clauses=13

Verbatim phrases in this turn: 適合 coding task, 例如 Supervisor 拆做 backend、 · frontend、 · n 三個 Worker 各自研究一個 competitor, 平行行, merge findings。

再做 comparison, Supervisor spawn 三個 Worker 各自研究一個 competitor, 平行行, merge findings。

First clause (verbatim): Supervisor-Worker 適合多 specialist 嘅 task,

Last clause (verbatim): Anthropic 自己嘅 paper 都明講 coding 嘅 dependency 重嘅部分唔適合 multi-agent。

Supervisor-Worker 適合多 specialist 嘅 task,

例如研究三個 competitor 再做 comparison,

Supervisor spawn 三個 Worker 各自研究一個 competitor,

平行行,

merge findings。

亦都適合 coding task,

例如 Supervisor 拆做 backend、

frontend、

test 三個 Worker,

各自負責唔同 layer。

佢唔適合需要 shared context 嘅 task,

因為 disjoint context 會 loss 訊息,

Anthropic 自己嘅 paper 都明講 coding 嘅 dependency 重嘅部分唔適合 multi-agent。

[27 | 10:14] 主持 M (host 子謙):

Turn 27 of 33 · speaker M (host 子謙 — opens and closes) · audio timestamp 10:14 · section 5 (Pattern 4 — Supervisor-Worker & Pattern 5 — Workflow Graph)

speaker=M · chars=281 · ts=10:14 · terms=Supervisor-Worker, auto-negotiation, determinism, production, transcript · sentences=2 · clauses=7

Verbatim phrases in this turn: ance, 失敗可以 spread 去多個 transcript, debugging 難度大幅上升。 · ework, 唔會用 CrewAI 嘅 auto-negotiation, 因為後者太 opaque。

Workers 係 separate agent instance, 失敗可以 spread 去多個 transcript, debugging 難度大幅上升。

First clause (verbatim): Supervisor-Worker 嘅 production 挑戰係 audit 同 determinism,

Last clause (verbatim): 因為後者太 opaque。

Supervisor-Worker 嘅 production 挑戰係 audit 同 determinism,

因為 Workers 係 separate agent instance,

失敗可以 spread 去多個 transcript,

debugging 難度大幅上升。

所以 production 嘅 Supervisor-Worker 通常會配 LangGraph 或者 OpenClaw 呢類 explicit state machine framework,

唔會用 CrewAI 嘅 auto-negotiation,

因為後者太 opaque。

[28 | 10:38] 嘉賓 F (expert 曉晴):

Turn 28 of 33 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 10:38 · section 5 (Pattern 4 — Supervisor-Worker & Pattern 5 — Workflow Graph)

speaker=F · chars=344 · ts=10:38 · terms=orchestration, Event-Driven, conversation, inspectable, by-product · sentences=2 · clauses=9

Verbatim phrases in this turn: nspectable artifact, 而唔係 conversation 嘅 by-product。 · re persist, resume 由 last checkpoint 開始而唔係 restart。

icit graph, nodes 同 edges 都係 inspectable artifact, 而唔係 conversation 嘅 by-product。

First clause (verbatim): 第五個 pattern 係 Event-Driven Workflow Graph,

Last clause (verbatim): resume 由 last checkpoint 開始而唔係 restart。

第五個 pattern 係 Event-Driven Workflow Graph,

即係將個 control flow 寫成 explicit graph,

nodes 同 edges 都係 inspectable artifact,

而唔係 conversation 嘅 by-product。

LangGraph 嘅文件 self-定位為 low-level orchestration framework,

用 node read 同 update shared state object,

edge route,

durable execution 將 run 通過 failure persist,

resume 由 last checkpoint 開始而唔係 restart。

[29 | 11:01] 主持 M (host 子謙):

Turn 29 of 33 · speaker M (host 子謙 — opens and closes) · audio timestamp 11:01 · section 5 (Pattern 4 — Supervisor-Worker & Pattern 5 — Workflow Graph)

speaker=M · chars=218 · ts=11:01 · terms=human-in-the-loop, deterministic, inspectable, transition, LLM-driven · sentences=1 · clauses=4

Verbatim phrases in this turn: oop interrupt 可以 inspect 或者 modify state 喺任何 point。

一個 graph 入面, 而且 human-in-the-loop interrupt 可以 inspect 或者 modify state 喺任何 point。

First clause (verbatim): Workflow graph 嘅強處係 graph 本身係 inspectable artifact,

Last clause (verbatim): 而且 human-in-the-loop interrupt 可以 inspect 或者 modify state 喺任何 point。

Workflow graph 嘅強處係 graph 本身係 inspectable artifact,

每個 transition 都係 human 或者 check 可以企嘅位,

deterministic step 同 LLM-driven step 可以 mix 喺同一個 graph 入面,

而且 human-in-the-loop interrupt 可以 inspect 或者 modify state 喺任何 point。

[30 | 11:25] 嘉賓 F (expert 曉晴):

Turn 30 of 33 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 11:25 · section 5 (Pattern 4 — Supervisor-Worker & Pattern 5 — Workflow Graph)

speaker=F · chars=254 · ts=11:25 · terms=conditional, production, resumable, regulated, LangGraph · sentences=1 · clauses=6

Verbatim phrases in this turn: 習曲線 steep, production system 嘅可維護性贏其他 framework 唔少。

debug 同 audit 都 tractable, 即使學習曲線 steep, production system 嘅可維護性贏其他 framework 唔少。

First clause (verbatim): Workflow graph 適合 complex tool chain 同 resumable flow control,

Last clause (verbatim): production system 嘅可維護性贏其他 framework 唔少。

Workflow graph 適合 complex tool chain 同 resumable flow control,

例如 regulated workflow 有嚴格 review gate 嘅情況,

或者 complex conditional workflow,

LangGraph 嘅 state machine model 令 debug 同 audit 都 tractable,

即使學習曲線 steep,

production system 嘅可維護性贏其他 framework 唔少。

End-of-section recap (last spoken sentence of Pattern 4 — Supervisor-Worker & Pattern 5 — Workflow Graph): Workflow graph 適合 complex tool chain 同 resumable flow control, 例如 regulated workflow 有嚴格 review gate 嘅情況, 或者 complex conditional workflow, LangGraph 嘅 state machine model 令 debug 同 audit 都 tractable, 即使學習曲線 steep, production system 嘅可維護性贏其他 framework 唔少。


Section 6/6 — Wrap-up

總結同下堂預覽

Section overview: covers turns 31–33 (3 spoken segments).

Topic terms (extracted from spoken text): Supervisor-Worker, Plan-and-Execute, Quality-critical, irreversibility, Medium-horizon, reversibility, debuggability, Critic-Actor, coordination, single-agent

Latin/English code-terms in this section (verbatim from speech): Supervisor-Worker, Plan-and-Execute, Quality-critical

Section character total: 764 characters across 3 spoken turns.

Section duration estimate: ~1:10 of 13:00 total.

Turns in this section: 31, 32, 33.

First spoken sentence of this section (turn 31, verbatim): 好, 總結一下。

Average characters per turn (this section): ~254 chars.

Cumulative characters through this section: 7,887 of 7,887 total.

[31 | 11:49] 主持 M (host 子謙):

Turn 31 of 33 · speaker M (host 子謙 — opens and closes) · audio timestamp 11:49 · section 6 (Wrap-up)

speaker=M · chars=317 · ts=11:49 · terms=Supervisor-Worker, Plan-and-Execute, Quality-critical, Medium-horizon, reversibility · sentences=7 · clauses=10

Verbatim phrases in this turn: attern selection 跟三個 axis: task duration、 · action reversibility、 · task duration、action reversibility、autonomy level。

一下。Pattern selection 跟三個 axis: task duration、action reversibility、autonomy level。

First clause (verbatim): 好,

Last clause (verbatim): Regulated workflow 同需要 audit 用 Workflow Graph。

好,

總結一下。

Pattern selection 跟三個 axis: task duration、

action reversibility、

autonomy level。

短 task 可逆 action 用 ReAct。

Medium-horizon 知道 full plan 用 Plan-and-Execute。

Quality-critical 同有 retry budget 用 Reflexion wrap。

Multiple specialist 角色同 parallel execution 用 Supervisor-Worker。

Regulated workflow 同需要 audit 用 Workflow Graph。

[32 | 12:12] 嘉賓 F (expert 曉晴):

Turn 32 of 33 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 12:12 · section 6 (Wrap-up)

speaker=F · chars=273 · ts=12:12 · terms=Supervisor-Worker, irreversibility, debuggability, Critic-Actor, coordination · sentences=2 · clauses=8

Verbatim phrases in this turn: 層 complexity 都係買 capability 之後付出 latency、 · ow Graph, 當 single-agent pattern 確認咗係 insufficient。 · y 都係買 capability 之後付出 latency、cost 同 debuggability。

即 Supervisor-Worker 或者 Workflow Graph, 當 single-agent pattern 確認咗係 insufficient。

First clause (verbatim): 選擇 principle 係,

Last clause (verbatim): cost 同 debuggability。

選擇 principle 係,

由最簡單嘅 pattern 開始,

處理 task duration,

然後加 Critic-Actor 如果 irreversibility 係 concern,

最後先加 multi-agent coordination 即 Supervisor-Worker 或者 Workflow Graph,

當 single-agent pattern 確認咗係 insufficient。

每一層 complexity 都係買 capability 之後付出 latency、

cost 同 debuggability。

[33 | 12:36] 主持 M (host 子謙):

Turn 33 of 33 · speaker M (host 子謙 — opens and closes) · audio timestamp 12:36 · section 6 (Wrap-up)

speaker=M · chars=174 · ts=12:36 · terms=deployment, framework, LangGraph, Microsoft, implement · sentences=2 · clauses=9

Verbatim phrases in this turn: 堂我哋會逐個拆解五大 agent framework, 即係 LangGraph、 · ment 呢啲 pattern, 同埋邊個 framework 適合邊種 deployment 場景。 · 多謝收聽第一課, 我哋下期再見。

Agent Framework, 睇下佢哋點樣 implement 呢啲 pattern, 同埋邊個 framework 適合邊種 deployment 場景。

First clause (verbatim): 下堂我哋會逐個拆解五大 agent framework,

Last clause (verbatim): 我哋下期再見。

下堂我哋會逐個拆解五大 agent framework,

即係 LangGraph、

CrewAI、

AutoGen、

MetaGPT 同埋 Microsoft Agent Framework,

睇下佢哋點樣 implement 呢啲 pattern,

同埋邊個 framework 適合邊種 deployment 場景。

多謝收聽第一課,

我哋下期再見。

End-of-section recap (last spoken sentence of Wrap-up): 下堂我哋會逐個拆解五大 agent framework, 即係 LangGraph、CrewAI、AutoGen、MetaGPT 同埋 Microsoft Agent Framework, 睇下佢哋點樣 implement 呢啲 pattern, 同埋邊個 framework 適合邊種 deployment 場景。


End-of-lesson summary

This lesson covered 6 sections across 33 spoken turns (~13 min audio). Below is the final sentence of each section, preserved verbatim from the source podcast script.

  • Opening & Core Concepts (turn 04): 每一個 pattern 都有明確嘅成本同 trade-off, 例如 ReAct 簡單但浪費 context window, Plan-and-Execute 平但係 plan 容易 stale, Reflexion 準但係 token 用量係乘數級上升。
  • Pattern 1 — ReAct (turn 12): Plan-and-Execute 嘅 plan 仲有一個好實用嘅好處, 就係 plan 係 discrete text artifact, 可以做 pre-execution policy check, 即係喺任何 tool call 之前, automated system 可以 scan 個 plan 嚟 check 有冇 prohibited action 或者未授權嘅 resource reference, 呢樣喺 ReAct 嘅 one-action-at-a-time execution 度做唔到。
  • Pattern 2 — Plan-and-Execute (turn 18): Reflexion 嘅原始 paper 報告, HumanEval 嘅 pass@1 由 GPT-4 嘅百分之八十提升到百分之九十一, 因為 self-feedback 將每次 attempt 嘅 mistake 變成下次嘅 prior。
  • Pattern 3 — Reflexion (turn 22): 好, 第四個 pattern 係 Supervisor-Worker, 又叫做 Orchestrator-Subagent。
  • Pattern 4 — Supervisor-Worker & Pattern 5 — Workflow Graph (turn 30): Workflow graph 適合 complex tool chain 同 resumable flow control, 例如 regulated workflow 有嚴格 review gate 嘅情況, 或者 complex conditional workflow, LangGraph 嘅 state machine model 令 debug 同 audit 都 tractable, 即使學習曲線 steep, production system 嘅可維護性贏其他 framework 唔少。
  • Wrap-up (turn 33): 下堂我哋會逐個拆解五大 agent framework, 即係 LangGraph、CrewAI、AutoGen、MetaGPT 同埋 Microsoft Agent Framework, 睇下佢哋點樣 implement 呢啲 pattern, 同埋邊個 framework 適合邊種 deployment 場景。


End of transcript

Total turns in this lesson: 33 spoken segments · ~13 min audio · preserved verbatim from the source podcast script (/opt/data/workspace/projects/ai-agent-course-01/script_raw.json).

Use the audio player above to listen along. The Quiz section below tests comprehension of this lesson.

Source & integrity

  • Source file: script_raw.json (the line-by-line Cantonese dialogue that was TTS-synthesised into the lesson MP3)
  • Fidelity: all 廣東話 text is byte-identical to the source — no translation, no summarisation, no paraphrasing
  • Markdown structure added: speaker labels, section headings, timestamp markers, per-turn metadata callouts (speaker id, char count, timestamp, verbatim terms), per-section overview blocks, sentence-level line breaks (for readability only)
  • Rendering: react-markdown + remark-gfm in TranscriptPanel.tsx; dark theme & mobile-responsive via Tailwind prose

Integrity checksum

  • Total spoken characters (across all turns): 7,887
  • Total spoken sentences (across all turns): 80
  • Total spoken clauses (across all turns): 256
  • Speaker turn distribution: M=17 · F=16

Lesson quiz · 32 questions

Answered 0 / 32
  1. Question 1

    Which agent pattern interleaves a Reason step with an Act step at every iteration?

  2. Question 2

    What is the main weakness of Plan-and-Execute when the plan goes stale?

  3. Question 3

    Which axis does NOT drive pattern selection?

  4. Question 4

    What is the role of the Critic in a Reflexion loop?

  5. Question 5

    Which pattern is best for short tasks with reversible actions?

  6. Question 6

    In a Supervisor-Worker pattern, who owns the audit attribution of tool calls?

  7. Question 7

    Why is verbose reasoning a weakness of ReAct on long-horizon tasks?

  8. Question 8

    Which pattern fits a regulated workflow that needs explicit review gates?

  9. Question 9

    In LangGraph, what does an edge represent?

  10. Question 10

    What does durable execution give you in LangGraph?

  11. Question 11

    Which pattern has the highest token-multiplier overhead?

  12. Question 12

    When is Supervisor-Worker a poor fit?

  13. Question 13

    What is the recommended first move when prototyping a new agent?

  14. Question 14

    Plan-and-Execute generates the plan:

  15. Question 15

    Which axis gates whether you need a Critic-Actor loop?

  16. Question 16

    In a multi-agent Supervisor-Worker setup, which is NOT a benefit?

  17. Question 17

    Reflexion's "memory" is best described as:

  18. Question 18

    A workflow graph node typically:

  19. Question 19

    For L1 autonomy (human approves every important action), which pattern is appropriate?

  20. Question 20

    What is the architectural cost of Supervisor-Worker vs a monolithic ReAct agent?

  21. Question 21

    Which pattern is hardest to debug in production without explicit state?

  22. Question 22

    ReAct's per-step grounding comes from:

  23. Question 23

    Which is a known failure mode of Plan-and-Execute?

  24. Question 24

    For a coding task with heavy cross-file dependencies, the recommended pattern is:

  25. Question 25

    A 10-step sequential task with no reversibility should use:

  26. Question 26

    The single biggest reason to use a Workflow Graph over ReAct:

  27. Question 27

    A pattern that fits ≤5 tool calls and reversible actions is:

  28. Question 28

    Which of these is NOT a Supervisor-Worker benefit?

  29. Question 29

    In a workflow graph, "human-in-the-loop interrupt" lets you:

  30. Question 30

    Why is "starting simple" the rule for agent architecture?

  31. Question 31

    Which framework self-describes as "low-level orchestration framework"?

  32. Question 32

    What does a node in LangGraph read?

32 unanswered