DeepAgents智能体
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 agentcreate_deep_agent()resultagent.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.returnfIts always sunny in {city}!agentcreate_deep_agent(modelopenai:gpt-5.4,tools[get_weather],system_promptYou are a helpful assistant,)# Run the agentagent.invoke({messages:[{role:user,content:what is the weather in sf}]})