[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-NicholasGoh--fastapi-mcp-langgraph-template":3,"tool-NicholasGoh--fastapi-mcp-langgraph-template":64},[4,18,26,39,47,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,2,"2026-04-10T01:20:03",[13,14,15,16],"插件","Agent","图像","开发框架","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[13,16],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":10,"last_commit_at":32,"category_tags":33,"status":17},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",85092,"2026-04-10T11:13:16",[15,34,35,13,14,36,37,16,38],"数据工具","视频","其他","语言模型","音频",{"id":40,"name":41,"github_repo":42,"description_zh":43,"stars":44,"difficulty_score":10,"last_commit_at":45,"category_tags":46,"status":17},6520,"openai-cookbook","openai\u002Fopenai-cookbook","openai-cookbook 是 OpenAI 官方提供的一套实用代码示例与指南合集，旨在帮助开发者快速上手并掌握 OpenAI API 的核心用法。面对大模型应用中常见的提示词工程、函数调用、数据嵌入及复杂任务编排等挑战，新手往往难以找到标准化的实现路径。openai-cookbook 通过提供经过验证的代码片段和详细教程，有效解决了“如何从零开始构建应用”以及“如何最佳实践特定功能”的痛点。\n\n这套资源主要面向软件开发者和 AI 技术研究人员，同时也适合希望深入理解大模型能力的技术爱好者。虽然示例代码主要以 Python 编写，但其背后的设计思路和技术逻辑具有通用性，可轻松迁移至其他编程语言。其独特亮点在于内容紧跟官方最新特性更新，覆盖了从基础文本生成到高级代理（Agent）构建的全场景需求，且所有示例均支持在本地环境直接运行调试。作为开源项目，它采用宽松的 MIT 许可证，鼓励社区贡献与二次开发，是学习大模型应用开发不可或缺的实战手册。",72659,"2026-04-10T21:55:21",[37,13],{"id":48,"name":49,"github_repo":50,"description_zh":51,"stars":52,"difficulty_score":53,"last_commit_at":54,"category_tags":55,"status":17},2181,"OpenHands","OpenHands\u002FOpenHands","OpenHands 是一个专注于 AI 驱动开发的开源平台，旨在让智能体（Agent）像人类开发者一样理解、编写和调试代码。它解决了传统编程中重复性劳动多、环境配置复杂以及人机协作效率低等痛点，通过自动化流程显著提升开发速度。\n\n无论是希望提升编码效率的软件工程师、探索智能体技术的研究人员，还是需要快速原型验证的技术团队，都能从中受益。OpenHands 提供了灵活多样的使用方式：既可以通过命令行（CLI）或本地图形界面在个人电脑上轻松上手，体验类似 Devin 的流畅交互；也能利用其强大的 Python SDK 自定义智能体逻辑，甚至在云端大规模部署上千个智能体并行工作。\n\n其核心技术亮点在于模块化的软件智能体 SDK，这不仅构成了平台的引擎，还支持高度可组合的开发模式。此外，OpenHands 在 SWE-bench 基准测试中取得了 77.6% 的优异成绩，证明了其解决真实世界软件工程问题的能力。平台还具备完善的企业级功能，支持与 Slack、Jira 等工具集成，并提供细粒度的权限管理，适合从个人开发者到大型企业的各类用户场景。",71056,3,"2026-04-12T11:10:54",[37,14,16,13],{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":17},51,"gstack","garrytan\u002Fgstack","gstack 是 Y Combinator CEO Garry Tan 亲自开源的一套 AI 工程化配置，旨在将 Claude Code 升级为你的虚拟工程团队。面对单人开发难以兼顾产品战略、架构设计、代码审查及质量测试的挑战，gstack 提供了一套标准化解决方案，帮助开发者实现堪比二十人团队的高效产出。\n\n这套配置特别适合希望提升交付效率的创始人、技术负责人，以及初次尝试 Claude Code 的开发者。gstack 的核心亮点在于内置了 15 个具有明确职责的 AI 角色工具，涵盖 CEO、设计师、工程经理、QA 等职能。用户只需通过简单的斜杠命令（如 `\u002Freview` 进行代码审查、`\u002Fqa` 执行测试、`\u002Fplan-ceo-review` 规划功能），即可自动化处理从需求分析到部署上线的全链路任务。\n\n所有操作基于 Markdown 和斜杠命令，无需复杂配置，完全免费且遵循 MIT 协议。gstack 不仅是一套工具集，更是一种现代化的软件工厂实践，让单人开发者也能拥有严谨的工程流程。",70576,"2026-04-12T23:07:56",[14,13],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":79,"owner_location":79,"owner_email":80,"owner_twitter":79,"owner_website":81,"owner_url":82,"languages":83,"stars":96,"forks":97,"last_commit_at":98,"license":99,"difficulty_score":100,"env_os":101,"env_gpu":102,"env_ram":102,"env_deps":103,"category_tags":116,"github_topics":117,"view_count":10,"oss_zip_url":79,"oss_zip_packed_at":79,"status":17,"created_at":128,"updated_at":129,"faqs":130,"releases":131},7082,"NicholasGoh\u002Ffastapi-mcp-langgraph-template","fastapi-mcp-langgraph-template","A modern template for agentic orchestration — built for rapid iteration and scalable deployment using highly customizable, community-supported tools like MCP, LangGraph, and more.","fastapi-mcp-langgraph-template 是一个专为构建现代 AI 智能体（Agentic）编排系统设计的开源项目模板。它旨在帮助开发者快速搭建具备高可扩展性的后端服务，解决在开发复杂 AI 工作流时面临的环境配置繁琐、技术栈整合困难以及部署扩展性不足等痛点。\n\n该模板特别适合希望快速原型验证并迈向生产级部署的 Python 后端开发者与 AI 工程师。其核心优势在于巧妙融合了多项前沿社区工具：利用 MCP（模型上下文协议）实现与大语言模型的标准化对接，避免厂商锁定；借助 LangGraph 强大的状态管理和原生流式传输能力，轻松构建复杂的智能体协作流程；同时集成 FastAPI 提供高性能 API 支持，配合 SQLModel 简化数据库交互，并通过 LangFuse 和 Supabase 分别实现可观测性与用户权限管理。\n\n无论是需要构建多步骤自动化任务的研究人员，还是致力于开发企业级 AI 应用的工程团队，fastapi-mcp-langgraph-template 都能提供一个坚实、灵活且易于定制的起点，让创作者将更多精力聚焦于业务逻辑与创新，而非重复的基础","fastapi-mcp-langgraph-template 是一个专为构建现代 AI 智能体（Agentic）编排系统设计的开源项目模板。它旨在帮助开发者快速搭建具备高可扩展性的后端服务，解决在开发复杂 AI 工作流时面临的环境配置繁琐、技术栈整合困难以及部署扩展性不足等痛点。\n\n该模板特别适合希望快速原型验证并迈向生产级部署的 Python 后端开发者与 AI 工程师。其核心优势在于巧妙融合了多项前沿社区工具：利用 MCP（模型上下文协议）实现与大语言模型的标准化对接，避免厂商锁定；借助 LangGraph 强大的状态管理和原生流式传输能力，轻松构建复杂的智能体协作流程；同时集成 FastAPI 提供高性能 API 支持，配合 SQLModel 简化数据库交互，并通过 LangFuse 和 Supabase 分别实现可观测性与用户权限管理。\n\n无论是需要构建多步骤自动化任务的研究人员，还是致力于开发企业级 AI 应用的工程团队，fastapi-mcp-langgraph-template 都能提供一个坚实、灵活且易于定制的起点，让创作者将更多精力聚焦于业务逻辑与创新，而非重复的基础设施建设。","[![MseeP.ai Security Assessment Badge](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FNicholasGoh_fastapi-mcp-langgraph-template_readme_85bb57ddae8c.png)](https:\u002F\u002Fmseep.ai\u002Fapp\u002Fnicholasgoh-fastapi-mcp-langgraph-template)\n\n# FastAPI MCP LangGraph Template\n\nA modern template for agentic orchestration — built for rapid iteration and scalable deployment using highly customizable, community-supported tools like MCP, LangGraph, and more.\n\nVisit the Github: [![FastAPI MCP LangGraph Template](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fnicholasgoh\u002Ffastapi-mcp-langgraph-template?label=FastAPI%20MCP%20LangGraph%20Template)](https:\u002F\u002Fgithub.com\u002FNicholasGoh\u002Ffastapi-mcp-langgraph-template) [![FastAPI MCP LangGraph Template](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Ftag\u002Fnicholasgoh\u002Ffastapi-mcp-langgraph-template?style=flat)](https:\u002F\u002Fgithub.com\u002FNicholasGoh\u002Ffastapi-mcp-langgraph-template)\n\n> [!NOTE]\n> Read the docs with demo videos [here](https:\u002F\u002Fnicholas-goh.com\u002Fdocs\u002Fintro?ref=fastapi-mcp-langgraph-template). This repo will not contain demo videos.\n\n\u003C!--toc:start-->\n- [FastAPI MCP LangGraph Template](#fastapi-mcp-langgraph-template)\n  - [Core Features](#core-features)\n    - [Technology Stack and Features](#technology-stack-and-features)\n    - [Planned Features](#planned-features)\n  - [Architecture](#architecture)\n    - [Inspector](#inspector)\n    - [Template Setup](#template-setup)\n    - [Reverse Proxy](#reverse-proxy)\n    - [Planned Features Diagrams](#planned-features-diagrams)\n      - [Monitoring and Observability](#monitoring-and-observability)\n      - [Authentication and Authorization](#authentication-and-authorization)\n  - [Quick Start](#quick-start)\n  - [Development](#development)\n    - [VSCode Devcontainer](#vscode-devcontainer)\n    - [Without VSCode Devcontainer](#without-vscode-devcontainer)\n  - [Debugging](#debugging)\n  - [Refactored Markdown Files](#refactored-markdown-files)\n    - [MCP](#mcp)\n    - [LangGraph](#langgraph)\n    - [Supabase](#supabase)\n    - [Langfuse](#langfuse)\n    - [Grafana Stack](#grafana-stack)\n\u003C!--toc:end-->\n\n## Core Features\n\n[![MCP Client](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fmodelcontextprotocol\u002Fpython-sdk?logo=modelcontextprotocol&label=MCP-Client)](https:\u002F\u002Fgithub.com\u002Fmodelcontextprotocol\u002Fpython-sdk) is an open protocol that standardizes how apps provide context to LLMs.\n  - Seamlessly integrates LLM with growing list of community integrations found here [![MCP Server](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fmodelcontextprotocol\u002Fservers?logo=modelcontextprotocol&label=MCP-Servers)](https:\u002F\u002Fgithub.com\u002Fmodelcontextprotocol\u002Fservers)\n  - No LLM provider lock in\n\n[![LangGraph](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Flangchain-ai\u002Flanggraph?logo=langgraph&label=LangGraph)](https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flanggraph) for Customizable Agentic Orchestration\n- Native streaming for UX in complex Agentic Workflows\n- Native persisted chat history and state management\n\n### Technology Stack and Features\n\n- [![FastAPI](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Ffastapi\u002Ffastapi?logo=fastapi&label=fastapi)](https:\u002F\u002Fgithub.com\u002Ffastapi\u002Ffastapi) for Python backend API\n- [![SQLModel](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Ffastapi\u002Fsqlmodel?logo=sqlmodel&label=SQLModel)](https:\u002F\u002Fgithub.com\u002Ffastapi\u002Fsqlmodel) for Python SQL database interactions (ORM + Validation).\n  - Wrapper of [![SQLAlchemy](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fsqlalchemy\u002Fsqlalchemy?logo=sqlalchemy&label=SQLAlchemy)](https:\u002F\u002Fgithub.com\u002Fsqlalchemy\u002Fsqlalchemy)\n- [![LangFuse](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Flangfuse\u002Flangfuse?logo=langfuse&label=LangFuse)](https:\u002F\u002Fgithub.com\u002Flangfuse\u002Flangfuse) for LLM Observability and LLM Metrics\n- [![Pydantic](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fpydantic\u002Fpydantic?logo=pydantic&label=Pydantic)](https:\u002F\u002Fgithub.com\u002Fpydantic\u002Fpydantic) for Data Validation and Settings Management.\n- [![Supabase](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fsupabase\u002Fsupabase?logo=supabase&label=Supabase)](https:\u002F\u002Fgithub.com\u002Fsupabase\u002Fsupabase) for DB RBAC\n  - [![PostgreSQL](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fpostgres\u002Fpostgres?logo=postgresql&label=Postgres)](https:\u002F\u002Fgithub.com\u002Fpostgres\u002Fpostgres) Relational DB\n  - [![PGVector](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fpgvector\u002Fpgvector?logo=postgresql&label=PGVector)](https:\u002F\u002Fgithub.com\u002Fpgvector\u002Fpgvector) Vector Store\n- [![Nginx](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fnginx\u002Fnginx?logo=nginx&label=Nginx)](https:\u002F\u002Fgithub.com\u002Fnginx\u002Fnginx) Reverse Proxy\n- [![Compose](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fdocker\u002Fcompose?logo=docker&label=Compose)](https:\u002F\u002Fgithub.com\u002Fdocker\u002Fcompose) for development and production.\n\n### Planned Features\n\n- [![Prometheus](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fprometheus\u002Fprometheus?logo=prometheus&label=Prometheus)](https:\u002F\u002Fgithub.com\u002Fprometheus\u002Fprometheus) for scraping Metrics\n- [![Grafana](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fprometheus\u002Fprometheus?logo=grafana&label=Grafana)](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgrafana) for visualizing Metrics\n- [![Auth0](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAuth0-white?logo=auth0)](https:\u002F\u002Fauth0.com\u002Fdocs) SaaS for Authentication and Authorization with OIDC & JWT via OAuth 2.0\n- CI\u002FCD via Github Actions\n  - :dollar: Deploy live demo to [![Fargate](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FFargate-white.svg?logo=awsfargate)](https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonECS\u002Flatest\u002Fdeveloperguide\u002FAWS_Fargate.html)\n  - Provision with [![Terraform](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fhashicorp\u002Fterraform?logo=terraform&label=Terraform)](https:\u002F\u002Fgithub.com\u002Fhashicorp\u002Fterraform) IaC\n  - Push built images to ECR and Dockerhub\n\n## Architecture\n\nThis section outlines the architecture of the services, their interactions, and planned features.\n\n### Inspector\n\nInspector communicates via SSE protocol with each MCP Server, while each server adheres to MCP specification.\n\n```mermaid\ngraph LR\n\n  subgraph localhost\n    A[Inspector]\n    B[DBHub Server]\n    C[Youtube Server]\n    D[Custom Server]\n  end\n\n  subgraph Supabase Cloud\n    E[Supabase DB]\n  end\n\n  subgraph Google Cloud\n    F[Youtube API]\n  end\n\n  A\u003C-->|Protocol|B\n  A\u003C-->|Protocol|C\n  A\u003C-->|Protocol|D\n  B\u003C-->E\n  C\u003C-->F\n```\n\n### Template Setup\n\nThe current template does not connect to all MCP servers. Additionally, the API server communicates with the database using a SQL ORM.\n\n```mermaid\ngraph LR\n\n  subgraph localhost\n    A[API Server]\n    B[DBHub Server]\n    C[Youtube Server]\n    D[Custom Server]\n  end\n\n  subgraph Supabase Cloud\n    E[Supabase DB]\n  end\n\n  A\u003C-->|Protocol|D\n  A\u003C-->E\n```\n\n### Reverse Proxy\n\nCan be extended for other services like Frontend and\u002For certain backend services self-hosted instead of on cloud (e.g., Langfuse).\n\n```mermaid\ngraph LR\n  A[Web Browser]\n\n  subgraph localhost\n    B[Nginx Reverse Proxy]\n    C[API Server]\n  end\n\n  A-->B\n  B-->C\n```\n\n### Planned Features Diagrams\n\n#### Monitoring and Observability\n\n```mermaid\ngraph LR\n\n  subgraph localhost\n    A[API Server]\n  end\n\n  subgraph Grafana Cloud\n    B[Grafana]\n  end\n\n  subgraph Langfuse Cloud\n    C[Langfuse]\n  end\n\n  A -->|Metrics & Logs| B\n  A -->|Traces & Events| C\n```\n\n#### Authentication and Authorization\n\n![Auth0 Diagram](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FNicholasGoh_fastapi-mcp-langgraph-template_readme_d7e9097dfaa5.png)\n\n[Auth0 Source](https:\u002F\u002Fauth0.com\u002Fdocs\u002Fget-started\u002Fauthentication-and-authorization-flow\u002Fauthorization-code-flow)\n\n## Quick Start\n\nSetup to run the repository in both production and development environments.\n\nBuild community youtube MCP image with:\n\n```bash\n.\u002Fcommunity\u002Fyoutube\u002Fbuild.sh\n```\n\n:::tip\n\nInstead of cloning or submoduling the repository locally, then building the image, this script builds the Docker image inside a temporary Docker-in-Docker container. This approach avoids polluting your local environment with throwaway files by cleaning up everything once the container exits.\n\n:::\n\nThen build the other images with:\n\n```bash\ndocker compose -f compose-dev.yaml build\n```\n\nCopy environment file:\n\n```bash\ncp .env.sample .env\n```\n\nAdd your following API keys and value to the respective file: `.\u002Fenvs\u002Fbackend.env`, `.\u002Fenvs\u002Fyoutube.env` and `.env`.\n\n```bash\nOPENAI_API_KEY=sk-proj-...\nPOSTGRES_DSN=postgresql:\u002F\u002Fpostgres...\n\nLANGFUSE_PUBLIC_KEY=pk-lf-...\nLANGFUSE_SECRET_KEY=sk-lf-...\nLANGFUSE_HOST=https:\u002F\u002Fcloud.langfuse.com\n\nENVIRONMENT=production\n\nYOUTUBE_API_KEY=...\n```\n\nSet environment variables in shell: (compatible with `bash` and `zsh`)\n\n```bash\nset -a; for env_file in .\u002Fenvs\u002F*; do source $env_file; done; set +a\n```\n\nStart production containers:\n\n```bash\ndocker compose up -d\n```\n\n\u003CReactPlayer playing controls url='\u002Fvid\u002Ffastapi-mcp-langgraph-template\u002Fapi.mp4' \u002F>\n\n## Development\n\nFirst, set environment variables as per above.\n\n### VSCode Devcontainer\n\n\u003CReactPlayer playing controls url='\u002Fvid\u002Ffastapi-mcp-langgraph-template\u002Fvscode.mp4' \u002F>\n\n\u003Cbr\u002F>\n\n:::warning\n\nOnly replace the following if you plan to start debugger for FastAPI server in VSCode.\n\n:::\n\nReplace `.\u002Fcompose-dev.yaml` entrypoint to allow debugging FastAPI server:\n\n```yaml title=\".\u002Fcompose-dev.yaml\"\n  api:\n    image: api:prod\n    build:\n      dockerfile: .\u002Fbackend\u002Fapi\u002FDockerfile\n    # highlight-next-line\n    entrypoint: bash -c \"sleep infinity\"\n    env_file:\n      - .\u002Fenvs\u002Fbackend.env\n```\n\nThen:\n\n```bash\ncode --no-sandbox .\n```\n\nPress `F1` and type `Dev Containers: Rebuild and Reopen in Container` to open containerized environment with IntelliSense and Debugger for FastAPI.\n\n### Without VSCode Devcontainer\n\nRun development environment with:\n\n```bash\ndocker compose -f compose-dev.yaml up -d\n```\n\n## Debugging\n\nSometimes in development, nginx reverse proxy needs to reload its config to route services properly.\n\n```bash\ndocker compose -f compose-dev.yaml exec nginx sh -c \"nginx -s reload\"\n```\n\n## Refactored Markdown Files\n\nThe following markdown files provide additional details on other features:\n\n### MCP\n\n[`.\u002Fdocs\u002Fmcp.md`](.\u002Fdocs\u002Fmcp.md)\n\n### LangGraph\n\n[`.\u002Fdocs\u002Flanggraph.md`](.\u002Fdocs\u002Flanggraph.md)\n\n### Supabase\n\n[`.\u002Fdocs\u002Fsupabase.md`](.\u002Fdocs\u002Fsupabase.md)\n\n### Langfuse\n\n[`.\u002Fdocs\u002Flangfuse.md`](.\u002Fdocs\u002Flangfuse.md)\n\n### Grafana Stack\n\n[`.\u002Fdocs\u002Fgrafana-stack.md`](.\u002Fdocs\u002Fgrafana-stack.md)\n\n[![Star History Chart](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FNicholasGoh_fastapi-mcp-langgraph-template_readme_ed1582fe7786.png)](https:\u002F\u002Fwww.star-history.com\u002F#nicholasgoh\u002Ffastapi-mcp-langgraph-template&Date)\n\n> [!NOTE]\n> Click above to view live update on star history as per their [article](https:\u002F\u002Fwww.star-history.com\u002Fblog\u002Fa-message-to-github-star-history-users):\n> Ongoing Broken Live Chart\n> you can still use this website to view and download charts (though you may need to provide your own token).\n","[![MseeP.ai 安全评估徽章](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FNicholasGoh_fastapi-mcp-langgraph-template_readme_85bb57ddae8c.png)](https:\u002F\u002Fmseep.ai\u002Fapp\u002Fnicholasgoh-fastapi-mcp-langgraph-template)\n\n# FastAPI MCP LangGraph 模板\n\n一款用于智能体编排的现代化模板——专为快速迭代和可扩展部署而设计，采用高度可定制、社区支持的工具，如 MCP、LangGraph 等。\n\n访问 GitHub：[![FastAPI MCP LangGraph 模板](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fnicholasgoh\u002Ffastapi-mcp-langgraph-template?label=FastAPI%20MCP%20LangGraph%20Template)](https:\u002F\u002Fgithub.com\u002FNicholasGoh\u002Ffastapi-mcp-langgraph-template) [![FastAPI MCP LangGraph 模板](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Ftag\u002Fnicholasgoh\u002Ffastapi-mcp-langgraph-template?style=flat)](https:\u002F\u002Fgithub.com\u002FNicholasGoh\u002Ffastapi-mcp-langgraph-template)\n\n> [!注意]\n> 请在此处查看带有演示视频的文档：[这里](https:\u002F\u002Fnicholas-goh.com\u002Fdocs\u002Fintro?ref=fastapi-mcp-langgraph-template)。此仓库不包含演示视频。\n\n\u003C!--toc:start-->\n- [FastAPI MCP LangGraph 模板](#fastapi-mcp-langgraph-template)\n  - [核心功能](#core-features)\n    - [技术栈与特性](#technology-stack-and-features)\n    - [计划中的功能](#planned-features)\n  - [架构](#architecture)\n    - [检查器](#inspector)\n    - [模板设置](#template-setup)\n    - [反向代理](#reverse-proxy)\n    - [计划中的功能图示](#planned-features-diagrams)\n      - [监控与可观测性](#monitoring-and-observability)\n      - [认证与授权](#authentication-and-authorization)\n  - [快速入门](#quick-start)\n  - [开发](#development)\n    - [VSCode 开发容器](#vscode-devcontainer)\n    - [无需 VSCode 开发容器](#without-vscode-devcontainer)\n  - [调试](#debugging)\n  - [重构后的 Markdown 文件](#refactored-markdown-files)\n    - [MCP](#mcp)\n    - [LangGraph](#langgraph)\n    - [Supabase](#supabase)\n    - [Langfuse](#langfuse)\n    - [Grafana 堆栈](#grafana-stack)\n\u003C!--toc:end-->\n\n## 核心功能\n\n[![MCP 客户端](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fmodelcontextprotocol\u002Fpython-sdk?logo=modelcontextprotocol&label=MCP-Client)](https:\u002F\u002Fgithub.com\u002Fmodelcontextprotocol\u002Fpython-sdk) 是一种开放协议，用于标准化应用程序向大语言模型提供上下文的方式。\n  - 可无缝集成大语言模型，并拥有不断增长的社区集成列表，详情请见此处 [![MCP 服务器](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fmodelcontextprotocol\u002Fservers?logo=modelcontextprotocol&label=MCP-Servers)](https:\u002F\u002Fgithub.com\u002Fmodelcontextprotocol\u002Fservers)\n  - 无 LLM 提供商锁定\n\n[![LangGraph](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Flangchain-ai\u002Flanggraph?logo=langgraph&label=LangGraph)](https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flanggraph) 用于可定制的智能体编排\n- 原生流式传输，适用于复杂的智能体工作流用户体验\n- 原生持久化聊天历史和状态管理\n\n### 技术栈与特性\n\n- [![FastAPI](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Ffastapi\u002Ffastapi?logo=fastapi&label=fastapi)](https:\u002F\u002Fgithub.com\u002Ffastapi\u002Ffastapi) 用于 Python 后端 API\n- [![SQLModel](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Ffastapi\u002Fsqlmodel?logo=sqlmodel&label=SQLModel)](https:\u002F\u002Fgithub.com\u002Ffastapi\u002Fsqlmodel) 用于 Python SQL 数据库交互（ORM + 验证）。\n  - 包装了 [![SQLAlchemy](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fsqlalchemy\u002Fsqlalchemy?logo=sqlalchemy&label=SQLAlchemy)](https:\u002F\u002Fgithub.com\u002Fsqlalchemy\u002Fsqlalchemy)\n- [![LangFuse](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Flangfuse\u002Flangfuse?logo=langfuse&label=LangFuse)](https:\u002F\u002Fgithub.com\u002Flangfuse\u002Flangfuse) 用于 LLM 可观测性和 LLM 指标\n- [![Pydantic](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fpydantic\u002Fpydantic?logo=pydantic&label=Pydantic)](https:\u002F\u002Fgithub.com\u002Fpydantic\u002Fpydantic) 用于数据验证和设置管理\n- [![Supabase](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fsupabase\u002Fsupabase?logo=supabase&label=Supabase)](https:\u002F\u002Fgithub.com\u002Fsupabase\u002Fsupabase) 用于 DB RBAC\n  - [![PostgreSQL](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fpostgres\u002Fpostgres?logo=postgresql&label=Postgres)](https:\u002F\u002Fgithub.com\u002Fpostgres\u002Fpostgres) 关系型数据库\n  - [![PGVector](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fpgvector\u002Fpgvector?logo=postgresql&label=PGVector)](https:\u002F\u002Fgithub.com\u002Fpgvector\u002Fpgvector) 向量存储\n- [![Nginx](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fnginx\u002Fnginx?logo=nginx&label=Nginx)](https:\u002F\u002Fgithub.com\u002Fnginx\u002Fnginx) 反向代理\n- [![Compose](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fdocker\u002Fcompose?logo=docker&label=Compose)](https:\u002F\u002Fgithub.com\u002Fdocker\u002Fcompose) 用于开发和生产环境\n\n### 计划中的功能\n\n- [![Prometheus](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fprometheus\u002Fprometheus?logo=prometheus&label=Prometheus)](https:\u002F\u002Fgithub.com\u002Fprometheus\u002Fprometheus) 用于抓取指标\n- [![Grafana](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fprometheus\u002Fprometheus?logo=grafana&label=Grafana)](https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgrafana) 用于可视化指标\n- [![Auth0](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAuth0-white?logo=auth0)](https:\u002F\u002Fauth0.com\u002Fdocs) SaaS 提供商，通过 OAuth 2.0 实现 OIDC 和 JWT 的认证与授权\n- 使用 Github Actions 进行 CI\u002FCD\n  - :dollar: 将实时演示部署到 [![Fargate](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FFargate-white.svg?logo=awsfargate)](https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonECS\u002Flatest\u002Fdeveloperguide\u002FAWS_Fargate.html)\n  - 使用 [![Terraform](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fhashicorp\u002Fterraform?logo=terraform&label=Terraform)](https:\u002F\u002Fgithub.com\u002Fhashicorp\u002Fterraform) IaC 进行资源 provision\n  - 将构建好的镜像推送到 ECR 和 Dockerhub\n\n## 架构\n\n本节概述了服务的架构、它们之间的交互以及计划中的功能。\n\n### 检查器\n\n检查器通过 SSE 协议与每个 MCP 服务器通信，而每个服务器则遵循 MCP 规范。\n\n```mermaid\ngraph LR\n\n  subgraph localhost\n    A[检查器]\n    B[DBHub 服务器]\n    C[Youtube 服务器]\n    D[自定义服务器]\n  end\n\n  subgraph Supabase 云\n    E[Supabase 数据库]\n  end\n\n  subgraph Google 云\n    F[Youtube API]\n  end\n\n  A\u003C-->|协议|B\n  A\u003C-->|协议|C\n  A\u003C-->|协议|D\n  B\u003C-->E\n  C\u003C-->F\n```\n\n### 模板设置\n\n当前模板并未连接所有 MCP 服务器。此外，API 服务器使用 SQL ORM 与数据库进行通信。\n\n```mermaid\ngraph LR\n\n  subgraph localhost\n    A[API 服务器]\n    B[DBHub 服务器]\n    C[Youtube 服务器]\n    D[自定义服务器]\n  end\n\n  subgraph Supabase 云\n    E[Supabase 数据库]\n  end\n\n  A\u003C-->|协议|D\n  A\u003C-->E\n```\n\n### 反向代理\n\n可以扩展以支持其他服务，例如前端和\u002F或某些后端服务，这些服务可以选择在本地托管而非云端运行（例如 Langfuse）。\n\n```mermaid\ngraph LR\n  A[Web 浏览器]\n\n  subgraph localhost\n    B[Nginx 反向代理]\n    C[API 服务器]\n  end\n\n  A-->B\n  B-->C\n```\n\n### 计划中的功能图\n\n#### 监控与可观测性\n\n```mermaid\ngraph LR\n\n  subgraph 本地主机\n    A[API服务器]\n  end\n\n  subgraph Grafana Cloud\n    B[Grafana]\n  end\n\n  subgraph Langfuse Cloud\n    C[Langfuse]\n  end\n\n  A -->|指标与日志| B\n  A -->|追踪与事件| C\n```\n\n#### 身份验证与授权\n\n![Auth0 流程图](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FNicholasGoh_fastapi-mcp-langgraph-template_readme_d7e9097dfaa5.png)\n\n[Auth0 来源](https:\u002F\u002Fauth0.com\u002Fdocs\u002Fget-started\u002Fauthentication-and-authorization-flow\u002Fauthorization-code-flow)\n\n## 快速入门\n\n设置以在生产环境和开发环境中运行该仓库。\n\n使用以下命令构建社区 YouTube MCP 镜像：\n\n```bash\n.\u002Fcommunity\u002Fyoutube\u002Fbuild.sh\n```\n\n:::tip\n\n与其在本地克隆或子模块化仓库后再构建镜像，不如使用此脚本在一个临时的 Docker-in-Docker 容器中构建 Docker 镜像。这种方法避免了将一次性文件污染到你的本地环境，因为容器退出后会清理所有内容。\n\n:::\n\n然后使用以下命令构建其他镜像：\n\n```bash\ndocker compose -f compose-dev.yaml build\n```\n\n复制环境文件：\n\n```bash\ncp .env.sample .env\n```\n\n将你的 API 密钥和值添加到相应的文件中：`.\u002Fenvs\u002Fbackend.env`、`.\u002Fenvs\u002Fyoutube.env` 和 `.env`。\n\n```bash\nOPENAI_API_KEY=sk-proj-...\nPOSTGRES_DSN=postgresql:\u002F\u002Fpostgres...\n\nLANGFUSE_PUBLIC_KEY=pk-lf-...\nLANGFUSE_SECRET_KEY=sk-lf-...\nLANGFUSE_HOST=https:\u002F\u002Fcloud.langfuse.com\n\nENVIRONMENT=production\n\nYOUTUBE_API_KEY=...\n```\n\n在 shell 中设置环境变量：（兼容 `bash` 和 `zsh`）\n\n```bash\nset -a; for env_file in .\u002Fenvs\u002F*; do source $env_file; done; set +a\n```\n\n启动生产容器：\n\n```bash\ndocker compose up -d\n```\n\n\u003CReactPlayer playing controls url='\u002Fvid\u002Ffastapi-mcp-langgraph-template\u002Fapi.mp4' \u002F>\n\n## 开发\n\n首先，按照上述步骤设置环境变量。\n\n### VSCode Devcontainer\n\n\u003CReactPlayer playing controls url='\u002Fvid\u002Ffastapi-mcp-langgraph-template\u002Fvscode.mp4' \u002F>\n\n\u003Cbr\u002F>\n\n:::warning\n\n仅当你计划在 VSCode 中为 FastAPI 服务器启动调试器时才替换以下内容。\n\n:::\n\n将 `.\u002Fcompose-dev.yaml` 的入口点替换为允许调试 FastAPI 服务器的配置：\n\n```yaml title=\".\u002Fcompose-dev.yaml\"\n  api:\n    image: api:prod\n    build:\n      dockerfile: .\u002Fbackend\u002Fapi\u002FDockerfile\n    # highlight-next-line\n    entrypoint: bash -c \"sleep infinity\"\n    env_file:\n      - .\u002Fenvs\u002Fbackend.env\n```\n\n然后：\n\n```bash\ncode --no-sandbox .\n```\n\n按下 `F1` 键并输入 `Dev Containers: Rebuild and Reopen in Container`，即可打开带有 IntelliSense 和 FastAPI 调试器的容器化环境。\n\n### 不使用 VSCode Devcontainer\n\n使用以下命令运行开发环境：\n\n```bash\ndocker compose -f compose-dev.yaml up -d\n```\n\n## 调试\n\n有时在开发过程中，Nginx 反向代理需要重新加载其配置才能正确路由服务。\n\n```bash\ndocker compose -f compose-dev.yaml exec nginx sh -c \"nginx -s reload\"\n```\n\n## 重构后的 Markdown 文件\n\n以下 Markdown 文件提供了关于其他功能的更多详细信息：\n\n### MCP\n\n[`.\u002Fdocs\u002Fmcp.md`](.\u002Fdocs\u002Fmcp.md)\n\n### LangGraph\n\n[`.\u002Fdocs\u002Flanggraph.md`](.\u002Fdocs\u002Flanggraph.md)\n\n### Supabase\n\n[`.\u002Fdocs\u002Fsupabase.md`](.\u002Fdocs\u002Fsupabase.md)\n\n### Langfuse\n\n[`.\u002Fdocs\u002Flangfuse.md`](.\u002Fdocs\u002Flangfuse.md)\n\n### Grafana Stack\n\n[`.\u002Fdocs\u002Fgrafana-stack.md`](.\u002Fdocs\u002Fgrafana-stack.md)\n\n[![星标历史图表](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FNicholasGoh_fastapi-mcp-langgraph-template_readme_ed1582fe7786.png)](https:\u002F\u002Fwww.star-history.com\u002F#nicholasgoh\u002Ffastapi-mcp-langgraph-template&Date)\n\n> [!NOTE]\n> 点击上方链接查看实时更新的星标历史，根据他们的[文章](https:\u002F\u002Fwww.star-history.com\u002Fblog\u002Fa-message-to-github-star-history-users)所述：\n> 实时图表持续出现故障\n> 尽管如此，你仍然可以使用该网站查看和下载图表（不过可能需要提供自己的令牌）。","# FastAPI MCP LangGraph Template 快速上手指南\n\n本指南帮助中国开发者快速搭建基于 FastAPI、MCP (Model Context Protocol) 和 LangGraph 的智能体编排模板。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux, macOS 或 Windows (需安装 WSL2)\n*   **Docker & Docker Compose**: 必须安装并正在运行。\n    *   *国内用户建议*: 配置 Docker 镜像加速器（如阿里云、腾讯云或 DaoCloud 加速），以加快镜像拉取速度。\n*   **Git**: 用于克隆代码仓库。\n*   **API Keys**: 准备好以下服务的密钥：\n    *   OpenAI API Key (或其他兼容 LLM)\n    *   Supabase 项目 URL 和 Key (用于数据库)\n    *   Langfuse Keys (用于可观测性，可选)\n    *   YouTube Data API Key (如需使用示例中的 YouTube 功能)\n\n## 安装步骤\n\n### 1. 克隆项目\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FNicholasGoh\u002Ffastapi-mcp-langgraph-template.git\ncd fastapi-mcp-langgraph-template\n```\n\n### 2. 构建社区 MCP 镜像\n首先构建示例中使用的 YouTube MCP 服务器镜像。该脚本会在临时容器中构建，避免污染本地环境。\n```bash\n.\u002Fcommunity\u002Fyoutube\u002Fbuild.sh\n```\n\n### 3. 构建主服务镜像\n使用 Docker Compose 构建后端 API 及其他核心服务。\n```bash\ndocker compose -f compose-dev.yaml build\n```\n\n### 4. 配置环境变量\n复制示例配置文件到实际使用文件：\n```bash\ncp .env.sample .env\n```\n\n编辑以下文件，填入您的 API Keys 和数据库连接信息：\n*   `.\u002Fenvs\u002Fbackend.env`\n*   `.\u002Fenvs\u002Fyoutube.env`\n*   `.env`\n\n**关键配置项示例：**\n```bash\nOPENAI_API_KEY=sk-proj-...\nPOSTGRES_DSN=postgresql:\u002F\u002Fpostgres...\n\nLANGFUSE_PUBLIC_KEY=pk-lf-...\nLANGFUSE_SECRET_KEY=sk-lf-...\nLANGFUSE_HOST=https:\u002F\u002Fcloud.langfuse.com\n\nENVIRONMENT=production\n\nYOUTUBE_API_KEY=...\n```\n\n### 5. 加载环境变量\n在终端中加载所有环境变量（兼容 bash 和 zsh）：\n```bash\nset -a; for env_file in .\u002Fenvs\u002F*; do source $env_file; done; set +a\n```\n\n### 6. 启动服务\n启动生产环境容器（开发环境请使用 `compose-dev.yaml`）：\n```bash\ndocker compose up -d\n```\n\n## 基本使用\n\n服务启动后，您可以通过以下方式验证和使用：\n\n### 1. 访问 API 服务\n默认情况下，Nginx 反向代理会处理请求。您可以直接通过浏览器或工具访问本地 API 端点（通常映射到 `http:\u002F\u002Flocalhost` 或配置中指定的端口）。\n\n### 2. 开发模式调试 (推荐 VSCode 用户)\n如果您使用 VSCode 进行开发，可以利用 Devcontainer 获得完整的 IntelliSense 和调试支持：\n\n1.  修改 `.\u002Fcompose-dev.yaml` 中的 `api` 服务入口点，允许调试器附加：\n    ```yaml\n    # 在 .\u002Fcompose-dev.yaml 中找到 api 部分\n    api:\n      image: api:prod\n      build:\n        dockerfile: .\u002Fbackend\u002Fapi\u002FDockerfile\n      entrypoint: bash -c \"sleep infinity\"  # 修改此行\n      env_file:\n        - .\u002Fenvs\u002Fbackend.env\n    ```\n2.  在 VSCode 中打开项目文件夹，按下 `F1`，输入并选择：\n    `Dev Containers: Rebuild and Reopen in Container`\n3.  容器重启后，即可在 VSCode 中设置断点并启动 FastAPI 调试。\n\n### 3. 非 VSCode 开发模式\n如果不使用 Devcontainer，可直接启动开发环境：\n```bash\ndocker compose -f compose-dev.yaml up -d\n```\n\n### 4. 重新加载 Nginx 配置\n如果在开发过程中修改了路由或服务配置，可能需要手动重载 Nginx：\n```bash\ndocker compose -f compose-dev.yaml exec nginx sh -c \"nginx -s reload\"\n```\n\n### 5. 查看文档与进阶功能\n本项目将部分详细文档拆分到了 `docs` 目录，建议查阅以下文件以了解具体模块的配置：\n*   **MCP 集成**: `.\u002Fdocs\u002Fmcp.md`\n*   **LangGraph 工作流**: `.\u002Fdocs\u002Flanggraph.md`\n*   **Supabase 数据库**: `.\u002Fdocs\u002Fsupabase.md`\n*   **Langfuse 监控**: `.\u002Fdocs\u002Flangfuse.md`","某电商初创团队正急需构建一个能自动处理售后退款、查询库存并生成分析报告的智能客服代理系统。\n\n### 没有 fastapi-mcp-langgraph-template 时\n- **集成混乱且重复造轮子**：开发人员需手动拼接 FastAPI、LangChain 和数据库连接代码，缺乏统一标准，导致每次新增功能都要重新调试接口兼容性。\n- **复杂流程难以管控**：在处理“核实订单 - 检查库存 - 执行退款”的多步代理工作流时，缺乏原生的状态管理机制，对话上下文容易丢失，错误恢复极其困难。\n- **黑盒运行无法观测**：LLM 的决策过程和 API 调用链路完全不透明，出现幻觉或逻辑错误时，团队只能靠猜排查，缺乏如 LangFuse 这样的内置监控手段。\n- **扩展性与锁定风险**：硬编码的逻辑使得切换大模型供应商或接入新的外部工具（如新的 ERP 系统）成本极高，严重受制于特定厂商绑定。\n\n### 使用 fastapi-mcp-langgraph-template 后\n- **标准化快速启动**：直接基于模板部署，预集成了 FastAPI 后端与 MCP 协议，开发人员可立即通过标准化的社区服务器接入各类外部工具，无需重复编写底层胶水代码。\n- **可视化编排复杂任务**：利用 LangGraph 原生支持的状态机和工作流持久化，清晰定义退款代理的判断分支与循环逻辑，即使中断也能精准恢复对话状态。\n- **全链路可观测性**：内置 LangFuse 和 Grafana 栈，实时追踪每个代理步骤的耗时、Token 消耗及决策依据，让调试和优化变得有据可依。\n- **灵活架构自由扩展**：借助 MCP 开放协议解耦了模型与工具，团队可随时替换底层 LLM 或动态挂载新的数据源，彻底摆脱厂商锁定，从容应对业务增长。\n\nfastapi-mcp-langgraph-template 将原本需要数周搭建的复杂代理架构缩短至几天，让团队能专注于核心业务逻辑而非基础设施的反复试错。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FNicholasGoh_fastapi-mcp-langgraph-template_66f8f987.png","NicholasGoh","Nicholas Goh","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FNicholasGoh_2c5dd6a0.jpg",null,"gohn0004@e.ntu.edu.sg","nicholas-goh.com","https:\u002F\u002Fgithub.com\u002FNicholasGoh",[84,88,92],{"name":85,"color":86,"percentage":87},"Python","#3572A5",91.4,{"name":89,"color":90,"percentage":91},"Dockerfile","#384d54",6.5,{"name":93,"color":94,"percentage":95},"Shell","#89e051",2.1,539,77,"2026-04-09T10:36:17","MIT",4,"Linux, macOS, Windows","未说明",{"notes":104,"python":102,"dependencies":105},"该项目主要基于 Docker Compose 进行部署和开发，支持 VSCode Devcontainer。运行前需配置多个环境变量（如 OpenAI API Key, Supabase 连接串，Langfuse 密钥等）。架构包含反向代理（Nginx）、API 服务器及多个 MCP 服务。未明确提及具体的 Python 版本、GPU 或内存硬性要求，具体取决于所连接的 LLM 提供商及本地运行的 MCP 服务负载。",[106,107,108,109,110,111,112,113,114,115],"FastAPI","SQLModel","LangGraph","Pydantic","MCP (Model Context Protocol)","Supabase","PostgreSQL","PGVector","Langfuse","Nginx",[13],[118,119,120,121,122,123,124,125,126,127],"compose","fastapi","grafana","langfuse","langgraph-python","mcp","nginx","prometheus","sqlmodel","supabase","2026-03-27T02:49:30.150509","2026-04-13T17:42:54.648273",[],[]]