Co-Pilot / 辅助式
更新于 3 months ago

deepagents

Llangchain-ai
8.5k
langchain-ai/deepagents
80
Agent 评分

💡 摘要

Deep Agents 是一个可定制的代理工具,简化了 AI 代理的创建和管理。

🎯 适合人群

希望快速部署代理的 AI 开发者需要任务自动化的数据科学家希望集成 AI 功能的产品经理需要可定制 AI 工具的研究人员对 AI 驱动的自动化感兴趣的 DevOps 工程师

🤖 AI 吐槽:看起来很能打,但别让配置把人劝退。

安全分析中风险

风险:Medium。建议检查:是否执行 shell/命令行指令;是否发起外网请求(SSRF/数据外发);API Key/Token 的获取、存储与泄露风险;文件读写范围与路径穿越风险;依赖锁定与供应链风险。以最小权限运行,并在生产环境启用前审计代码与依赖。

What is Deep Agents?

Deep Agents is an agent harness. An opinionated, ready-to-run agent out of the box. Instead of wiring up prompts, tools, and context management yourself, you get a working agent immediately and customize what you need.

What's included:

  • Planningwrite_todos / read_todos for task breakdown and progress tracking
  • Filesystemread_file, write_file, edit_file, ls, glob, grep for reading and writing context
  • Shell accessexecute for running commands (with sandboxing)
  • Sub-agentstask for delegating work with isolated context windows
  • Smart defaults — Prompts that teach the model how to use these tools effectively
  • Context management — Auto-summarization when conversations get long, large outputs saved to files

Quickstart

pip install deepagents # or uv add deepagents
from deepagents import create_deep_agent agent = create_deep_agent() result = agent.invoke({"messages": [{"role": "user", "content": "Research LangGraph and write a summary"}]})

The agent can plan, read/write files, and manage its own context. Add tools, customize prompts, or swap models as needed.

Customization

Add your own tools, swap models, customize prompts, configure sub-agents, and more. See the documentation for full details.

from langchain.chat_models import init_chat_model agent = create_deep_agent( model=init_chat_model("openai:gpt-4o"), tools=[my_custom_tool], system_prompt="You are a research assistant.", )

MCP is supported via langchain-mcp-adapters.

Deep Agents CLI

Try Deep Agents instantly from the terminal:

uv tool install deepagents-cli deepagents

The CLI adds conversation resume, web search, remote sandboxes (Modal, Runloop, Daytona), persistent memory, custom skills, and human-in-the-loop approval. See the CLI documentation for more. Using the Deep Agents requires setting an API Key before running (ex: ANTHROPIC_API_KEY).

LangGraph Native

create_deep_agent returns a compiled LangGraph graph. Use it with streaming, Studio, checkpointers, or any LangGraph feature.

FAQ

Why should I use this?

  • 100% open source — MIT licensed, fully extensible
  • Provider agnostic — Works with Claude, OpenAI, Google, or any LangChain-compatible model
  • Built on LangGraph — Production-ready runtime with streaming, persistence, and checkpointing
  • Batteries included — Planning, file access, sub-agents, and context management work out of the box
  • Get started in secondspip install deepagents or uv add deepagents and you have a working agent
  • Customize in minutes — Add tools, swap models, tune prompts when you need to

Resources

  • Documentation — Full API reference and guides
  • Examples — Working agents and patterns
  • CLI — Interactive terminal interface

Security

Deep Agents follows a "trust the LLM" model. The agent can do anything its tools allow. Enforce boundaries at the tool/sandbox level, not by expecting the model to self-police.

五维分析
清晰度8/10
创新性8/10
实用性9/10
完整性8/10
可维护性7/10
优缺点分析

优点

  • 完全开源且可扩展
  • 与各种模型兼容,不受提供者限制
  • 开箱即用的基本功能
  • 快速设置和简单定制

缺点

  • 需要设置 API 密钥以获得完整功能
  • 复杂任务可能需要额外配置
  • 信任模型依赖于工具/沙箱边界
  • 文档中的示例有限

相关技能

pytorch

S
toolCode Lib / 代码库
92/ 100

“它是深度学习的瑞士军刀,但祝你好运能从47种安装方法里找到那个不会搞崩你系统的那一个。”

agno

S
toolCode Lib / 代码库
90/ 100

“它承诺成为智能体领域的Kubernetes,但得看开发者有没有耐心学习又一个编排层。”

nuxt-skills

S
toolCo-Pilot / 辅助式
90/ 100

“这本质上是一份组织良好的小抄,能把你的 AI 助手变成一只 Nuxt 框架的复读机。”

免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。

版权归原作者所有 langchain-ai.