deep-agents

作成者: langchain-ai

計画、コンテキスト管理、サブエージェント委任、サンドボックス実行を備えた、バッテリー込みのエージェントを構築します。複雑でマルチステップのタスクに使用します。

npx skills add https://github.com/langchain-ai/docs --skill deep-agents

Deep Agents

Deep Agents is the easiest way to start building agents powered by LLMs—with built-in capabilities for task planning, file systems for context management, subagent delegation, and long-term memory. It is an "agent harness" built on LangChain core building blocks and the LangGraph runtime.

When to use

Use Deep Agents when you need to:

  • Build agents fast with sensible defaults and minimal configuration
  • Handle complex, multi-step tasks that benefit from automatic planning
  • Manage context with a built-in virtual filesystem for large inputs
  • Delegate subtasks to specialized subagents
  • Run code safely in sandboxed execution environments
  • Use a terminal agent via Deep Agents Code

When NOT to use

  • For simple tool-calling agents without planning or subagents, use LangChain agents instead—lighter weight
  • For custom graph-based orchestration with explicit control flow, use LangGraph directly
  • Deep Agents is the highest-level abstraction—it trades flexibility for convenience

Install

# Python
pip install deepagents

# JavaScript/TypeScript
npm install deepagents langchain @langchain/core

Quick reference

Create a deep agent

# pip install deepagents langchain-anthropic
from deepagents import create_deep_agent

def get_weather(city: str) -> str:
    """Get weather for a given city."""
    return f"It's always sunny in {city}!"

agent = create_deep_agent(
    model="anthropic:claude-sonnet-4-6",
    tools=[get_weather],
    system_prompt="You are a helpful assistant",
)

result = agent.invoke(
    {"messages": [{"role": "user", "content": "What is the weather in SF?"}]}
)

Use Deep Agents Code

# Install Deep Agents Code
pip install deepagents-code

# Run an interactive terminal agent
deepagents

Built-in capabilities

CapabilityDescription
PlanningAutomatic task decomposition for complex requests
File systemVirtual filesystem for reading, writing, and managing context
SubagentsSpawn child agents for parallel subtask execution
Context managementAutomatic context compression for long conversations
Sandboxed executionRun code in isolated environments (Modal, Runloop, Daytona)
ProtocolsACP, MCP, and A2A support for interoperability

Key documentation

  • Overview—What Deep Agents is and how it compares to LangChain and LangGraph
  • Quickstart—Build your first deep agent
  • Customization—Configure models, tools, and behavior
  • Context engineering—Manage context for complex tasks
  • Subagents—Delegate work to child agents
  • Sandboxes—Run code in isolated environments
  • Code—Deep Agents Code, the terminal agent interface
  • Deploy—Deploy to production

API reference

For SDK class and method details, use the LangChain API Reference site:

  • MCP server: https://reference.langchain.com/mcp

Related skills

  • langchain—Core building blocks that Deep Agents is built on
  • langgraph—Runtime that powers Deep Agents' durable execution
  • langsmith—Trace, evaluate, and deploy your deep agents

langchain-aiのその他のスキル

deepagents-thread-inspector
langchain-ai
ローカルのDeep Agents Code SQLiteセッションストア内の会話を検査・説明します。LangSmithトレースツールが利用できない場合のフォールバックとして使用し、…
deepagents-python-quickstart
langchain-ai
公式クイックスタートに従って、Pythonで最小限のローカルDeep Agentをスキャフォールドし、Tavilyの代わりにプロバイダー標準のウェブ検索を使用します。ユーザーが…を望む場合に使用します。
deepagents-typescript-quickstart
langchain-ai
公式クイックスタートに従って、Tavilyの代わりにプロバイダー標準のウェブ検索を使用しながら、TypeScriptで最小限のローカルDeep Agentをスキャフォールドする。ユーザーが…の場合に使用する。
eval-engineering
langchain-ai
エージェントリポジトリと、ユーザーが提供した任意のトレースを反復的に調査し、ユーザーにインタビューし、Harborの評価を一度に1つ作成・実行・監査します。~に使用します…
LangChain RAG Pipeline
langchain-ai
このスキルは、あらゆる検索拡張生成(RAG)システムを構築する際に呼び出してください。ドキュメントローダー、RecursiveCharacterTextSplitter、埋め込み(OpenAI)などをカバーします。
LangChain Structured Output & HITL
langchain-ai
langchain-structured-output-&-hitl — AIエージェント用のインストール可能なスキルで、langchain-ai/langchain-skillsから公開されています。
LangSmith Datasets
langchain-ai
このスキルは、トレースから評価データセットを作成する場合、データセットをLangSmithにアップロードする場合、またはデータセットをクエリする場合に呼び出します。データセットの種類(final_response、…)をカバーします。
langsmith-evaluator
langchain-ai
LangSmithの評価パイプラインを構築する際にこのスキルを呼び出してください。以下の3つのコアコンポーネントをカバーします:(1) 評価器の作成 - LLM-as-Judge、カスタムコード;(2)…