Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Comparing LangGraph vs. Deep Agents for LLM Application Development

说明与用途

作者比较了 LangChain 的 LangGraph 和 Deep Agents。LangGraph 提供结构化的方法,对工作流程有完全的控制权,但需要手动定义步骤。Deep Agents 提供了更灵活的开发体验,更接近构建代理时的自然思维,并内置了对规划和记忆的支持。对于一个打包清单任务,作者展示了 Deep Agents 所需的代码更少且更直观。

问题

Developers need to choose between structured, low-level control (LangGraph) and flexible, high-level abstraction (Deep Agents) when building LLM-powered applications, specifically for tasks like generating packing lists based on weather.

结果

The author found Deep Agents to be more flexible and intuitive for building agents compared to the structured, manual control required by LangGraph. Deep Agents simplifies the development process for tasks involving planning and memory, while LangGraph remains suitable for scenarios requiring precise workflow control.

工作流

  • Define the task: 'I am visiting Bengaluru. What clothes should I pack?'
  • Implement a mock weather lookup function (get_weather) returning hardcoded values for cities like Bengaluru, London, and Mumbai.
  • Implement the solution using LangGraph: Define PackingState TypedDict, create check_weather and create_packing_list functions, and wire them into a StateGraph.
  • Implement the solution using Deep Agents: Utilize the Deep Agents framework to handle the task with built-in planning and memory capabilities.
  • Compare the code complexity and developer experience between the two approaches.

证据

Having worked with LangGraph, I found it to be a very structured approach. You have a lot of control over how the workflow runs, but that also means you need to define the steps yourself

来源

With Deep Agents, I found the experience to be more flexible and closer to how I naturally think about building an agent.

来源

  • 记录日期: 2026-09-08T09:16:06.275Z