Learning Map
1
MCP
MCP
把本地或远程 server 暴露的 tools、resources、prompts 接入 Agent。
2
Context
Context
把调用方提供的用户偏好、角色或权限作为 runtime context 注入。
3
State
State
用 AgentState、Command 和 checkpointer 保存跨轮工作记忆。
4
Delegation
Delegation
把子 Agent 包装成工具,让主 Agent 做路由和协调。
5
Data
Data
用 RAG 和 SQL 让 Agent 查询文档和结构化数据库。
Lesson Summary
1
2.1a MCP
点击进入讲解页
连接本地和第三方 MCP server,读取 tools/resources/prompts。
- MCP
- MultiServerMCPClient
- tools
2
2.1b Travel Agent
点击进入讲解页
用远程 Kiwi MCP 工具构建航班查询旅行 Agent。
- remote MCP
- SSE
- travel tools
3
2.2a Runtime Context
点击进入讲解页
通过 context_schema 和 ToolRuntime 读取运行时用户偏好。
- context_schema
- ToolRuntime
- preferences
4
2.2b State
点击进入讲解页
扩展 AgentState,用 Command(update=...) 读写跨轮状态。
- AgentState
- Command
- checkpointer
5
2.3 Multi Agent
点击进入讲解页
把子 Agent 包装成工具,由主 Agent 选择和调用。
- subagent
- delegation
- routing
6
2.4 Wedding Planners
点击进入讲解页
协调航班、场地、歌单三个专家 Agent 完成婚礼策划。
- coordinator
- state
- specialists
7
Bonus RAG
点击进入讲解页
加载 PDF、切分、embedding、向量检索,再包装成 Agent 工具。
- vector store
- retrieval
8
Bonus SQL
点击进入讲解页
封装 SQLDatabase,让 Agent 查询 Chinook SQLite 数据库。
- SQLDatabase
- query tool
- trace
Completion Criteria
- 能用自己的话解释本模块每个 lesson 解决的问题。
- 能指出每个示例中的关键 API,以及它在 Agent 工作流中的位置。
- 能把本模块能力迁移到一个新的小型 Agent 任务里。