{
  "schemaVersion": "1.0",
  "schemaUrl": "https://www.yingxueyuan.cn/ai-directory.schema.json#/$defs/guideContentDocument",
  "name": "Agent 框架和搭建平台怎么选？Dify、LangGraph、CrewAI 对照｜映雪网指南机器可读正文",
  "description": "单篇指南结构化内容，含可见导语、结论、分节正文与逐节来源。",
  "siteUrl": "https://www.yingxueyuan.cn",
  "lastContentUpdate": "2026-10-25",
  "guides": [
    {
      "id": "agent-framework-vs-platform",
      "contentUrl": "https://www.yingxueyuan.cn/ai-content/agent-framework-vs-platform.json",
      "title": "Agent 框架和搭建平台怎么选？Dify、LangGraph、CrewAI 对照",
      "author": {
        "@type": "Organization",
        "@id": "https://www.yingxueyuan.cn/#editorial-team",
        "name": "映雪网编辑部",
        "url": "https://www.yingxueyuan.cn/editorial-policy/",
        "parentOrganization": {
          "@id": "https://www.yingxueyuan.cn/#organization"
        }
      },
      "publisher": {
        "@type": "Organization",
        "@id": "https://www.yingxueyuan.cn/#organization",
        "name": "映雪园智能科技",
        "alternateName": "映雪网",
        "brand": {
          "@type": "Brand",
          "@id": "https://www.yingxueyuan.cn/#brand-yingxuewang",
          "name": "映雪网",
          "url": "https://www.yingxueyuan.cn/"
        },
        "url": "https://www.yingxueyuan.cn/company/"
      },
      "description": "对照 Dify、LangGraph、CrewAI 的产品层级、开发门槛、流程控制和部署责任，判断你需要可视化应用平台还是代码编排框架；附同任务试用清单。",
      "summary": "先区分“交付 Agent 应用”与“编写 Agent 运行逻辑”：Dify 提供应用构建与发布路径；LangGraph 是低层级有状态编排框架；CrewAI 用 Flow 控制流程、按需调用协作 Agent Crew。三者不是同类产品。按开发能力、流程控制、部署责任、模型与数据边界选型，再用同一任务验证。",
      "intro": "“搭建 Agent”可能指两件不同的事：用平台配置一个可交付的应用，或在代码里编写 Agent 如何运行。Dify、LangGraph、CrewAI 分别侧重不同层次。先选对层，再比较工具，能避免拿无代码工作台和底层框架直接比功能数量。",
      "readTime": "8 分钟",
      "updatedAt": "2026-10-25",
      "url": "https://www.yingxueyuan.cn/docs/agent-framework-vs-platform/",
      "quickAnswer": {
        "text": "想较快搭建一个可测试、可发布的 Agent 应用，先看 Dify 等应用平台；要在代码中精细控制状态、持久化和人工检查点，比较 LangGraph；想用 Python 组合明确流程与角色协作 Agent，比较 CrewAI。开源框架不等于托管服务，模型 API、云端部署、观测产品和大陆账号可用性都要分别核对。",
        "source": {
          "label": "LangGraph 官方：框架与运行时定位",
          "url": "https://docs.langchain.com/oss/python/langgraph/overview"
        },
        "sources": [
          {
            "label": "LangGraph 官方概览：有状态 Agent 编排运行时",
            "url": "https://docs.langchain.com/oss/python/langgraph/overview"
          },
          {
            "label": "Dify 官方 Agent 搭建教程：Build、Preview 与发布路径",
            "url": "https://dify.ai/blog/build-your-first-agent-in-dify"
          },
          {
            "label": "CrewAI 官方介绍：Flows 与 Crews",
            "url": "https://docs.crewai.com/introduction"
          }
        ],
        "detailsUrl": "https://www.yingxueyuan.cn/docs/agent-framework-vs-platform/#compare-architectures"
      },
      "relatedGuides": [
        {
          "title": "Agent 平台怎么选？含腾讯元器迁移、企业管控与发布方式",
          "url": "https://www.yingxueyuan.cn/docs/choose-agent-builder/"
        },
        {
          "title": "Dify 怎么创建 AI Agent？从任务定义到测试发布",
          "url": "https://www.yingxueyuan.cn/docs/create-agent-with-dify/"
        },
        {
          "title": "AI Agent 是什么？和 AI 助手、自动化工作流有什么区别",
          "url": "https://www.yingxueyuan.cn/docs/what-is-ai-agent/"
        },
        {
          "title": "怎么安全试用 AI Agent？权限、数据和人工确认清单",
          "url": "https://www.yingxueyuan.cn/docs/choose-ai-agent-safely/"
        }
      ],
      "relatedTools": [
        {
          "name": "Dify",
          "url": "https://www.yingxueyuan.cn/tools/dify/",
          "kind": "ai-product-entry"
        },
        {
          "name": "LangGraph",
          "url": "https://www.yingxueyuan.cn/tools/langgraph/",
          "kind": "ai-product-entry"
        },
        {
          "name": "CrewAI",
          "url": "https://www.yingxueyuan.cn/tools/crewai/",
          "kind": "ai-product-entry"
        },
        {
          "name": "Agent 平台试用评分卡",
          "url": "https://www.yingxueyuan.cn/tools/agent-platform-scorecard/",
          "kind": "site-utility"
        }
      ],
      "sources": [
        {
          "label": "Dify 官方 Agent 搭建教程：Build、Preview 与发布路径",
          "url": "https://dify.ai/blog/build-your-first-agent-in-dify"
        },
        {
          "label": "Dify 1.18.0 官方发布说明与升级指南",
          "url": "https://github.com/langgenius/dify/releases/tag/1.18.0"
        },
        {
          "label": "LangGraph 官方概览：有状态 Agent 编排运行时",
          "url": "https://docs.langchain.com/oss/python/langgraph/overview"
        },
        {
          "label": "CrewAI 官方介绍：Flows 与 Crews",
          "url": "https://docs.crewai.com/introduction"
        },
        {
          "label": "Dify 官方 Cloud 与自托管定价路径",
          "url": "https://dify.ai/pricing"
        },
        {
          "label": "LangSmith 官方产品文档",
          "url": "https://docs.langchain.com/langsmith/observability"
        },
        {
          "label": "CrewAI AMP 官方托管平台介绍",
          "url": "https://docs-platform.crewai.com/platform/en/introduction"
        }
      ],
      "sections": [
        {
          "id": "compare-architectures",
          "heading": "先分清：应用平台、编排框架和托管产品",
          "detailsUrl": "https://www.yingxueyuan.cn/docs/agent-framework-vs-platform/#compare-architectures",
          "paragraphs": [
            "Dify 面向 AI 应用与 Agent 的构建、测试和发布；LangGraph 侧重用代码编排长时间运行、有状态的 Agent；CrewAI 将结构化 Flow 与协作式 Crew 组合。LangSmith 与 CrewAI AMP 则是各自生态中另行提供的观测/部署平台，不能把它们当成开源框架本身自带的功能。"
          ],
          "table": {
            "headers": [
              "入口",
              "你主要配置或编写什么",
              "更适合先看它的情况",
              "需要自己承担的工作"
            ],
            "rows": [
              [
                "Dify",
                "在应用工作区配置 Agent、工具、资料和工作流，再测试与发布。",
                "优先要做出一个可试用的网页/API/工作流应用，或希望使用图形界面组织能力。",
                "核对所选 Cloud/自托管部署、模型、权限、数据路径、套餐和升级方式。"
              ],
              [
                "LangGraph",
                "用代码定义状态图，把确定性步骤与模型决策组合起来。",
                "需要精细控制多步骤状态、持久化执行、人工介入或恢复机制。",
                "开发应用逻辑、运行环境、模型/工具接入、生产部署与观测。"
              ],
              [
                "CrewAI",
                "用 Python 定义 Flow，再在需要开放协作的步骤调用角色明确的 Crew。",
                "希望把可控流程与多 Agent 协作混合，而不是让所有步骤都自由规划。",
                "编写和运行项目、模型与工具配置、任务验收；托管另看 AMP。"
              ]
            ],
            "rowSources": [
              [
                {
                  "label": "Dify 官方 Agent 搭建教程",
                  "url": "https://dify.ai/blog/build-your-first-agent-in-dify"
                },
                {
                  "label": "Dify 1.18.0 发布说明",
                  "url": "https://github.com/langgenius/dify/releases/tag/1.18.0"
                }
              ],
              [
                {
                  "label": "LangGraph 官方概览",
                  "url": "https://docs.langchain.com/oss/python/langgraph/overview"
                }
              ],
              [
                {
                  "label": "CrewAI 官方介绍",
                  "url": "https://docs.crewai.com/introduction"
                }
              ]
            ]
          },
          "sources": [
            {
              "label": "Dify 官方 Agent 搭建教程：Build、Preview 与发布路径",
              "url": "https://dify.ai/blog/build-your-first-agent-in-dify"
            },
            {
              "label": "Dify 1.18.0 官方发布说明与升级指南",
              "url": "https://github.com/langgenius/dify/releases/tag/1.18.0"
            },
            {
              "label": "LangGraph 官方概览：有状态 Agent 编排运行时",
              "url": "https://docs.langchain.com/oss/python/langgraph/overview"
            },
            {
              "label": "CrewAI 官方介绍：Flows 与 Crews",
              "url": "https://docs.crewai.com/introduction"
            }
          ],
          "editorialNote": false
        },
        {
          "id": "choose-by-control",
          "heading": "按你想控制的部分选，不按“Agent 数量”选",
          "detailsUrl": "https://www.yingxueyuan.cn/docs/agent-framework-vs-platform/#choose-by-control",
          "paragraphs": [],
          "bullets": [
            "先做一个可用应用、让同事或客户试用：从 Dify 这类应用平台开始，先看当前账号支持的构建、发布和访问控制。",
            "流程必须可解释、可恢复，某些步骤必须由人审批：评估 LangGraph 的状态、持久化与 human-in-the-loop 能力；同时准备好维护代码和运行环境。",
            "任务适合分工协作，但整体仍需要明确状态和分支：评估 CrewAI Flow 管控主流程、Crew 处理复杂子任务的设计；不要假设多个 Agent 自动比单个 Agent 更准确。",
            "仍不确定：先用最小样例做原型。若一个固定工作流已满足需求，不必仅为了“Agent”标签增加自由决策步骤。"
          ],
          "sources": [
            {
              "label": "LangGraph 官方概览：有状态 Agent 编排运行时",
              "url": "https://docs.langchain.com/oss/python/langgraph/overview"
            },
            {
              "label": "CrewAI 官方介绍：Flows 与 Crews",
              "url": "https://docs.crewai.com/introduction"
            },
            {
              "label": "Dify 官方 Agent 搭建教程：Build、Preview 与发布路径",
              "url": "https://dify.ai/blog/build-your-first-agent-in-dify"
            }
          ],
          "editorialNote": false
        },
        {
          "id": "managed-vs-framework",
          "heading": "开源框架、自托管与云端部署是不同选择",
          "detailsUrl": "https://www.yingxueyuan.cn/docs/agent-framework-vs-platform/#managed-vs-framework",
          "paragraphs": [
            "安装了 LangGraph 或 CrewAI，不等于你已经获得模型、运行服务器、团队登录、日志观测或对外发布页面。框架可以在你的应用中运行；模型仍可能由独立 API 提供；托管和观测也可能是另一个厂商的服务。Dify Cloud 与 Dify Community 自部署同样是不同部署路径。",
            "如果考虑 LangSmith 或 CrewAI AMP，应分别阅读其服务、计划、数据处理与部署说明。若你的应用在中国大陆使用，还要区分代码包能否安装、所选模型 API 的地区/账号资格、云端管理服务可访问性，以及推理和数据存储区域；其中一项可用不能证明其他项也可用。"
          ],
          "bullets": [
            "本地运行只说明应用代码运行在本机或自管环境，不能据此推断模型推理也在本机。",
            "开源代码可获取不等于商业托管服务有相同地区、账号、套餐或 SLA。",
            "生产应用还要为密钥管理、权限控制、失败重试、日志保留、成本监控和人工接管指定负责人。"
          ],
          "note": "映雪网未用中国大陆账号逐项试用这些云服务。地区、网络、账号资格、定价与具体功能开放状态需分别到厂商当前页面核对。",
          "sources": [
            {
              "label": "LangGraph 官方概览：有状态 Agent 编排运行时",
              "url": "https://docs.langchain.com/oss/python/langgraph/overview"
            },
            {
              "label": "LangSmith 官方产品文档",
              "url": "https://docs.langchain.com/langsmith/observability"
            },
            {
              "label": "CrewAI 官方介绍：Flows 与 Crews",
              "url": "https://docs.crewai.com/introduction"
            },
            {
              "label": "CrewAI AMP 官方托管平台介绍",
              "url": "https://docs-platform.crewai.com/platform/en/introduction"
            },
            {
              "label": "Dify 官方 Cloud 与自托管定价路径",
              "url": "https://dify.ai/pricing"
            }
          ],
          "editorialNote": false
        },
        {
          "id": "same-task-evaluation",
          "heading": "用同一份任务说明做横向试用",
          "detailsUrl": "https://www.yingxueyuan.cn/docs/agent-framework-vs-platform/#same-task-evaluation",
          "paragraphs": [
            "不要只比较演示视频或“支持多少 Agent”。给候选平台/框架同一份任务、同一组脱敏样例、同一模型与工具权限，再记录结果是否可核验，以及开发和运维成本。"
          ],
          "bullets": [
            "固定目标和输出验收条件：说明谁会使用、需要解决的重复任务、输出字段与格式；把正确/失败判据写成可以逐项检查的条件。",
            "准备相同的低风险样例：使用公开材料、虚构数据或获准的脱敏副本；所有候选都使用相同输入，不连接生产账号。",
            "固定模型、工具和权限：记录模型版本、API、工具、检索资料及可操作范围；不同模型或权限下的结果不能直接当作公平比较。",
            "测试缺资料、失败和人工确认：观察系统是否标记未知、保留来源、允许人工检查并从失败恢复；不要只记成功演示。",
            "估算完整交付和维护成本：记录开发时间、运行环境、模型/API、托管、观测、更新、安全和故障响应责任；免费试用不代表生产总成本。"
          ],
          "sources": [],
          "editorialNote": false
        },
        {
          "id": "next-steps",
          "heading": "从哪一条路径继续",
          "detailsUrl": "https://www.yingxueyuan.cn/docs/agent-framework-vs-platform/#next-steps",
          "paragraphs": [],
          "bullets": [
            "希望用图形界面创建、测试并发布 Agent：看 Dify 创建指南和 Dify 工具资料。",
            "希望把长流程写成有状态的代码图：看 LangGraph 官方概览与映雪网工具资料。",
            "希望组合固定流程与多 Agent 协作：看 CrewAI Flow/Crew 说明及工具资料。",
            "已有平台候选，准备做同任务记录：打开 Agent 平台试用评分卡，不把工具生成的表格当作自动评测结果。"
          ],
          "note": "本文是基于厂商公开资料的选型整理，不是这些产品的同任务实测、效果排名、安全认证或地区支持承诺。功能与部署要求会更新；实施前应复核当前官方文档。",
          "sources": [
            {
              "label": "Dify 官方 Agent 搭建教程：Build、Preview 与发布路径",
              "url": "https://dify.ai/blog/build-your-first-agent-in-dify"
            },
            {
              "label": "LangGraph 官方概览：有状态 Agent 编排运行时",
              "url": "https://docs.langchain.com/oss/python/langgraph/overview"
            },
            {
              "label": "CrewAI 官方介绍：Flows 与 Crews",
              "url": "https://docs.crewai.com/introduction"
            }
          ],
          "editorialNote": false
        }
      ]
    }
  ]
}
