# Langflow

**Langflow** 是一款开源、基于 Python 的 AI 应用可视化构建器，用于在拖拽式画布上连接组件，而非编写应用代码，从而构建和部署智能体工作流、检索增强生成（RAG）流水线以及 MCP 服务器。<sup>[1](https://www.langflow.org/)</sup><sup> • </sup><sup>[2](https://www.datastax.com/products/langflow)</sup> 它构建于 [LangChain](https://www.edgepedia.org/zh/langchain) 之上，以 MIT 许可证分发，并可将流导出为可运行的 Python 与 API 代码。<sup>[2](https://www.datastax.com/products/langflow)</sup><sup> • </sup><sup>[3](https://blogs.meetrix.io/blogs/flowise-vs-langflow-vs-n8n/)</sup><sup> • </sup><sup>[4](https://www.dreaming.press/posts/2026-06-21-n8n-vs-flowise-vs-langflow.html)</sup> 该项目始于初创公司 Logspace，2024 年 4 月被 DataStax 收购，随着 IBM 对 DataStax 的收购于 2025 年 5 月完成，Langflow 归入 IBM 旗下。<sup>[5](https://techcrunch.com/2024/04/04/datastax-acquires-logspace-the-startup-behind-the-langflow-low-code-tool-for-building-rag-based-chatbots/)</sup><sup> • </sup><sup>[6](https://www.shipgarden.com/gallery/langflow-vs-flowise-open-source-ai-agent-builder-nextjs-2026)</sup>

| 关键事实 | 详情 |
|---|---|
| 本质 | 面向 AI 智能体、RAG 流水线和 MCP 服务器的开源可视化构建器，底层为 Python<sup>[1](https://www.langflow.org/)</sup> |
| 许可证与技术栈 | MIT 许可证；基于 LangChain 的 Python 组件，前端为 TypeScript<sup>[3](https://blogs.meetrix.io/blogs/flowise-vs-langflow-vs-n8n/)</sup><sup> • </sup><sup>[4](https://www.dreaming.press/posts/2026-06-21-n8n-vs-flowise-vs-langflow.html)</sup><sup> • </sup><sup>[7](https://github.com/langflow-ai/langflow/blob/main/docs/agents/ARCHITECTURE.md)</sup> |
| 起源 | 由 Logspace（成立于 2022 年）打造；2024 年 4 月 4 日被 DataStax 收购；自 DataStax 收购于 2025 年 5 月 28 日完成后归入 IBM<sup>[5](https://techcrunch.com/2024/04/04/datastax-acquires-logspace-the-startup-behind-the-langflow-low-code-tool-for-building-rag-based-chatbots/)</sup><sup> • </sup><sup>[6](https://www.shipgarden.com/gallery/langflow-vs-flowise-open-source-ai-agent-builder-nextjs-2026)</sup> |
| 社区规模 | 主仓库约有 15.3 万个 GitHub 星标、1.02 万次复刻和 19,200 次提交<sup>[1](https://www.langflow.org/)</sup><sup> • </sup><sup>[8](https://github.com/langflow-ai/langflow)</sup> |
| 部署模式 | 开发阶段使用 Langflow IDE（可视化编辑器加 API）；生产阶段使用无头 Langflow 运行时（仅后端），建议以 PostgreSQL 替代默认的 SQLite<sup>[9](https://docs.langflow.org/deployment-architecture)</sup> |
| 发布节奏 | 就绪即发布，周期通常为 4 至 6 周，遵循语义化版本规范；1.12.5 版于 10 月 6 日发布<sup>[10](https://github.com/langflow-ai/langflow/blob/main/RELEASE.md)</sup><sup> • </sup><sup>[11](https://github.com/langflow-ai/langflow/releases?imz_s=806a96ir5b6vnmsl3baek2ssu7)</sup> |
| 安全记录 | 在大约一年内，三个严重漏洞 CVE-2025-3248、CVE-2025-34291 和 CVE-2026-33017 被列入美国网络安全和基础设施安全局（CISA）的已知被利用漏洞目录<sup>[12](https://labs.cloudsecurityalliance.org/wp-content/uploads/2026/03/CSA_research_note_agentic_framework_CVEs_20260328-csa-styled.pdf)</sup> |

## 工作原理

Langflow 的核心单元是流（flow），即应用工作流的功能性表示。流由组件构成，每个组件代表一个步骤，用户在可视化编辑器中通过操作组件的连线和端口将它们连接起来。该编辑器支持在无需大量代码的情况下连接提示词、大语言模型（LLM）、数据源、智能体、MCP 服务器以及其他工具与集成。<sup>[13](https://docs.langflow.org/concepts-overview)</sup>

工作区是主要的搭建界面：组件在此添加、配置和连接，并提供平移、缩放、便签和键盘快捷键等导航手段。若流中包含聊天输入组件，演练场（Playground）会以交互方式运行该流，显示输入与输出，并允许构建者修改 LLM 的记忆以实时调整回复；当存在智能体组件时，演练场会显示其工具调用与输出，使构建者能够跟踪智能体的推理过程。<sup>[13](https://docs.langflow.org/concepts-overview)</sup>

分享菜单可将完成的流转化为集成接口。选项包括：API 访问，附带自动生成的 Python、[JavaScript](https://www.edgepedia.org/zh/javascript) 和 curl 代码片段；将流导出为 JSON 文件；将流作为工具暴露给兼容 MCP 的客户端；将流嵌入 HTML、React 或 Angular 应用；以及用于演示的可分享演练场界面（不适用于生产环境）。<sup>[13](https://docs.langflow.org/concepts-overview)</sup> 流也可以通过 Langflow API 创建，但项目文档建议在构建者熟悉流的创建之前使用可视化编辑器。<sup>[14](https://docs.langflow.org/concepts-flows)</sup>

在底层，Langflow 会生成流所描述的 LangChain 对象，同时仍允许在基于 Python 的应用中完全控制代码；组件本身即为 Python，可视化流可导出为可运行的 Python 与 API 代码。<sup>[2](https://www.datastax.com/products/langflow)</sup><sup> • </sup><sup>[4](https://www.dreaming.press/posts/2026-06-21-n8n-vs-flowise-vs-langflow.html)</sup> 代码库由可运行的基础应用（langflow-base）、精选发行版、执行器 SDK（lfx）、独立扩展以及一个 [TypeScript](https://www.edgepedia.org/zh/typescript) 前端组成，依赖关系单向指向；`api/v1/` 中的稳定 API 接口必须保持向后兼容，而 `api/v2/` 是正在进行的重新设计接口。<sup>[7](https://github.com/langflow-ai/langflow/blob/main/docs/agents/ARCHITECTURE.md)</sup>

## 历史与归属

Logspace 于 2022 年成立，旨在帮助企业采用机器学习，起初更像一家咨询公司而非产品公司。联合创始人兼首席执行官罗德里戈·纳德尔（Rodrigo Nader）此前曾与联合创始人兼首席技术官加布里埃尔·路易斯·弗雷塔斯·阿尔梅达（Gabriel Luiz Freitas Almeida）一起在企业 AI 公司 Bitvore 从事机器学习问题研究。创始人自筹资金，到 2023 年团队已推出 Langflow，它作为早期用于创建生成式 AI 应用的开源低代码工具而获得关注。<sup>[5](https://techcrunch.com/2024/04/04/datastax-acquires-logspace-the-startup-behind-the-langflow-low-code-tool-for-building-rag-based-chatbots/)</sup>

2024 年 4 月 4 日，[Apache Cassandra](https://www.edgepedia.org/zh/apache-cassandra) 的商业化公司 DataStax——一直围绕其 Astra DB 服务构建生成式 AI 技术栈——宣布已收购 Logspace，价格未披露。DataStax 称这笔交易完善了一站式生成式 AI 技术栈，将 Astra DB 连接、LangChain 工具包和 [LlamaIndex](https://www.edgepedia.org/zh/llamaindex) 与 Langflow 的可视化编辑器结合在一起。Langflow 将继续作为独立实体运营。<sup>[5](https://techcrunch.com/2024/04/04/datastax-acquires-logspace-the-startup-behind-the-langflow-low-code-tool-for-building-rag-based-chatbots/)</sup> 当 IBM 对 DataStax 的收购于 2025 年 5 月 28 日完成时，Langflow 归入 IBM 旗下。<sup>[6](https://www.shipgarden.com/gallery/langflow-vs-flowise-open-source-ai-agent-builder-nextjs-2026)</sup>

## 部署

Langflow 文档区分了两大类部署方式。Langflow IDE 同时部署可视化编辑器前端与 API 后端，用于开发环境，开发者在此创建和管理流，然后再打包用于生产。Langflow 运行时是一种无头、仅含后端的服务，专注于提供 Langflow API：它将流暴露为端点，并且只运行服务每个流所需的进程。对于运行时部署，强烈建议使用外部 [PostgreSQL](https://www.edgepedia.org/zh/postgresql) 数据库，与默认的 SQLite 数据库相比可提升可扩展性与可靠性；可通过 `LANGFLOW_BACKEND_ONLY` 环境变量启用无头模式。<sup>[9](https://docs.langflow.org/deployment-architecture)</sup>

在 [Kubernetes](https://www.edgepedia.org/zh/kubernetes) 上，典型部署包括 Langflow 各服务、集群本身、持久化存储、作为单一流量入口的入口控制器、跨副本的负载均衡器，以及用于 RAG 场景的集成向量数据库（如 Astra Serverless）。文档建议将开发环境与生产环境分开运行，把开发者进行原型设计的 IDE 与将流作为独立服务提供的、受严格限制的运行时隔离开来；这种分离便于实施不同的访问控制、缩小攻击面，并使运行时能够独立扩展。<sup>[9](https://docs.langflow.org/deployment-architecture)</sup> 流与依赖项也可以打包进可移植的 Docker 镜像，以便跨环境部署。<sup>[15](https://docs.langflow.org/next/deployment-overview)</sup>

## 与 Flowise 和 n8n 的比较

Langflow 最常被拿来与 [Flowise](https://www.edgepedia.org/zh/flowise) 和 n8n 比较，这三款可视化、基于节点的工具回答的是不同的问题。Flowise 与 Langflow 都自动化 LLM 应用的内部流程，其中图即推理流水线；而 n8n 是更广泛的工作流自动化平台，将 LLM 视为数百种集成中的一个节点。<sup>[4](https://www.dreaming.press/posts/2026-06-21-n8n-vs-flowise-vs-langflow.html)</sup> Flowise 与 Langflow 均采用 MIT 许可证，对商业使用或嵌入使用没有限制；而 n8n 的核心在可持续使用许可证（Sustainable Use License）下提供源码，商业 SaaS、转售或嵌入需另行签订付费协议。<sup>[3](https://blogs.meetrix.io/blogs/flowise-vs-langflow-vs-n8n/)</sup>

技术栈也有所不同：Flowise 基于 Node.js 中的 LangChain.js（外加 LlamaIndex）构建，而 Langflow 是三者中基于 Python 的选项，n8n 仅在其 AI 智能体节点内部封装 LangChain。<sup>[16](https://altaitools.com/n8n-vs-flowise-vs-langflow/)</sup><sup> • </sup><sup>[4](https://www.dreaming.press/posts/2026-06-21-n8n-vs-flowise-vs-langflow.html)</sup> Langflow 与 Flowise 都将流以 API 端点和 JSON 导出的形式提供，但转换为可用于生产的框架代码的能力有限；n8n 将工作流导出为 JSON，并允许在 JavaScript 和 Python 节点中编写自定义代码。<sup>[17](https://blckalpaca.at/en/knowledge-base/ai-agents/ai-agent-frameworks-comparison/langflow-vs-flowise-vs-n8n)</sup> 一项对智能体平台的调查指出，Langflow 与 Flowise AI 仍与 LangChain 紧密耦合，并且在该比较中，Langflow 属于缺乏完整 MCP 支持的平台之一。<sup>[18](https://iris.cnr.it/bitstream/20.500.14243/554186/5/ISTI-TR-2025-011.pdf)</sup>

## 安全

Langflow 的灵活性——在组件定义中接受任意 Python 代码并在服务器端执行——一直是反复出现严重漏洞的根本原因。云安全联盟的一份研究简报将这一模式追溯到：将攻击者控制的流定义传入未沙箱化的 `exec()` 调用，尽管此前已打过补丁，这一设计仍延续了多个漏洞周期。<sup>[12](https://labs.cloudsecurityalliance.org/wp-content/uploads/2026/03/CSA_research_note_agentic_framework_CVEs_20260328-csa-styled.pdf)</sup>

- **CVE-2025-3248**（CVSS 9.8，2025 年 5 月披露）：`/api/v1/validate/code` 端点中的[代码注入](https://www.edgepedia.org/zh/code-injection)，影响 1.3.0 之前的 Langflow 版本；最初的修复添加了身份验证装饰器，但未移除底层的 `exec()` 模式。<sup>[19](https://github.com/advisories/GHSA-rvqx-wpfh-mfx7)</sup><sup> • </sup><sup>[12](https://labs.cloudsecurityalliance.org/wp-content/uploads/2026/03/CSA_research_note_agentic_framework_CVEs_20260328-csa-styled.pdf)</sup>
- **CVE-2025-34291**（CVSS 9.4，2025 年 12 月披露）：源验证错误，可导致跨站账户接管并结合远程代码执行；自 2026 年 1 月 23 日起观察到主动利用，部署了与 Flodric 僵尸网络相关的基础设施。<sup>[12](https://labs.cloudsecurityalliance.org/wp-content/uploads/2026/03/CSA_research_note_agentic_framework_CVEs_20260328-csa-styled.pdf)</sup><sup> • </sup><sup>[20](https://labs.cloudsecurityalliance.org/wp-content/uploads/2026/05/CSA_research_note_langflow-CVE-2025-34291-ai-orchestration-rce_20260522-csa-styled.pdf)</sup>
- **CVE-2026-33017**（CVSS 9.3）：通过一个公共流端点实现的未认证远程代码执行，该端点在架构上必须公开，因此身份验证永远无法缓解该问题。它在 2026 年 3 月 17 日披露后的 20 小时内即在实际攻击中被利用，攻击者直接根据公告描述开发出可用的漏洞利用；CISA 于 2026 年 3 月 25 日将其列入已知被利用漏洞目录，联邦机构修复截止日期为 2026 年 4 月 8 日。这是自 2025 年 5 月以来第二个被列入该目录的 Langflow 严重远程代码执行漏洞。<sup>[12](https://labs.cloudsecurityalliance.org/wp-content/uploads/2026/03/CSA_research_note_agentic_framework_CVEs_20260328-csa-styled.pdf)</sup>

据安全研究员阿维拉尔·斯里瓦斯塔瓦（Aviral Srivastava）的描述，CVE-2026-33017 的建议修复方案是完全从公共端点中移除 data 参数，使公共流只能执行其存储的服务端流数据。<sup>[12](https://labs.cloudsecurityalliance.org/wp-content/uploads/2026/03/CSA_research_note_agentic_framework_CVEs_20260328-csa-styled.pdf)</sup> 近期版本持续包含安全加固工作，包括修复模型提供方中 SSRF 后续缺口、加固公共 MCP 执行，以及回移植到 1.11.5 版本的生成代码边界加固。<sup>[11](https://github.com/langflow-ai/langflow/releases?imz_s=806a96ir5b6vnmsl3baek2ssu7)</sup>

## 发布与用例

版本就绪即发布：一个周期通常为 4 至 6 周，具体时长取决于所需的 QA 与稳定化工作量；版本遵循语义化版本规范，并带有 `v` 前缀。<sup>[10](https://github.com/langflow-ai/langflow/blob/main/RELEASE.md)</sup> 1.12.5 版于 10 月 6 日发布，带有 GitHub 验证签名。<sup>[11](https://github.com/langflow-ai/langflow/releases?imz_s=806a96ir5b6vnmsl3baek2ssu7)</sup>

文档记录的用例集中在智能体与 RAG 应用：模板库包括将音频转换为带有主题、情感、解决情况和紧急程度标签的结构化数据的通话转录与分类流水线；文档分块与分类工作流；CSV 查询助手；以及从 PDF、电子邮件和网页中提取结构化数据。<sup>[21](https://www.langflow.org/use-cases/)</sup> 具体到 RAG，向量存储 RAG 模板将“加载数据”子流（把嵌入与内容加载到向量数据库）与“检索器”子流（针对用户查询执行相似度搜索）配对使用；Astra DB 组件既可作为独立的流步骤，也可作为智能体按需查询的工具。<sup>[22](https://docs.langflow.org/bundles-datastax)</sup>

## References

1. [Langflow official site](https://www.langflow.org/)
2. [Langflow: Visual Low-Code AI App Builder for Agents and RAG, DataStax](https://www.datastax.com/products/langflow)
3. [Flowise vs Langflow vs n8n: Visual AI Workflow Builders, Meetrix blog](https://blogs.meetrix.io/blogs/flowise-vs-langflow-vs-n8n/)
4. [n8n vs Flowise vs Langflow: Choosing a Visual Agent Builder in 2026, Dreaming Press](https://www.dreaming.press/posts/2026-06-21-n8n-vs-flowise-vs-langflow.html)
5. [DataStax acquires the startup behind low-code AI builder Langflow, TechCrunch (April 4, 2024)](https://techcrunch.com/2024/04/04/datastax-acquires-logspace-the-startup-behind-the-langflow-low-code-tool-for-building-rag-based-chatbots/)
6. [Langflow vs Flowise: Open-Source AI Agent Builder for Next.js (2026), Shipgarden](https://www.shipgarden.com/gallery/langflow-vs-flowise-open-source-ai-agent-builder-nextjs-2026)
7. [langflow/docs/agents/ARCHITECTURE.md, GitHub](https://github.com/langflow-ai/langflow/blob/main/docs/agents/ARCHITECTURE.md)
8. [langflow-ai/langflow repository, GitHub](https://github.com/langflow-ai/langflow)
9. [Langflow architecture on Kubernetes, Langflow Documentation](https://docs.langflow.org/deployment-architecture)
10. [langflow/RELEASE.md, GitHub](https://github.com/langflow-ai/langflow/blob/main/RELEASE.md)
11. [Releases, langflow-ai/langflow, GitHub](https://github.com/langflow-ai/langflow/releases?imz_s=806a96ir5b6vnmsl3baek2ssu7)
12. [Agentic AI Framework CVEs Under Active Exploitation, Cloud Security Alliance research note (March 2026)](https://labs.cloudsecurityalliance.org/wp-content/uploads/2026/03/CSA_research_note_agentic_framework_CVEs_20260328-csa-styled.pdf)
13. [Use the visual editor, Langflow Documentation](https://docs.langflow.org/concepts-overview)
14. [Build flows, Langflow Documentation](https://docs.langflow.org/concepts-flows)
15. [Langflow deployment overview, Langflow Documentation](https://docs.langflow.org/next/deployment-overview)
16. [n8n vs Flowise vs Langflow: Which To Pick, Altai Tools](https://altaitools.com/n8n-vs-flowise-vs-langflow/)
17. [Langflow vs. Flowise vs. n8n (2026): Visual Agent Builders, Black Alpine](https://blckalpaca.at/en/knowledge-base/ai-agents/ai-agent-frameworks-comparison/langflow-vs-flowise-vs-n8n)
18. [Extensibility and execution monitoring, ISTI-CNR technical report](https://iris.cnr.it/bitstream/20.500.14243/554186/5/ISTI-TR-2025-011.pdf)
19. [Langflow Unauth RCE, CVE-2025-3248, GitHub Advisory Database](https://github.com/advisories/GHSA-rvqx-wpfh-mfx7)
20. [CVE-2025-34291: AI orchestration RCE, Cloud Security Alliance research note (May 2026)](https://labs.cloudsecurityalliance.org/wp-content/uploads/2026/05/CSA_research_note_langflow-CVE-2025-34291-ai-orchestration-rce_20260522-csa-styled.pdf)
21. [Use Cases, Langflow](https://www.langflow.org/use-cases/)
22. [DataStax bundle, Langflow Documentation](https://docs.langflow.org/bundles-datastax)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 现代人工智能：基础模型、生成式人工智能与人工智能产业 › AI companies, people, and products › AI products and assistants › AI agents and developer tools

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/langflow

English original: https://www.edgepedia.org/langflow
