Files
zhuangang/topics/ai/langgraph/index.md
T

45 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
id: ai.langgraph.index
title: LangGraph
type: index
domain: ai
stack: [langgraph]
tags: [LangGraph, 状态图, 检查点, 人机协作]
week: [11, 12]
---
# LangGraph
用有状态的图编排 Agent。岗位要求里的“工作流编排、多 Agent、人工介入、任务状态、异常恢复”基本都落在这里。先在第 10 周手写工具调用循环,再用 LangGraph 重写。
## 学习路线
| 顺序 | 课程 | 级别 | 预计 |
| --- | --- | --- | --- |
| 1 | [LangGraph 状态图:状态、节点、边、条件路由和流式输出](01-state-graph.md) | 进阶 | 3 小时 |
| 2 | [检查点、人机协作和异常恢复:checkpointer、interrupt、RetryPolicy、任务状态](02-persistence-hitl.md) | 高级 | 4 小时 |
## 企业场景
- [退款工单 Agent:人工审批、任务状态和崩溃恢复](scenarios/refund-approval.md)
## 面试题
- [LangGraph 面试题](interview.md)
## 示例代码
- [examples/ticket-flow](examples/ticket-flow/):工单处理图——pydantic 校验结构化输出、`RetryPolicy` 重试、`interrupt` 人工审批、`custom` 流式进度、`SqliteSaver` 崩溃续跑、幂等发送;带 pytest 测试(需要 `langgraph`、`langgraph-checkpoint-sqlite`、`pydantic`)
## 在 16 周计划中
- [第 11 周:LangGraph 多 Agent 编排](../../../plan/week11-agent-m2-langgraph.md)、[第 12 周:持久化和人机协作](../../../plan/week12-agent-m3-persistence.md)
## 官方资料
LangGraph 更新很快,以官方文档为准:
- https://docs.langchain.com/oss/python/langgraph/overview
- 持久化:https://docs.langchain.com/oss/python/langgraph/persistence
- 人机协作:https://docs.langchain.com/oss/python/langgraph/interrupts