<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>LangGraph on 老张开工了</title>
    <link>/langgraph/</link>
    <description>Recent content in LangGraph on 老张开工了</description>
    <generator>Hugo</generator>
    <language>zh-cn</language>
    <lastBuildDate>Sun, 21 Jun 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="/langgraph/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Graph 工作流：多节点编排</title>
      <link>/posts/2026/06/agent-graph/</link>
      <pubDate>Sun, 21 Jun 2026 00:00:00 +0000</pubDate>
      <guid>/posts/2026/06/agent-graph/</guid>
      <description>单一 ReAct 循环是 Agent 的&amp;quot;单核&amp;quot;——但很多真实任务天然就是图（DAG），而不是直线。本章把 Agent 从&amp;quot;循环&amp;quot;扩展到&amp;quot;有向图&amp;quot;，让你能把分支、并行、汇合、回退写到系统里，而不是让模型现编。&#xA;11.1 为什么单 Loop 不够 让 AI 做一个&amp;quot;自检 + 修复一束文件&amp;quot;的任务，在单 loop 里跑大概是这样：&#xA;thinking: 看 5 个文件 (生成 list) ↓ tool: read 文件 1 ↓ thinking: 文件 1 没问题 ↓ tool: read 文件 2 ↓ thinking: 文件 2 有 lint 错 ↓ tool: edit 文件 2 ↓ ...重复 5 轮，每次都让&amp;#34;thinking&amp;#34;来做路由决策 问题：你反复让模型决定&amp;quot;下一步该看哪一支&amp;quot;，但其实流程是确定的：每个文件都看一遍、有问题就修。这把&amp;quot;决策权&amp;quot;浪费在了不必要的地方，还让模型容易漏一两个文件。&#xA;这是 Graph 工作流要解决的事：把&amp;quot;必然要做的形状&amp;quot;画成 DAG，模型只做每个节点的&amp;quot;实质推理&amp;quot;，流程通过图去接管。&#xA;11.2 Graph Agent 的三件套 ┌─────────────────────────────────────────────────────┐ │ Node : 一个 f(input) -&amp;gt; output 的小 Agent │ │ Edge : 节点之间的连接，可以是固定的 │ │ 也可以是 condition 提供的分支选择 ──┘ │ │ State : 在所有节点之间流动的共享字典 │ └─────────────────────────────────────────────────────┘ 11.</description>
    </item>
  </channel>
</rss>
