• What is an AI agent?
Chapter 1 from Build an AI Agent (From Scratch)
by Jungjun Hur and Younghee Song
• Building tool-based agents with LangGraph
Chapter 11 from AI Agents and Applications
by Roberto Infante
• Errand: Breaking complex workflows into units
Chapter 3 from Agent Design Patterns
by Peter Belcak
• Building robust agents with evaluation and feedback
Chapter 7 from AI Agents in Action, Second Edition
by Micheal Lanham
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A practical sampler that turns the vague idea of "AI agents" into an engineering discipline: it shows when to hand control to a model, how to wire tools and state into a working loop, how to break messy workflows into testable units, and how to evaluate and improve the result. Best for developers and technical leads who already know some LLM basics and want a mental model they can debug, not just a framework to copy.
【Book Arc】
- **Opening (~0%–10%)**: Frames the whole sampler and defines what an agent actually is — an LLM given tools plus a loop that decides its own next step — and contrasts this with developer-defined workflows.
- **Early (~10%–32%)**: Builds the conceptual foundation: the LLM/tool/loop triad, the workflow-vs-agent spectrum (chains, routers, tool-using loops), criteria for when a task needs an LLM and when it needs an agent, and the GAIA benchmark as a practice ground.
- **Early–Middle (~32%–42%)**: Shifts from "what is an agent" to "why agents fail," introducing context engineering — prompt vs. context, information deficiency as a leading failure cause, and the generate/retrieve/write/reduce/isolate strategies.
- **Middle (~42%–48%)**: Moves into hands-on construction with LangGraph: project setup, a travel-information agent, registering and executing tools, conversation state, and vector-store retrieval for grounding.
- **Late (~48%–63%)**: Continues the LangGraph build toward conditional routing, inspecting messages and tool calls, debugging execution, and comparing a custom graph with the prebuilt ReAct agent.
- **Late–Ending (~63%–100%)**: Introduces the "errand" pattern for splitting complex workflows into focused, testable units, then closes with evaluation and feedback loops for making agents robust.
【Key Takeaways】
- **An agent is defined by autonomous control flow** (Early): the LLM decides what to do next and when to stop, rather than following hardcoded branches — this single distinction separates agents from workflows.
- **Three elements make autonomy real: LLM + tools + loop** (Early): the model is the brain, tools extend its action space into the world, and the loop unfolds decisions over time until the goal is met.
- **Workflow vs. agent is a cost/value trade-off, not a dogma** (Early): agents buy flexibility but cost more LLM calls and are harder to control; production systems typically mix both, using agents only where flexibility genuinely pays.
- **Ask two questions before building** (Early): does this task need an LLM at all, and if so, does it need an agent or will a workflow suffice? "No" at either stage means pick the simpler, cheaper option.
- **Most real-world agent failures are information failures, not intelligence failures** (Early–Middle): if the needed facts aren't in context, even a strong model fails — which is why context engineering matters more than prompt phrasing.
- **Context engineering has five reusable moves** (Middle): generate, retrieve, write, reduce, and isolate — a framework for feeding the model the right information at the right time and preventing context rot.
- **LangGraph makes the loop concrete and inspectable** (Middle–Late): registering tools, holding state, adding conditional routing, and reading message/tool-call traces turn agent behavior into something you can debug rather than guess at.
- **Complex workflows should be decomposed into "errands"** (Late): small, focused, testable routines keep behavior manageable as systems grow, and evaluation plus feedback closes the improvement loop.
【Reading Tips】
- **Deep-read the opening chapter's workflow-vs-agent comparison** — it's the decision framework the rest of the book assumes; skim the GAIA benchmark details if you're not planning to benchmark.
- **Treat the LangGraph chapter as a lab, not prose**: follow the setup, tool registration, and routing steps in code, and pay attention to how messages and tool calls are inspected — that's where debugging skill comes from.
- **Read the context-engineering section twice**: the five strategies (generate/retrieve/write/reduce/isolate) are the most transferable ideas and apply regardless of framework.
- **Skim the errand and evaluation chapters first for structure**, then return when your own agent gets too tangled to test — they're most useful once you have something to refactor.
- **Budget for the tooling**: the excerpts mention Python package setup, an OpenAI API key, and a Tavily search key, with exercises estimated under $10 — set these up before starting the hands-on chapter.
【Coverage Limits】
This guide is based on stratified excerpts from a four-chapter sampler, so it reflects the book's framing and early-to-mid material more than its full depth; specific code listings, later chapters, and detailed evaluation mechanics are only partially covered. The excerpts do not cover the complete errand and feedback chapters in detail.
Page 6
” from Build an AI Agent (From Scratch) by Jungjun Hur and Younghee Song, starts with explaining the three elements behind agent auton- omy. Then, you’ll com...
e lens of the agent loop. 3 Add information to LLM context. 1 2 Need tool? Execute. User: 2024 Nobel Physics LLM Tool Tool result Decide to use tool. 4 Enoug...
, tool execution results, and retrieved documents. In this sense, prompts are one component of context. Think of context as the LLM’s working memory. Just as...
h components ¡ Observing agent execution with LangSmith You learned that agentic workflows are fundamentally deterministic: their logic is based on flows wit...
fing in question to ➥ Cornwall."} answer) tools=[search_travel_info_tool], Registers the tool so the model tool_choice="auto", knows it can call it if needed...
ow ready to run your first agent-based chatbot. Try asking it about destinations or activities in Cornwall, and experience how the agent reasons, retrieves i...
d won’t pick them from its own “knowledge.” This minimizes hallucinations and guarantees the data used comes from your knowledge base. Continue stepping thro...
tputs across tools with the LLM orchestrating the sequence. For example, search_customer → get_orders → calculate_total hap- pens automatically based on the...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
这本书汇集多位作者关于 AI 智能体工程化的章节,围绕工具、工作流与反馈三个关键词展开,讨论如何把大语言模型从单纯的对话接口变成能完成实际任务的智能体系统。开篇从最基本的问题入手:什么是 AI 智能体,为后续的工程实践搭起概念框架。接着进入具体构建层面,介绍如何用 LangGraph 搭建基于工具的智能体,让模型能够调用外部能力,例如网络搜索、数据库查询、文件读取以及从向量数据库中检索文档。这类工具接入的核心价值在于,智能体因此可以获取训练数据之外的实时信息或特定领域知识,而不必依赖预先写入模型的内容。书中给出的代码示例展示了工具注册与调用的机制:把搜索工具注册给模型,并设置自动选择模式,模型便能自行判断是否需要调用以及何时调用。
在工作流部分,书中提出把复杂任务拆解为单元的思路,并强调一个基本原则:大语言模型在任务聚焦、定义明确时表现最好。开发者预先设计好流程,由模型按顺序执行每一步,而不是一次性要求模型完成全部工作。工具之间的衔接也可以由模型编排,例如按用户请求自动依次执行搜索客户、获取订单、计算总额等步骤,无需硬编码固定顺序。最后一个重点是如何让智能体更稳健,书中讨论了评估与反馈机制,说明通过评测和反馈循环来检验和改...
Digital LibraryAI Assistant
Hi — I can help you pick a book. Tell me a topic, language, or level, e.g. “a light English read”. If that's too broad, I'll ask one follow-up.
Loading comments...
Reply to Comment
Edit Comment