
Two months ago we wrote about Deep Agents - a term we coined for agents that are able to do complex, open ended tasks over longer time horizons. We hypothesized that there were four key elements to those agents: a planning tool, access to a filesystem, subagents, and detailed prompts.两个月前,我们撰写了关于 Deep Agents 的文章——这是我们为能够跨越更长时间跨度执行复杂、开放式任务的智能体所创造的术语。我们假设这些智能体有四个关键要素:规划工具、文件系统访问权限、子智能体以及详细的提示词。

We launched deepagents as an Python package that had a base of all these elements, so that you would only have to bring your custom tools and a custom prompt and you could build a Deep Agent easily.我们发布了 deepagents 作为 Python 包,它包含了所有这些基础要素,因此您只需提供自定义工具和自定义提示词,即可轻松构建 Deep Agent。
We've seen strong interest and adoption, and today we're excited to double down with a 0.2 release. In this blog we want to talk about whats new in 0.2 release compared to the launch, as well as when to use deepagents (vs langchain or langgraph)我们看到了强烈的兴趣和采用率,今天我们很高兴通过 0.2 版本加码投入。在这篇博客中,我们将讨论 0.2 版本相比发布时的更新内容,以及何时使用 deepagents(对比 langchain 或 langgraph)。
Pluggable Backends可插拔后端
The main new addition in 0.2 release comes in the form of pluggable backends. Previously, the "filesystem" that deepagents had access to was a "virtual filesystem". It would use LangGraph state to store files.0.2 版本的主要新增功能是可插拔后端。此前,deepagents 访问的“文件系统”是一个“虚拟文件系统”,它使用 LangGraph 状态来存储文件。
In 0.2, we have a new Backend abstraction, which allows you to plug in anything as the "filesystem". Built in implementations include:在 0.2 版本中,我们引入了新的后端抽象,允许您将任何内容作为“文件系统”插入。内置实现包括:
- LangGraph StateLangGraph State
- LangGraph Store (cross thread persistence)LangGraph Store(跨线程持久化)
- The actual local filesystem实际的本地文件系统
We've also introduced the idea of a "composite backend". This allows you to have a base backend (eg local filesystem) but then map on top of it other backends at certain subdirectories. An example use case of this is to empower long term memory. You could have a local filesystem as a base backend, but then map all file operations in /memories/ directory to an s3 backed "virtual filesystem", allowing your agent to add things there and have them persist beyond your computer.我们还引入了“复合后端”的概念。这允许您拥有一个基础后端(例如本地文件系统),然后在特定子目录下映射其他后端。一个典型的用例是增强长期记忆。您可以将本地文件系统作为基础后端,然后将 /memories/ 目录下的所有文件操作映射到基于 s3 的“虚拟文件系统”,从而使您的智能体能够将内容添加到那里,并使其在您的计算机之外持久保存。
You can write your own backend to create a "virtual filesystem" over any database or any data store you want.您可以编写自己的后端,在任何数据库或数据存储上创建“虚拟文件系统”。
You can also subclass an existing backend and add in guardrails around which files can be written to, format checking for these files, etc.您还可以对现有后端进行子类化,并添加关于哪些文件可以被写入、这些文件的格式检查等方面的护栏。
Other things in 0.20.2 版本中的其他内容
We also added a number of other improvements making their way to deepagents in the 0.2 release:我们还在 0.2 版本中为 deepagents 引入了许多其他改进:
- Large tool result eviction: automatically dump large tool results to the filesystem when they exceed a certain token limit.大型工具结果驱逐:当大型工具结果超过特定 token 限制时,自动将其转储到文件系统。
- Conversation history summarization: automatically compress old conversation history when token usage becomes large.对话历史摘要:当 token 使用量变大时,自动压缩旧的对话历史。
- Dangling tool call repair: fix message history when tool calls are interrupted or cancelled before execution.悬空工具调用修复:在工具调用在执行前被中断或取消时,修复消息历史记录。
When to use deepagents vs LangChain, LangGraph何时使用 deepagents 对比 LangChain、LangGraph
This is now our third open source library we are investing in, but we believe that all three serve different purposes. In order to distinguish these purposes, we will likely refer deepagents as an "agent harness", langchain as an "agent framework", and langgraph as an agent runtime.这是我们投资的第三个开源库,但我们相信这三个库各有用途。为了区分这些用途,我们可能会将 deepagents 称为“智能体工具包 (agent harness)”,将 langchain 称为“智能体框架 (agent framework)”,将 langgraph 称为“智能体运行时 (agent runtime)”。

LangGraph is great if you want to build things that are combinations of workflows and agents.如果您想构建工作流和智能体的组合,LangGraph 是绝佳选择。
LangChain is great if you want to use the core agent loop without anything built in, and built all prompts/tools from scratch.如果您想使用核心智能体循环而不使用任何内置功能,并从零开始构建所有提示词/工具,LangChain 是绝佳选择。
Deep Agents is great for building more autonomous, long running agents where you want to take advantage of built in things like planning tools, filesystem, etc.Deep Agents 非常适合构建更自主、长时间运行的智能体,您可以利用规划工具、文件系统等内置功能。
They built on top of each other - deepagents is built on top of langchain's agent abstraction, which is turn is built on top of langgraph's agent runtime.它们是相互构建的——deepagents 构建在 langchain 的智能体抽象之上,而 langchain 又构建在 langgraph 的智能体运行时之上。







