Learn AI Agent in 2026
Lesson 02

Tools & Function Calling

How agents call external APIs: schemas, retries, error handling, and routing.

0:00 / 0:00

Transcript

Lesson 2: Agent Framework Comparison — 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 2 of 8 · learnagent.lmmlab.com Topic (EN): LangGraph, CrewAI, Microsoft Agent Framework, AutoGen — implementation, trade-offs, fit. Topic (粵): 四大主流 framework。 Speakers: 主持 M (host 子謙) and 嘉賓 F (expert 曉晴) · 28 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 & Framework Choice (粵: 開場同 framework 選擇) — turn 01 onwards
  • 2. LangGraph & CrewAI (粵: LangGraph 同 CrewAI) — turn 05 onwards
  • 3. Microsoft Agent Framework & AutoGen (粵: Microsoft Agent Framework 同 AutoGen) — turn 11 onwards
  • 4. Framework 選擇原則 (粵: Framework 選擇原則) — turn 17 onwards
  • 5. Memory Framework Preview & Wrap-up (粵: Memory Framework 預覽同總結) — turn 23 onwards

Section 1/5 — Opening & Framework Choice

開場同 framework 選擇

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

Topic terms (extracted from spoken text): Supervisor-Worker, Plan-and-Execute, collaboration, maintenance, abstraction, deployment, production, Framework, implement, LangGraph

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

Section character total: 679 characters across 4 spoken turns.

Section duration estimate: ~1:51 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): ~169 chars.

Cumulative characters through this section: 679 of 8,728 total.

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

Turn 1 of 28 · speaker M (host 子謙 — opens and closes) · audio timestamp 00:00 · section 1 (Opening & Framework Choice)

speaker=M · chars=116 · ts=00:00 · terms=deployment, Framework, implement, pattern, Agent · sentences=3 · clauses=6

Verbatim phrases in this turn: 堂講嘅五大架構 pattern, 同埋邊個 framework 適合邊種 deployment 場景。

各位同學早晨, 我係子謙。歡迎收聽第二課。

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

Last clause (verbatim): 同埋邊個 framework 適合邊種 deployment 場景。

各位同學早晨,

我係子謙。

歡迎收聽第二課。

今日嘅主題係 AI Agent Framework,

即係點樣 implement 上一堂講嘅五大架構 pattern,

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

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

Turn 2 of 28 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 00:27 · section 1 (Opening & Framework Choice)

speaker=F · chars=131 · ts=00:27 · terms=maintenance, framework, LangGraph, Microsoft, AutoGen · sentences=2 · clauses=7

Verbatim phrases in this turn: 今日會逐個拆解四大主流 framework, 包括 LangGraph、 · Google ADK, 仲會講點解舊嘅 AutoGen 已經進入 maintenance mode。

AI、Microsoft Agent Framework 同 Google ADK, 仲會講點解舊嘅 AutoGen 已經進入 maintenance mode。

First clause (verbatim): 大家好,

Last clause (verbatim): 仲會講點解舊嘅 AutoGen 已經進入 maintenance mode。

大家好,

我係曉晴。

今日會逐個拆解四大主流 framework,

包括 LangGraph、

CrewAI、

Microsoft Agent Framework 同 Google ADK,

仲會講點解舊嘅 AutoGen 已經進入 maintenance mode。

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

Turn 3 of 28 · speaker M (host 子謙 — opens and closes) · audio timestamp 00:55 · section 1 (Opening & Framework Choice)

speaker=M · chars=251 · ts=00:55 · terms=Supervisor-Worker, Plan-and-Execute, abstraction, production, framework · sentences=3 · clauses=12

Verbatim phrases in this turn: AI Agent 嘅架構 pattern, 即係 ReAct、 · Plan-and-Execute、 · code 嘅工具, 每個 framework 嘅 API abstraction、

首先, 點解 framework choice 咁重要。

First clause (verbatim): 首先,

Last clause (verbatim): 直接影響你嘅 debug 體驗同 cost。

首先,

點解 framework choice 咁重要。

AI Agent 嘅架構 pattern,

即係 ReAct、

Plan-and-Execute、

Supervisor-Worker 呢啲,

係抽象嘅 control flow。

但 framework 係將呢啲 pattern implement 落 code 嘅工具,

每個 framework 嘅 API abstraction、

state 管理、

production readiness 都唔同,

直接影響你嘅 debug 體驗同 cost。

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

Turn 4 of 28 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 01:23 · section 1 (Opening & Framework Choice)

speaker=F · chars=181 · ts=01:23 · terms=collaboration, framework, decompose, reasoning, generate · sentences=5 · clauses=9

Verbatim phrases in this turn: 揀 framework 嘅三條問題。 · 第一, 我嘅 process 要唔要 strong state control。 · 第二, task 可唔可以 decompose 做 role collaboration。

揀 framework 嘅三條問題。第一, 我嘅 process 要唔要 strong state control。

First clause (verbatim): 揀 framework 嘅三條問題。

Last clause (verbatim): 三條問題嘅答案會直接指向適合嘅 framework。

揀 framework 嘅三條問題。

第一,

我嘅 process 要唔要 strong state control。

第二,

task 可唔可以 decompose 做 role collaboration。

第三,

我係要 generate complete software,

定係淨係做 reasoning。

三條問題嘅答案會直接指向適合嘅 framework。

End-of-section recap (last spoken sentence of Opening & Framework Choice): 揀 framework 嘅三條問題。


Section 2/5 — LangGraph & CrewAI

LangGraph 同 CrewAI

Section overview: covers turns 05–10 (6 spoken segments).

Topic terms (extracted from spoken text): speed-to-first-demo, batteries-included, human-in-the-loop, production-grade, orchestration, checkpointing, observability, long-running, non-engineer, conditional

Latin/English code-terms in this section (verbatim from speech): speed-to-first-demo, batteries-included, human-in-the-loop

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

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

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

First spoken sentence of this section (turn 05, verbatim): 好, 第一個 framework, LangGraph。

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

Cumulative characters through this section: 2,490 of 8,728 total.

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

Turn 5 of 28 · speaker M (host 子謙 — opens and closes) · audio timestamp 01:51 · section 2 (LangGraph & CrewAI)

speaker=M · chars=288 · ts=01:51 · terms=orchestration, conditional, high-level, StateGraph, short-term · sentences=3 · clauses=11

Verbatim phrases in this turn: ph, 入面有 node 同 edge, conditional routing、 · 好, 第一個 framework, LangGraph。 · chestration runtime, 唔係 high-level agent framework。

好, 第一個 framework, LangGraph。

First clause (verbatim): 好,

Last clause (verbatim): 同 typed shared state persist 喺 short-term 同 long-term memory 入面。

好,

第一個 framework,

LangGraph。

LangGraph 係 LangChain 團隊出嘅 low-level orchestration runtime,

唔係 high-level agent framework。

佢嘅 metaphor 係 flowchart with memory,

一個 explicit 嘅 StateGraph,

入面有 node 同 edge,

conditional routing、

loop,

同 typed shared state persist 喺 short-term 同 long-term memory 入面。

[06 | 02:19] 嘉賓 F (expert 曉晴):

Turn 6 of 28 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 02:19 · section 2 (LangGraph & CrewAI)

speaker=F · chars=366 · ts=02:19 · terms=human-in-the-loop, checkpointing, inspectable, transition, checkpoint · sentences=2 · clauses=10

Verbatim phrases in this turn: 後可以 resume 由 last checkpoint 開始, 唔係 restart step 1。 · m 提供 managed deployment, 包括 US 同 EU data residency。

cution, 即係 long run 中途 crash 之後可以 resume 由 last checkpoint 開始, 唔係 restart step 1。

First clause (verbatim): LangGraph 嘅核心優勢係 explicit control,

Last clause (verbatim): 包括 US 同 EU data residency。

LangGraph 嘅核心優勢係 explicit control,

每一個 step 都係 inspectable artifact,

transition 可以加入 human-in-the-loop,

而且有 built-in checkpointing 同 durable execution,

即係 long run 中途 crash 之後可以 resume 由 last checkpoint 開始,

唔係 restart step 1。

LangGraph Studio 提供 visual debugging,

LangSmith 提供 tracing 同 evaluation,

LangGraph Platform 提供 managed deployment,

包括 US 同 EU data residency。

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

Turn 7 of 28 · speaker M (host 子謙 — opens and closes) · audio timestamp 02:47 · section 2 (LangGraph & CrewAI)

speaker=M · chars=283 · ts=02:47 · terms=multi-agent, production, generation, LangGraph, assistant · sentences=2 · clauses=7

Verbatim phrases in this turn: LangGraph 已經係 production default。 · t detection, AppFolio 報告十個鐘以上嘅每週節省同兩倍 accuracy 嘅提升。

LangGraph 已經係 production default。

First clause (verbatim): LangGraph 已經係 production default。

Last clause (verbatim): AppFolio 報告十個鐘以上嘅每週節省同兩倍 accuracy 嘅提升。

LangGraph 已經係 production default。

Klarna 用佢做 support assistant,

Uber 用佢做 automated code migration 同 test generation,

LinkedIn 用佢做 recruiter agent 同 SQL bot,

Replit 嘅 coding copilot 都建基於佢嘅 multi-agent 加 HITL support,

Elastic 用佢做 threat detection,

AppFolio 報告十個鐘以上嘅每週節省同兩倍 accuracy 嘅提升。

[08 | 03:15] 嘉賓 F (expert 曉晴):

Turn 8 of 28 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 03:15 · section 2 (LangGraph & CrewAI)

speaker=F · chars=332 · ts=03:15 · terms=batteries-included, production-grade, checkpointing, observability, long-running · sentences=3 · clauses=10

Verbatim phrases in this turn: 但如果你要 production-grade、 · long-running、 · 為佢係 low-level, 唔似其他 framework 咁 batteries-included。

e 係四個 framework 入面最 steep 嘅, 因為佢係 low-level, 唔似其他 framework 咁 batteries-included。

First clause (verbatim): LangGraph 嘅 learning curve 係四個 framework 入面最 steep 嘅,

Last clause (verbatim): 因為之前嘅 version 缺少 checkpointing 同 observability 嘅重要 features。

LangGraph 嘅 learning curve 係四個 framework 入面最 steep 嘅,

因為佢係 low-level,

唔似其他 framework 咁 batteries-included。

但如果你要 production-grade、

long-running、

stateful agent,

又需要 precise control over execution flow,

LangGraph 係唯一可以喺凌晨三點被 page 都唔會嘅選擇。

2026 年嘅 safe version floor 係 0.4 或者以上,

因為之前嘅 version 缺少 checkpointing 同 observability 嘅重要 features。

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

Turn 9 of 28 · speaker M (host 子謙 — opens and closes) · audio timestamp 03:42 · section 2 (LangGraph & CrewAI)

speaker=M · chars=291 · ts=03:42 · terms=collaborate, framework, backstory, intuitive, marketing · sentences=3 · clauses=14

Verbatim phrases in this turn: odel 係 team of roles, 你定義每個 agent 嘅 role、 · goal 同 backstory, 例如 Research Analyst、 · 好, 第二個 framework, CrewAI。

好, 第二個 framework, CrewAI。

First clause (verbatim): 好,

Last clause (verbatim): 真係 work。

好,

第二個 framework,

CrewAI。

CrewAI 嘅 mental model 係 team of roles,

你定義每個 agent 嘅 role、

goal 同 backstory,

例如 Research Analyst、

Content Writer,

然後俾 crew 派 tasks,

framework 會自動 figure out 點 collaborate。

佢嘅 API 係四個 framework 入面最 intuitive 嘅,

大概二十行 code 就可以有一個 working crew,

呢個唔係 marketing 講嘅,

真係 work。

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

Turn 10 of 28 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 04:10 · section 2 (LangGraph & CrewAI)

speaker=F · chars=251 · ts=04:10 · terms=speed-to-first-demo, orchestration, non-engineer, readability, researcher · sentences=3 · clauses=11

Verbatim phrases in this turn: sk decompose 自然變成 roles, 例如一個 researcher、 · 一個 writer、 · CrewAI 嘅核心優勢係 speed-to-first-demo。

CrewAI 嘅核心優勢係 speed-to-first-demo。

First clause (verbatim): CrewAI 嘅核心優勢係 speed-to-first-demo。

Last clause (verbatim): debug 會越來越難。

CrewAI 嘅核心優勢係 speed-to-first-demo。

當 task decompose 自然變成 roles,

例如一個 researcher、

一個 writer、

一個 editor,

想下晝就有 prototype,

CrewAI 嘅 readability 無得輸,

連 non-engineer 都睇得明 crew definition。

但 trade-off 係 implicit orchestration,

過咗幾個月個 crew 越來越複雜嘅時候,

debug 會越來越難。

End-of-section recap (last spoken sentence of LangGraph & CrewAI): CrewAI 嘅核心優勢係 speed-to-first-demo。


Section 3/5 — Microsoft Agent Framework & AutoGen

Microsoft Agent Framework 同 AutoGen

Section overview: covers turns 11–16 (6 spoken segments).

Topic terms (extracted from spoken text): agent-framework-a2a, agent-to-agent, Auto-generated, AssistantAgent, checkpointing, over-delegate, observability, session-based, orchestration, sophisticated

Latin/English code-terms in this section (verbatim from speech): agent-framework-a2a, agent-to-agent, Auto-generated

Section character total: 2,180 characters across 6 spoken turns.

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

Turns in this section: 11, 12, 13, 14, 15, 16.

First spoken sentence of this section (turn 11, verbatim): CrewAI 嘅 production story 2026 年有改善但仍然有 gaps。

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

Cumulative characters through this section: 4,670 of 8,728 total.

[11 | 04:38] 主持 M (host 子謙):

Turn 11 of 28 · speaker M (host 子謙 — opens and closes) · audio timestamp 04:38 · section 3 (Microsoft Agent Framework & AutoGen)

speaker=M · chars=387 · ts=04:38 · terms=agent-to-agent, Auto-generated, checkpointing, over-delegate, coordination · sentences=4 · clauses=10

Verbatim phrases in this turn: CrewAI 嘅 production story 2026 年有改善但仍然有 gaps。 · ckpointing, 即係 failure 即係 full restart, 唔可以 resume。 · ed state, 呢個係 GitHub Discussion 4232 嘅 concrete 數據。

CrewAI 嘅 production story 2026 年有改善但仍然有 gaps。

First clause (verbatim): CrewAI 嘅 production story 2026 年有改善但仍然有 gaps。

Last clause (verbatim): 因為冇 guardrails 之下 hand 俾佢 coordination 就會 over-delegate。

CrewAI 嘅 production story 2026 年有改善但仍然有 gaps。

開源層缺少 built-in checkpointing,

即係 failure 即係 full restart,

唔可以 resume。

另一個 recurring 嘅 issue 係 token cost,

有一個 team 達到八成 token reduction 嘅方法係停用 agent-to-agent messaging 改用 shared state,

呢個係 GitHub Discussion 4232 嘅 concrete 數據。

Auto-generated manager agent 都係一個痛點,

業界講法係 LLM 唔係好嘅 manager,

因為冇 guardrails 之下 hand 俾佢 coordination 就會 over-delegate。

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

Turn 12 of 28 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 05:06 · section 3 (Microsoft Agent Framework & AutoGen)

speaker=F · chars=312 · ts=05:06 · terms=observability, self-hosted, Enterprise, management, execution · sentences=3 · clauses=13

Verbatim phrases in this turn: prise 同 AMP 補返部分 gaps, 提供 no-code deploy、 · execution traces、 · observability, 同埋 SOC2、

HIPAA、SSO、RBAC 嘅 enterprise feature, 可以做 managed SaaS 或者 self-hosted AMP Factory。

First clause (verbatim): CrewAI Enterprise 同 AMP 補返部分 gaps,

Last clause (verbatim): 2026 年嘅 safe version floor 係 0.105 或者以上。

CrewAI Enterprise 同 AMP 補返部分 gaps,

提供 no-code deploy、

execution traces、

observability,

同埋 SOC2、

HIPAA、

SSO、

RBAC 嘅 enterprise feature,

可以做 managed SaaS 或者 self-hosted AMP Factory。

但整體嚟講,

業界嘅 pattern 仍然係 prototype 喺 CrewAI 寫,

然後 migrate 去 LangGraph 當需要 real state management 嘅時候。

2026 年嘅 safe version floor 係 0.105 或者以上。

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

Turn 13 of 28 · speaker M (host 子謙 — opens and closes) · audio timestamp 05:34 · section 3 (Microsoft Agent Framework & AutoGen)

speaker=M · chars=347 · ts=05:34 · terms=AssistantAgent, abstractions, framework, Microsoft, successor · sentences=4 · clauses=11

Verbatim phrases in this turn: , 第三個 framework, Microsoft Agent Framework, 簡稱 MAF。 · Semantic Kernel 嘅 unified successor, 由同一個 team 開發。 · pattern mapping 到 MAF 嘅 Agent 加 Tool abstractions。

好, 第三個 framework, Microsoft Agent Framework, 簡稱 MAF。

First clause (verbatim): 好,

Last clause (verbatim): 兩個都喺 4 月 3 號同時達到 GA。

好,

第三個 framework,

Microsoft Agent Framework,

簡稱 MAF。

MAF 喺 2026 年 4 月 3 號正式 ship 1.0 GA,

係 AutoGen 同 Semantic Kernel 嘅 unified successor,

由同一個 team 開發。

AutoGen 嘅 AssistantAgent 直接 mapping 到 MAF 嘅 ChatAgent,

Semantic Kernel 嘅 Kernel 加 plugin pattern mapping 到 MAF 嘅 Agent 加 Tool abstractions。

MAF 同時支援 Python 同 dot NET 兩個 runtime,

兩個都喺 4 月 3 號同時達到 GA。

[14 | 06:02] 嘉賓 F (expert 曉晴):

Turn 14 of 28 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 06:02 · section 3 (Microsoft Agent Framework & AutoGen)

speaker=F · chars=396 · ts=06:02 · terms=session-based, orchestration, sophisticated, checkpointing, architecture · sentences=3 · clauses=14

Verbatim phrases in this turn: mbing, 包括 session-based state management、 · type safety、 · nt orchestration patterns, 包括 sequential、

on-based state management、type safety、filters、telemetry, 再加埋 connector ecosystem。

First clause (verbatim): MAF 嘅 architecture 結合咗 Semantic Kernel 嘅 enterprise plumbing,

Last clause (verbatim): type-safe routing 同 checkpointing。

MAF 嘅 architecture 結合咗 Semantic Kernel 嘅 enterprise plumbing,

包括 session-based state management、

type safety、

filters、

telemetry,

再加埋 connector ecosystem。

同時有 AutoGen 嘅 multi-agent orchestration patterns,

包括 sequential、

concurrent、

handoff、

group chat,

同埋比較 sophisticated 嘅 Magentic-One pattern 處理 open-ended dynamically planned tasks。

再上面有 graph-based workflow engine,

type-safe routing 同 checkpointing。

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

Turn 15 of 28 · speaker M (host 子謙 — opens and closes) · audio timestamp 06:30 · section 3 (Microsoft Agent Framework & AutoGen)

speaker=M · chars=313 · ts=06:30 · terms=agent-framework-a2a, Agent-to-Agent, cross-runtime, collaboration, discovery · sentences=4 · clauses=11

Verbatim phrases in this turn: MAF 原生支援兩個重要嘅 protocol。 · MCP, 即係 Model Context Protocol, 用嚟做 tool discovery。 · oration, 即係唔同 vendor 嘅 agent 可以 share tool surface。

MAF 原生支援兩個重要嘅 protocol。第一個係 MCP, 即係 Model Context Protocol, 用嚟做 tool discovery。

First clause (verbatim): MAF 原生支援兩個重要嘅 protocol。

Last clause (verbatim): 透過 separate adapter package agent-framework-a2a 提供。

MAF 原生支援兩個重要嘅 protocol。

第一個係 MCP,

即係 Model Context Protocol,

用嚟做 tool discovery。

第二個係 A2A,

即係 Agent-to-Agent protocol,

用嚟做 cross-runtime agent-to-agent collaboration,

即係唔同 vendor 嘅 agent 可以 share tool surface。

A2A 1.0 support 預計會喺 1.0 GA 之後嘅短期內推出,

而家仍然係 beta 階段,

透過 separate adapter package agent-framework-a2a 提供。

[16 | 06:57] 嘉賓 F (expert 曉晴):

Turn 16 of 28 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 06:57 · section 3 (Microsoft Agent Framework & AutoGen)

speaker=F · chars=425 · ts=06:57 · terms=OpenTelemetry, contribution, step-by-step, conventions, predecessor · sentences=4 · clauses=9

Verbatim phrases in this turn: task, 同埋 PII protection 同 prompt injection defense。 · semantic conventions 亦都係 Microsoft 嘅 contribution。 · essor 都提供 migration assistant 同 step-by-step guide。

guardrails, 即係 keep agent on-task, 同埋 PII protection 同 prompt injection defense。

First clause (verbatim): MAF 嘅整合 ecosystem 包括 Azure AI Foundry,

Last clause (verbatim): 但新嘅 feature investment 全部去 MAF。

MAF 嘅整合 ecosystem 包括 Azure AI Foundry,

提供 task adherence guardrails,

即係 keep agent on-task,

同埋 PII protection 同 prompt injection defense。

OpenTelemetry 嘅 GenAI semantic conventions 亦都係 Microsoft 嘅 contribution。

Migration 部分,

Microsoft 為 Semantic Kernel 同 AutoGen 兩個 predecessor 都提供 migration assistant 同 step-by-step guide。

Semantic Kernel v1.x 同 AutoGen 都 commit 咗至少一年嘅 bug fix 同 security patch,

但新嘅 feature investment 全部去 MAF。

End-of-section recap (last spoken sentence of Microsoft Agent Framework & AutoGen): MAF 嘅整合 ecosystem 包括 Azure AI Foundry, 提供 task adherence guardrails, 即係 keep agent on-task, 同埋 PII protection 同 prompt injection defense。


Section 4/5 — Framework 選擇原則

Framework 選擇原則

Section overview: covers turns 17–22 (6 spoken segments).

Topic terms (extracted from spoken text): Community-reported, function-approval, SequentialAgent, infrastructure, multi-language, orchestration, OpenTelemetry, observability, ParallelAgent, deterministic

Latin/English code-terms in this section (verbatim from speech): Community-reported, function-approval, SequentialAgent

Section character total: 2,112 characters across 6 spoken turns.

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

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

First spoken sentence of this section (turn 17, verbatim): MAF 嘅適合場景係已經 invest 喺 Microsoft stack 嘅 enterprise team, 例如用緊 Azure AI Foundry、Azure OpenAI、dot NET services 嘅, 佢哋想搵一個 first-party orchestration layer 配 OpenTelemetry observability 同 Azure Foundry 嘅 responsible AI guardrails。

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

Cumulative characters through this section: 6,782 of 8,728 total.

[17 | 07:25] 主持 M (host 子謙):

Turn 17 of 28 · speaker M (host 子謙 — opens and closes) · audio timestamp 07:25 · section 4 (Framework 選擇原則)

speaker=M · chars=410 · ts=07:25 · terms=orchestration, OpenTelemetry, observability, Magentic-One, organization · sentences=2 · clauses=11

Verbatim phrases in this turn: 嘅 enterprise team, 例如用緊 Azure AI Foundry、 · Azure OpenAI、 · 同埋想用 multi-agent patterns 即係 sequential、

layer 配 OpenTelemetry observability 同 Azure Foundry 嘅 responsible AI guardrails。

First clause (verbatim): MAF 嘅適合場景係已經 invest 喺 Microsoft stack 嘅 enterprise team,

Last clause (verbatim): Magentic-One 加埋 migration tooling out of the box 嘅 organization。

MAF 嘅適合場景係已經 invest 喺 Microsoft stack 嘅 enterprise team,

例如用緊 Azure AI Foundry、

Azure OpenAI、

dot NET services 嘅,

佢哋想搵一個 first-party orchestration layer 配 OpenTelemetry observability 同 Azure Foundry 嘅 responsible AI guardrails。

亦都適合 .NET shop 想搵 first-class C# runtime 配 Python,

同埋想用 multi-agent patterns 即係 sequential、

concurrent、

handoff、

group chat、

Magentic-One 加埋 migration tooling out of the box 嘅 organization。

[18 | 07:53] 嘉賓 F (expert 曉晴):

Turn 18 of 28 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 07:53 · section 4 (Framework 選擇原則)

speaker=F · chars=379 · ts=07:53 · terms=Community-reported, function-approval, infrastructure, orchestration, reliability · sentences=3 · clauses=7

Verbatim phrases in this turn: 仍然係新, validation 必須針對你自己嘅 reliability requirement。 · scoping, 同埋 non-Azure provider adapter 嘅 edge case。 · 因為 Azure-first testing path 未 exercise 嘅 edge case。

但要 eye-open 一點嘅係, MAF 1.0 仍然係新, validation 必須針對你自己嘅 reliability requirement。

First clause (verbatim): 但要 eye-open 一點嘅係,

Last clause (verbatim): 要 thorough validation 同 plan extra work 因為 Azure-first testing path 未 exercise 嘅 edge case。

但要 eye-open 一點嘅係,

MAF 1.0 仍然係新,

validation 必須針對你自己嘅 reliability requirement。

Community-reported issues cluster 喺 orchestration design trade-offs 例如 sequential context handling 同 function-approval scoping,

同埋 non-Azure provider adapter 嘅 edge case。

如果 non-Azure infrastructure 嘅 team 用 MAF,

要 thorough validation 同 plan extra work 因為 Azure-first testing path 未 exercise 嘅 edge case。

[19 | 08:21] 主持 M (host 子謙):

Turn 19 of 28 · speaker M (host 子謙 — opens and closes) · audio timestamp 08:21 · section 4 (Framework 選擇原則)

speaker=M · chars=242 · ts=08:21 · terms=multi-language, Development, multi-agent, TypeScript, structures · sentences=3 · clauses=13

Verbatim phrases in this turn: 第一係 genuinely multi-language, 支援 Python、 · TypeScript、 · , 第四個 framework, Google ADK, Agent Development Kit。

好, 第四個 framework, Google ADK, Agent Development Kit。

First clause (verbatim): 好,

Last clause (verbatim): 提供四種唔同嘅 multi-agent 組合方式。

好,

第四個 framework,

Google ADK,

Agent Development Kit。

ADK 兩個 standout 嘅原因,

第一係 genuinely multi-language,

支援 Python、

TypeScript、

Go、

Java 同 Kotlin SDKs,

Go 喺 2026 年達到 2.0 GA。

第二係 widest range 嘅 explicit workflow structures,

提供四種唔同嘅 multi-agent 組合方式。

[20 | 08:49] 嘉賓 F (expert 曉晴):

Turn 20 of 28 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 08:49 · section 4 (Framework 選擇原則)

speaker=F · chars=487 · ts=08:49 · terms=SequentialAgent, ParallelAgent, deterministic, collaborative, programmatic · sentences=6 · clauses=17

Verbatim phrases in this turn: 係 template workflows, 包括 SequentialAgent、 · ParallelAgent、 · ADK 嘅四種 workflow structure。

ADK 嘅四種 workflow structure。

First clause (verbatim): ADK 嘅四種 workflow structure。

Last clause (verbatim): ParallelAgent 入面可以再包含另一個 SequentialAgent。

ADK 嘅四種 workflow structure。

第一種係 template workflows,

包括 SequentialAgent、

ParallelAgent、

LoopAgent,

係 pre-built pattern 繼承 common BaseAgent。

第二種係 graph-based workflows,

ADK 2.0 以上開始支援,

可以 mix AI agents 同 deterministic nodes 加 branching。

第三種係 dynamic workflows,

提供完全 programmatic control。

第四種係 collaborative workflows,

由單一 coordinator agent 動態 direct sub-agents。

ADK 嘅特別之處係 workflow agents 本身都係 agents,

所以可以 nest,

例如 SequentialAgent 入面可以包含 ParallelAgent,

ParallelAgent 入面可以再包含另一個 SequentialAgent。

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

Turn 21 of 28 · speaker M (host 子謙 — opens and closes) · audio timestamp 09:17 · section 4 (Framework 選擇原則)

speaker=M · chars=397 · ts=09:17 · terms=multi-language, self-hosted, directions, Deployment, Sequential · sentences=3 · clauses=14

Verbatim phrases in this turn: loyment target 包括 Vertex AI Agent Engine、 · Cloud Run、 · , template workflow agents 即係 Sequential、

ions 都得, 即係可以 expose 自己嘅 agent 俾其他 framework 用, 亦可以 consume 其他 framework 嘅 agent。

First clause (verbatim): ADK 原生支援 MCP tools 同 A2A protocol,

Last clause (verbatim): 係 lower-risk 嘅 starting point 如果唔需要 graph branching。

ADK 原生支援 MCP tools 同 A2A protocol,

兩個 directions 都得,

即係可以 expose 自己嘅 agent 俾其他 framework 用,

亦可以 consume 其他 framework 嘅 agent。

Deployment target 包括 Vertex AI Agent Engine、

Cloud Run、

GKE,

或者 self-hosted。

ADK 2.0 喺 2026 年 ship graph workflows,

multi-language SDKs 以唔同 rate maturing,

template workflow agents 即係 Sequential、

Parallel、

Loop 已經 stable 比較耐,

係 lower-risk 嘅 starting point 如果唔需要 graph branching。

[22 | 09:45] 嘉賓 F (expert 曉晴):

Turn 22 of 28 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 09:45 · section 4 (Framework 選擇原則)

speaker=F · chars=197 · ts=09:45 · terms=graph-based, TypeScript, framework, workflows, template · sentences=2 · clauses=8

Verbatim phrases in this turn: ex AI 上 build, 或者想用一個 framework 跨 Python、 · TypeScript、 · 者想用一個 framework 跨 Python、TypeScript、Go、Java、Kotlin。

Cloud 或者 Vertex AI 上 build, 或者想用一個 framework 跨 Python、TypeScript、Go、Java、Kotlin。

First clause (verbatim): ADK 嘅適合場景係 team 已經喺 Google Cloud 或者 Vertex AI 上 build,

Last clause (verbatim): 或者 1.0 如果只需要 template workflows。

ADK 嘅適合場景係 team 已經喺 Google Cloud 或者 Vertex AI 上 build,

或者想用一個 framework 跨 Python、

TypeScript、

Go、

Java、

Kotlin。

2026 年嘅 version floor 係 2.0 以上如果需要 graph-based workflows,

或者 1.0 如果只需要 template workflows。

End-of-section recap (last spoken sentence of Framework 選擇原則): ADK 嘅適合場景係 team 已經喺 Google Cloud 或者 Vertex AI 上 build, 或者想用一個 framework 跨 Python、TypeScript、Go、Java、Kotlin。


Section 5/5 — Memory Framework Preview & Wrap-up

Memory Framework 預覽同總結

Section overview: covers turns 23–28 (6 spoken segments).

Topic terms (extracted from spoken text): Retrieval-Augmented, community-managed, Supervisor-Worker, interoperability, single-framework, Plan-and-Execute, production-grade, often-overlooked, cross-framework, multi-language

Latin/English code-terms in this section (verbatim from speech): Retrieval-Augmented, community-managed, Supervisor-Worker

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

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

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

First spoken sentence of this section (turn 23, verbatim): 順帶一提 AutoGen 嘅 status。

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

Cumulative characters through this section: 8,728 of 8,728 total.

[23 | 10:12] 主持 M (host 子謙):

Turn 23 of 28 · speaker M (host 子謙 — opens and closes) · audio timestamp 10:12 · section 5 (Memory Framework Preview & Wrap-up)

speaker=M · chars=379 · ts=10:12 · terms=community-managed, maintenance, Microsoft, community, LangGraph · sentences=6 · clauses=15

Verbatim phrases in this turn: 該 start 喺 AutoGen, 應該去 MAF, 或者 LangGraph、 · 順帶一提 AutoGen 嘅 status。 · tenance mode, 即係 community-managed 但冇 new features。

順帶一提 AutoGen 嘅 status。

First clause (verbatim): 順帶一提 AutoGen 嘅 status。

Last clause (verbatim): CrewAI 如果唔係 Microsoft stack。

順帶一提 AutoGen 嘅 status。

AutoGen 喺 2026 年已經進入 maintenance mode,

即係 community-managed 但冇 new features。

Microsoft 嘅 forward path 係 MAF 1.0,

2026 年 4 月 ship。

AG2 係 original creators Chi Wang 同 Qingyun Wu 開嘅 community fork,

繼續維護舊嘅 API surface。

所以 2026 年選擇 AutoGen 等於 choose 一個,

MAF 或者 AG2,

而唔係 default。

結論係如果新 project,

唔應該 start 喺 AutoGen,

應該去 MAF,

或者 LangGraph、

CrewAI 如果唔係 Microsoft stack。

[24 | 10:40] 嘉賓 F (expert 曉晴):

Turn 24 of 28 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 10:40 · section 5 (Memory Framework Preview & Wrap-up)

speaker=F · chars=319 · ts=10:40 · terms=interoperability, single-framework, cross-framework, integrations, LangGraph · sentences=3 · clauses=8

Verbatim phrases in this turn: MCP 同 A2A 已經變成 cross-framework norm。 · ework agent interoperability 已經由 exception 變成 norm。 · amework lock-in 嘅 risk 越來越細, 但同時意味你需要理解多個 protocol。

MCP 同 A2A 已經變成 cross-framework norm。

First clause (verbatim): MCP 同 A2A 已經變成 cross-framework norm。

Last clause (verbatim): 但同時意味你需要理解多個 protocol。

MCP 同 A2A 已經變成 cross-framework norm。

LangGraph 透過 LangChain tool integrations 支援 MCP,

CrewAI 有 growing MCP support,

MAF 同 Google ADK 兩者都原生支援 MCP 同 A2A,

即係 cross-framework agent interoperability 已經由 exception 變成 norm。

呢個係 framework landscape 2026 年嘅重要 shift,

即係 single-framework lock-in 嘅 risk 越來越細,

但同時意味你需要理解多個 protocol。

[25 | 11:08] 主持 M (host 子謙):

Turn 25 of 28 · speaker M (host 子謙 — opens and closes) · audio timestamp 11:08 · section 5 (Memory Framework Preview & Wrap-up)

speaker=M · chars=319 · ts=11:08 · terms=multi-language, production, role-based, enterprise, framework · sentences=8 · clauses=14

Verbatim phrases in this turn: 好, framework selection 嘅 framework 返返。 · 第一, version floor。 · .105 以上, MAF 1.0 GA, ADK 2.0 以上如果要 graph workflows。

好, framework selection 嘅 framework 返返。第一, version floor。

First clause (verbatim): 好,

Last clause (verbatim): Google Cloud 或者 multi-language team → ADK。

好,

framework selection 嘅 framework 返返。

第一,

version floor。

LangGraph 0.4 以上,

CrewAI 0.105 以上,

MAF 1.0 GA,

ADK 2.0 以上如果要 graph workflows。

第二,

對應 production use case。

Regulated workflow + 嚴格 review gate → LangGraph。

Fast role-based prototype → CrewAI。

Azure 或者 dot NET enterprise → MAF。

Google Cloud 或者 multi-language team → ADK。

[26 | 11:36] 嘉賓 F (expert 曉晴):

Turn 26 of 28 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 11:36 · section 5 (Memory Framework Preview & Wrap-up)

speaker=F · chars=382 · ts=11:36 · terms=Supervisor-Worker, Plan-and-Execute, production-grade, checkpointing, sanitisation · sentences=6 · clauses=12

Verbatim phrases in this turn: 第三, 對應架構 pattern 嘅 mapping。 · ReAct 全部 framework 都可以。 · te, LangGraph 同 MAF 最 explicit, 因為兩者都係 graph-based。

第三, 對應架構 pattern 嘅 mapping。ReAct 全部 framework 都可以。

First clause (verbatim): 第三,

Last clause (verbatim): LangGraph 同 MAF 最 production-grade 因為有 native checkpointing 同 HITL。

第三,

對應架構 pattern 嘅 mapping。

ReAct 全部 framework 都可以。

Plan-and-Execute,

LangGraph 同 MAF 最 explicit,

因為兩者都係 graph-based。

Reflexion 可以 wrap 任何 framework 但需要自己 implement memory sanitisation。

Supervisor-Worker,

CrewAI 同 ADK 最 natural 因為 role-based 同 workflow template native,

LangGraph 需要 manual graph wiring。

Workflow Graph,

LangGraph 同 MAF 最 production-grade 因為有 native checkpointing 同 HITL。

[27 | 12:04] 主持 M (host 子謙):

Turn 27 of 28 · speaker M (host 子謙 — opens and closes) · audio timestamp 12:04 · section 5 (Memory Framework Preview & Wrap-up)

speaker=M · chars=340 · ts=12:04 · terms=often-overlooked, checkpointing, structured, production, framework · sentences=3 · clauses=12

Verbatim phrases in this turn: tructured logging of every step 包括 input、 · 最後, 一個 often-overlooked 嘅建議。 · 包括 input、tool、output 因為你會需要 debug, 同埋 kill switch。

最後, 一個 often-overlooked 嘅建議。

First clause (verbatim): 最後,

Last clause (verbatim): 但其他都要自己 build。

最後,

一個 often-overlooked 嘅建議。

Budget 嗰 boring 嘅 80%,

即係 retries with backoff on tool calls,

hard timeout 同 step cap 等 looping agent 唔可以燒 token budget,

structured logging of every step 包括 input、

tool、

output 因為你會需要 debug,

同埋 kill switch。

三個 framework 都唔會免費送呢啲 production hygiene,

LangGraph 最 close 因為有 durable runs 同 checkpointing,

但其他都要自己 build。

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

Turn 28 of 28 · speaker F (expert 曉晴 — explains concepts and trade-offs) · audio timestamp 12:32 · section 5 (Memory Framework Preview & Wrap-up)

speaker=F · chars=207 · ts=12:32 · terms=Retrieval-Augmented, multi-session, Architecture, procedural, Generation · sentences=2 · clauses=7

Verbatim phrases in this turn: 討 Agent Memory Architecture, 包括 episodic、 · semantic、 · 等到 agent 可以喺 multi-session 之間保持 identity 同 memory。

同埋點樣設計 long-term memory system 等到 agent 可以喺 multi-session 之間保持 identity 同 memory。

First clause (verbatim): 下堂我哋會深入探討 Agent Memory Architecture,

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

下堂我哋會深入探討 Agent Memory Architecture,

包括 episodic、

semantic、

procedural memory 同 Retrieval-Augmented Generation,

同埋點樣設計 long-term memory system 等到 agent 可以喺 multi-session 之間保持 identity 同 memory。

多謝收聽第二課,

我哋下期再見。

End-of-section recap (last spoken sentence of Memory Framework Preview & Wrap-up): 下堂我哋會深入探討 Agent Memory Architecture, 包括 episodic、semantic、procedural memory 同 Retrieval-Augmented Generation, 同埋點樣設計 long-term memory system 等到 agent 可以喺 multi-session 之間保持 identity 同 memory。


End-of-lesson summary

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

  • Opening & Framework Choice (turn 04): 揀 framework 嘅三條問題。
  • LangGraph & CrewAI (turn 10): CrewAI 嘅核心優勢係 speed-to-first-demo。
  • Microsoft Agent Framework & AutoGen (turn 16): MAF 嘅整合 ecosystem 包括 Azure AI Foundry, 提供 task adherence guardrails, 即係 keep agent on-task, 同埋 PII protection 同 prompt injection defense。
  • Framework 選擇原則 (turn 22): ADK 嘅適合場景係 team 已經喺 Google Cloud 或者 Vertex AI 上 build, 或者想用一個 framework 跨 Python、TypeScript、Go、Java、Kotlin。
  • Memory Framework Preview & Wrap-up (turn 28): 下堂我哋會深入探討 Agent Memory Architecture, 包括 episodic、semantic、procedural memory 同 Retrieval-Augmented Generation, 同埋點樣設計 long-term memory system 等到 agent 可以喺 multi-session 之間保持 identity 同 memory。


End of transcript

Total turns in this lesson: 28 spoken segments · ~13 min audio · preserved verbatim from the source podcast script (/opt/data/workspace/projects/ai-agent-course-02/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): 8,728
  • Total spoken sentences (across all turns): 98
  • Total spoken clauses (across all turns): 303
  • Speaker turn distribution: M=14 · F=14

Lesson quiz · 34 questions

Answered 0 / 34
  1. Question 1

    Function calling requires what kind of schema for each tool?

  2. Question 2

    What happens when a tool raises a deterministic error during retry?

  3. Question 3

    A rate-limit response should trigger:

  4. Question 4

    Why use an idempotency key on a tool call?

  5. Question 5

    Tool selection accuracy drops when:

  6. Question 6

    The first stage of hierarchical routing picks:

  7. Question 7

    What is returned to the LLM when a tool errors?

  8. Question 8

    Which error type should NOT trigger a retry loop?

  9. Question 9

    An idempotency key should be:

  10. Question 10

    Tool schemas live where in the system?

  11. Question 11

    What does exponential backoff compute?

  12. Question 12

    A flaky tool should:

  13. Question 13

    When the LLM emits invalid JSON for tool arguments:

  14. Question 14

    A 20-tool catalog should be split by:

  15. Question 15

    Why might a tool that succeeded return `ok=False`?

  16. Question 16

    The most common cause of "tool hallucination" is:

  17. Question 17

    Which is a good idempotency key for "send email" retries?

  18. Question 18

    A "tool" in agent context is best thought of as:

  19. Question 19

    Function-calling output from the LLM is:

  20. Question 20

    For rate-limited external APIs, the agent should:

  21. Question 21

    Why validate tool arguments before dispatch?

  22. Question 22

    A tool registry is best organized:

  23. Question 23

    What is the downside of an unbounded retry loop?

  24. Question 24

    When the LLM picks the wrong tool, the fix is usually:

  25. Question 25

    Tool errors that contain sensitive data should:

  26. Question 26

    A "tool success" with `ok=False` payload means:

  27. Question 27

    Which of these is NOT a good tool description?

  28. Question 28

    A typed error returned to the LLM should include:

  29. Question 29

    The runtime should enforce:

  30. Question 30

    Function-calling interfaces exist to:

  31. Question 31

    Hierarchical routing helps when:

  32. Question 32

    A tool that is no longer used should be:

  33. Question 33

    Why prefer JSON Schema over free-form text for tool args?

  34. Question 34

    For high-throughput agent workloads, batched tool calls:

34 unanswered