Back to home

Compare

Comparing: Dify Need Not Be Rebuilt: Push Complex Workflows Down to LangGraph & Dify 不必推倒重来,复杂流程下沉 LangGraph 更稳妥

AEN
DifyLangGraphWorkflow Orchestration·

Dify Need Not Be Rebuilt: Push Complex Workflows Down to LangGraph

Migrating every Dify workflow to LangGraph could wipe out the self-service configuration capabilities that operations teams have built up. A safer approach is to stratify workflows by complexity rather than replace the platform.

What This Is

Dify is a low-code platform for building AI applications, excelling at canvas-based orchestration, prompt configuration, and knowledge bases. It enables operations teams to adjust workflows without developer support or new releases. LangGraph is a framework for managing AI workflows in code, supporting state machines, loops, interrupt recovery, and unit testing. It is well suited to tasks that require complex decisions and strict controls.

The article recommends retaining Dify as the entry point and operations layer. Ordinary Q&A, basic retrieval, and frequently adjusted prompts should remain on the platform. Complex subtasks involving branching loops, failure retries, human approvals, and high-risk operations should gradually move down to LangGraph. Retrieval and tool calls should also be extracted into shared services, rather than maintaining two separate implementations.

Industry View

We believe the value of this layered approach lies not in LangGraph being “more advanced,” but in its recognition that business systems require two kinds of capabilities: business users need to experiment quickly, while engineering teams need reliable execution. Writing every workflow in code significantly raises the cost of change; keeping every workflow on the canvas may make complex processes difficult to test and audit.

The risks are real, however. With a two-layer architecture, teams must understand both Dify and LangGraph while also handling cross-layer state, interface versions, failure rollback, and permission propagation. If responsibilities are not clearly defined, layering can easily become the maintenance of two separate systems. So-called “progressive migration” also requires explicit criteria, such as the number of loops, approval nodes, frequency of changes, and retry requirements, rather than rewriting everything whenever a complex requirement appears.

Impact on Regular People

For enterprise IT: Companies no longer need to rebuild an entire platform for a small number of complex workflows, but their architectural capability requirements will rise. They may eventually need dedicated roles for workflow and interface governance.

For individual professionals: Business users can still rely on low-code tools to launch quickly without everyone mastering code. Developers, meanwhile, need to understand state management, access control, and system integration.

For the consumer market: Consumers are unlikely to see obvious product changes for now, but high-risk functions such as approvals, payments, and deletions should benefit from more stable execution and traceability mechanisms.

Source: juejin.cn
BZH
DifyLangGraph工作流编排·

Dify 不必推倒重来,复杂流程下沉 LangGraph 更稳妥

把 Dify 流程全量迁到 LangGraph,可能让运营刚积累的自助配置能力归零;更稳妥的做法,是按复杂度分层,而不是换平台。

这是什么

Dify 是低代码 AI 应用搭建平台,擅长画布编排、提示词配置和知识库,让运营人员无需开发发版即可调整流程。LangGraph 是用代码管理 AI 工作流的框架,支持状态机、循环、中断恢复和单元测试,适合需要复杂判断与严格管控的任务。

文章建议保留 Dify 作为入口和运营层:普通问答、简单检索以及高频调整的提示词继续放在平台内;涉及分支循环、失败重试、人工审批和高危操作的复杂子任务,则逐步下沉到 LangGraph。检索与工具调用也应抽成共用服务,避免两套逻辑各自维护。

行业怎么看

我们认为这套分层思路的价值,不在于 LangGraph 更“高级”,而在于它承认了业务系统需要两种能力:业务人员需要快速试错,工程团队需要可靠执行。把所有流程都写成代码,会显著增加变更成本;把所有流程留在画布里,又可能让复杂流程难以测试和审计。

但风险也真实存在。采用双层架构后,团队要同时理解 Dify 与 LangGraph,还要处理跨层状态、接口版本、失败回退和权限传递等问题。如果职责边界不清,分层很容易变成维护两套系统。所谓“渐进迁移”也需要明确指标,例如循环次数、审批节点数量、变更频率和故障重试要求,而不是遇到复杂需求就一律改写。

对普通人的影响

对企业 IT:企业不必再因少量复杂流程重搭整套平台,但架构能力要求会提高,后续可能需要专门配置工作流与接口治理职责。

对个人职场:业务人员仍可依赖低代码工具快速上线,不必人人掌握代码;开发人员则需要理解状态管理、权限控制和系统集成。

对消费市场:消费者暂时不会看到明显产品变化,但审批、支付、删除等高风险功能有望获得更稳定的执行与追溯机制。

Source: juejin.cn