A Visual Guide to LLM Agents
- 形式:約 60+ 自訂圖的長文
- 目標:講清 Agent 是什麼、有哪些零件
- 主軸:Memory · Tools · Planning · Multi-Agent
- 產出:心智模型,無可 clone runtime
explainer-hub · LLM agents
把 Maarten 的圖解 newsletter(why)對上 HandsOnLLM 的 TinyAgent 教材 repo(how):同一條 Agent 心智模型,兩種載體。
第一個連結不是 GitHub codebase,是 Substack 圖解長文;第二個才是 O'Reilly 書配套碼庫。兩者是「概念地圖 → 動手組裝」。
illustrated-agentsTinyAgent一句話:Newsletter 定義 Augmented LLM 與 agentic 程度;repo 用純 Python(OpenAI-compatible endpoint)把 Memory / Tools / Planning 嵌進同一個 autonomy loop。
把 newsletter 三大件對到 repo 實際類別與章節。點 tab 看細節。
Short-term:塞 context 或 LLM 摘要。Long-term:向量庫 + RAG。對應 CoALA 式記憶分類。
Memory、TrimmingMemory、SummarizationMemory、LongTermMemory(embedding + cosine)。
Function calling(JSON)、Toolformer、MCP Host/Client/Server 標準化接線。
Tools / NativeTools、MCP notebooks、Skills(SKILL.md)。
CoT → ReAct(Thought/Action/Observation)→ Reflexion / SELF-REFINE。
ReAct(regex parse)、NativeReAct、PlanAndSolve、Reflexion。
Generative Agents、CAMEL、AutoGen、MetaGPT:初始化 + 編排。
多代理協作教學章;目標是理解框架,不是再發明 production orchestrator。
chapter08/chapter08.ipynb核心在 agent.py:模組邊界清楚,迴圈就是 Thought → parse → Action → Observation,直到 final_answer。
urllib 打 OpenAI-compatible /chat/completions;可掛 tools schema。tool_calls 的 NativeReAct。建議順序:先 newsletter 心智模型,再 Ch1→Ch10。Ch5 / Ch6 有多本 notebook,照 README 順序走。
| Newsletter | Repo 落地 |
|---|---|
| Augmented LLM | LLM + tools + memory |
| Short / long-term memory | Trimming / Summarization / LongTermMemory |
| Function calling & MCP | Ch5 Tools · MCP · Skills |
| ReAct | ReAct prompt + regex parse |
| Reflexion | Reflexion.reflect() 每 N 步注入矯正 |
| Coding agent | Ch10:讀寫檔 + execute_python CLI |
execute_python 有 timeout,非完整 sandbox 敘事建議:當「底層原理課」。產品多代理再接 CrewAI / AutoGen / 自家 orchestrator。讀完 newsletter → 跑 Ch1–10 → 對照自己系統的 memory / tools / planner 邊界。