{ "cells": [ { "cell_type": "code", "execution_count": 11, "id": "5007e5ee-b2f3-48ba-9e9e-bd2ca430c5e8", "metadata": {}, "outputs": [], "source": [ "#%% 0. 环境准备\n", "# 安装依赖(Notebook 中使用 !pip install)\n", "# !pip install langgraph langchain openai python-dotenv networkx matplotlib langsmith" ] }, { "cell_type": "code", "execution_count": 57, "id": "4f88b9ff-ad04-4981-b892-9200e096d29f", "metadata": {}, "outputs": [ { "data": { "text/markdown": [ "```mermaid\n", "---\n", "config:\n", " flowchart:\n", " curve: linear\n", "---\n", "graph TD;\n", "\t__start__([
__start__
]):::first\n", "\tagent(agent)\n", "\ttool(tool)\n", "\tfinal(final)\n", "\t__end__([__end__
]):::last\n", "\t__start__ --> agent;\n", "\tagent -.-> final;\n", "\tagent -.-> tool;\n", "\ttool --> final;\n", "\tfinal --> __end__;\n", "\tclassDef default fill:#f2f0ff,line-height:1.2\n", "\tclassDef first fill-opacity:0\n", "\tclassDef last fill:#bfb6fc\n", "\n", "```" ], "text/plain": [ "