DeepAgents是LangChain 官方发布的 Agent 框架,基于 LangChain + LangGraph 构建, 灵感直接来源于 Claude Code——官方 README 里明确写道, 这个项目"最初很大程度上是一次尝试,探究是什么让 Claude Code 如此通用, 并尝试将其做得更通用"。它的定位是一个"Agent 底座(harness)", 不是又一个聊天机器人包装,而是给开发者提供一套生产可用的基础设施, 让你可以快速构建出能处理复杂任务的 Agent 应用。 项目地址:https://github.com/langchain-ai/deepagents 官方文档:https://docs.langchain.com/oss/python/deepagents/overview 安装 pipinstalldeepagents# 或者用 uv(推荐)uvadddeepagents 案例使用 testDeepAgent1.py from deepagentsimportcreate_deep_agent agent=create_deep_agent()result=agent.invoke({"messages":[{"role":"user","content":"调研LangGraph并写一份摘要"}]})testDeepAgent2.py# pip install -qU deepagents langchain-openaifrom deepagentsimportcreate_deep_agent def get_weather(city: str)->str:"""Get weatherfora given city."""returnf"It's always sunny in {city}!"agent=create_deep_agent(model="openai:gpt-5.4",tools=[get_weather],system_prompt="You are a helpful assistant",)# Run the agentagent.invoke({"messages":[{"role":"user","content":"what is the weather in sf"}]})