返回市场
代理教程

代理教程

作者:TuebingenAICenter11 星标更新:2025-09-23

项目介绍

Agents, MCPs & LangGraph - 教程

此仓库作为在GCPR 2025上展示的代理系统教程的官方配套资源。内容主要集中在构建健壮、多步骤代理的两个关键框架:LangGraph模型上下文协议(MCP)

所有代码和材料都提供以促进动手学习体验。

快速开始

所有课程都可以在Google Colab中运行。点击下面的图标以在Colab中打开相应的笔记本并开始学习。

课程笔记本/文件夹名称跟随代码完整解决方案
介绍langgraph01_basic_langgraph_chatbot-在Colab中打开
langgraph基础02_chat_with_pdfs_and_youtube在Colab中打开在Colab中打开
MCPhello-mcp/在Colab中打开-
编排03_deepresearch-在Colab中打开

[!NOTE] 如果使用Colab,请确保在每个笔记本的第一个单元格中运行以安装所需的包,因为每个Colab笔记本都在一个全新的环境中运行。

记得在第一个单元格创建的.env文件中添加您的API密钥。

本地设置

对于那些想要更深入探索的人,可以按照以下说明在本地系统上设置该仓库

  1. 克隆仓库
        git clone https://github.com/TuebingenAICenter/agent-tutorial-dev.git
        cd agent-tutorial
    
  2. 使用您选择的Python管理器创建并激活虚拟环境。安装所需包。(以下是uvvenv的说明)
  3. 复制env.example文件并将其重命名为.env。向此文件中添加您的API密钥。

venv

    # 我们推荐使用python 3.12,但任何版本>=3.10应该都能工作
    python3.12 -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt

uv [推荐]

    uv venv -p 3.12
    source .venv/bin/activate
    uv pip install -r requirements.txt

作者与合作者

<table width="100%"> <tr> <td align="center"> <div style="width: 150px;"> <img src="https://gips0.baidu.com/it/u=1756696307,1602871208&fm=3081&app=3081&f=JPEG?w=301&h=301" alt="Peter Gehler" width="150px;"> <h4> <a href="https://tuebingen.ai"> Peter Gehler </a> </h4> <sub><i>Tübingen AI中心教授</i></sub> </div> </td> <td align="center"> <div style="width: 150px;"> <img src="https://nc.mlcloud.uni-tuebingen.de/index.php/apps/files_sharing/publicpreview/bybeXfZaGyxJ6nX?file=/&fileId=17890935&x=1920&y=1080&a=true&etag=3af9170c15d4a2e1583ae41d9c3bc366" alt="Matthias Kümmerer" width="150px;"> <h4> <a href="https://bethgelab.org/"> Matthias Kümmerer </a> </h4> <sub><i>bethgelab博士后研究员</i></sub> </div> </td> <td align="center"> <div style="width: 150px;"> <img src="https://gips0.baidu.com/it/u=2183371062,28754440&fm=3081&app=3081&f=JPEG?w=460&h=460" alt="Linus A. Schneider" width="150px;"> <h4> <a href="https://github.com/shoshinL"> Linus A. Schneider </a> </h4> <sub><i>Tübingen大学硕士生</i></sub> </div> </td> </tr> <tr> <td align="center"> <div style="width: 150px;"> <img src="https://gips1.baidu.com/it/u=2132572338,4167216032&fm=3081&app=3081&f=JPEG?w=460&h=460" alt="Jaisidh Singh" width="150px;"> <h4> <a href="https://github.com/jaisidhsingh"> Jaisidh Singh </a> </h4> <sub><i>Tübingen大学硕士生</i></sub> </div> </td> <td align="center"> <div style="width: 150px;"> <img src="https://gips0.baidu.com/it/u=3552511514,728551029&fm=3081&app=3081&f=JPEG?w=301&h=301" alt="Robin" width="150px;"> <h4> <a href="https://github.com/robinruff"> Robin Ruff </a> </h4> <sub><i>Tübingen AI中心软件工程师</i></sub> </div> </td> <td align="center"> <div style="width: 150px;"> <img src="https://gips1.baidu.com/it/u=3566571258,3048271471&fm=3081&app=3081&f=JPEG?w=301&h=301" alt="Mamen" width="150px;"> <h4> <a href="https://github.com/mtc-20"> Mamen </a> </h4> <sub><i>Tübingen AI中心软件工程师</i></sub> </div> </td> </tr> </table> <!-- TO BE REMOVED --> <!-- ## 开发资源 - [Google幻灯片:代理及其如何开始使用Langgraph ][1] - [Google Colab:简单的聊天笔记本][2] - [PDF:OpenAI 实用指南,构建代理][3] - [仓库:从零开始的Langgraph深度研究][4] - [课程: ][4A] - [仓库:Perplexica][5] - [仓库:HuggingFace开放深度研究][6] ## 待办事项 - [ ] 许可证 - [ ] 免责声明 - [ ] API密钥和环境变量 - [ ] 设置说明和要求 [1]: https://docs.google.com/presentation/d/1hgG-bZOhD7q1VPcLFIWIKymWp46MFxYbdtn9coP3Q2o/mobilepresent#slide=id.g35ea3d3cc5f_0_17 [2]: https://colab.research.google.com/drive/1U97KmxMIT1EBBLQqSgE3k2KcDQ484JHi?usp=sharing [3]: https://cdn.openai.com/business-guides-and-resources/a-practical-guide-to-building-agents.pdf [4]: https://github.com/langchain-ai/deep_research_from_scratch [5]: https://github.com/ItzCrazyKns/Perplexica [4A]: https://academy.langchain.com/courses/take/deep-research-with-langgraph/texts/67644896-getting-set-up [6]: https://github.com/huggingface/smolagents/tree/main/examples/open_deep_research --> <!-- END OF TO BE REMOVED --> <!-- 链接 -->