Deep Agents: LangChain's Open-Source Agent Harness Inspired by Claude Code

· # AI 활용
Deep Agents LangChain LangGraph 코딩 에이전트

In December 2025, LangChain founder Harrison Chase published a blog post titled “Deep Agents”1. After observing how Claude Code had evolved beyond a simple coding tool into a general-purpose agent, he announced plans to extract its core architecture and open-source it. Three months later, Deep Agents has crossed 10,200 GitHub stars and established itself as a new pillar of the LangChain ecosystem.

What Makes an Agent “Deep”

Hooking up tools to an LLM and running it in a loop is the simplest form of an agent. The problem is that this approach quickly falls apart when faced with complex tasks. Chase called this the “shallow agent.” In contrast, products like Claude Code, Deep Research, and Manus could sustain complex work over extended periods. They all shared four key traits:

  1. Detailed system prompts — Claude Code’s system prompt runs thousands of lines, covering tool usage instructions and situational behavior guidelines
  2. Planning tools — A todo list mechanism that breaks work into steps and tracks progress
  3. Sub-agents — The ability to spawn child agents and delegate individual tasks
  4. File system — A persistent workspace for saving results, taking notes, and coordinating between agents

Deep Agents bundles all four into a single package.

[!KEY] The essence of Deep Agents is combining planning, a file system, sub-agents, and carefully crafted prompts with the simple “LLM + tool loop” pattern to enable sustained, long-running task execution.

Architecture: An Agent Built on LangGraph

To understand Deep Agents, you first need to grasp the layer cake of the LangChain ecosystem.

graph TD
    A[LangGraph<br/>Agent Runtime] --> B[LangChain<br/>Agent Abstractions]
    B --> C[Deep Agents<br/>Agent Harness]
    C --> D[Deep Agents CLI<br/>Terminal Coding Agent]
    A --> E[LangSmith<br/>Observability & Debugging]
    C --> F[Custom User Agents]

LangGraph is LangChain’s agent orchestration framework2. It defines agent execution flows as stateful graphs and provides production-grade features like streaming, checkpointing, and persistence. Companies like Klarna, Replit, and Elastic use it in production.

The create_deep_agent() function returns a compiled LangGraph graph, which means you get all of LangGraph’s capabilities — streaming, Studio integration, checkpointers — out of the box. This isn’t a thin wrapper; it’s a LangGraph-native application.

Built-in Tools at a Glance

Deep Agents ships with five categories of tools by default.

CategoryToolPurpose
Planningwrite_todosTask decomposition and progress tracking (effectively a no-op — used for context engineering)
File Systemread_file, write_file, edit_file, ls, glob, grepFile read/write/search
ShellexecuteCommand execution (with sandbox support)
Sub-agenttaskDelegates subtasks in an isolated context window
Context ManagementAuto-summarizationAutomatically summarizes earlier conversation as it grows

The write_todos tool is particularly interesting. Like Claude Code’s todo list tool, it doesn’t actually do anything. The mere act of the LLM calling the tool forces it to organize its thinking about what needs to be done — a context engineering strategy in disguise.

Sub-agents are also worth highlighting. When the main agent tackles complex research, it can spawn sub-agents for individual topics and run them in parallel. Each sub-agent operates in its own context window, keeping the main agent’s context clean.

Usage: Three Lines Is All You Need

from deepagents import create_deep_agent

agent = create_deep_agent()
result = agent.invoke({
    "messages": [{"role": "user", "content": "Research LangGraph and summarize your findings"}]
})

Swapping models, adding custom tools, and modifying the system prompt are equally straightforward.

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 (Model Context Protocol) tools can be connected via langchain-mcp-adapters. If you’re already running an MCP server, you can plug your existing tools into Deep Agents without writing any glue code.

Deep Agents CLI: A Terminal Coding Agent

The SDK alone is powerful, but LangChain goes a step further with a CLI version — a terminal-based coding agent in the vein of Claude Code or Codex CLI.

curl -LsSf https://raw.githubusercontent.com/langchain-ai/deepagents/main/libs/cli/scripts/install.sh | bash

Key CLI features include:

  • Web search — Real-time web search via the Tavily API
  • HTTP requests — External API calls and data collection
  • Persistent memory — Stores memories as markdown files under ~/.deepagents/<agent_name>/memories/, preserving project conventions, coding styles, and preferences across sessions
  • Human-in-the-loop — Requires user approval for sensitive tool calls
  • Skill system — Extends agent capabilities through custom knowledge and instructions stored in a skills directory
  • Context compression — Summarizes earlier conversation in long sessions and offloads the originals to the backend, freeing up the context window
  • MCP tools — Automatically loads tools from external MCP servers via configuration files
  • LangSmith tracing — Tracks tool calls and decision-making in LangSmith

The persistent memory approach is especially impressive. The agent follows a “memory-first protocol”: it searches existing memories before starting work, references them when facing uncertainty, and automatically saves new information. It’s similar to Claude Code’s CLAUDE.md, but more automated in that the agent manages its own memory.

Competitive Landscape: Claude Agent SDK and Codex SDK

Deep Agents doesn’t exist in a vacuum. Anthropic’s Claude Agent SDK and OpenAI’s Codex SDK compete in the same space3.

AspectDeep AgentsClaude Agent SDKCodex SDK
Model SupportAny LLM (100+)Claude onlyOpenAI only
Use CaseGeneral-purpose agent (incl. coding)AI coding agentCoding task execution
RuntimeLocal, remote sandbox, virtual file systemLocalLocal, cloud
DeploymentLangGraph PlatformSelf-hostedN/A
ObservabilityLangSmithNoneOpenAI traces
LicenseMITMIT (Claude Code itself is proprietary)Apache-2.0

The biggest differentiator for Deep Agents is model independence. The Claude Agent SDK is locked to Claude models; the Codex SDK is locked to OpenAI. Deep Agents can connect to Anthropic, OpenAI, or open-source models alike. When production requirements demand switching models for cost or performance reasons, this flexibility becomes a decisive advantage.

On the other hand, the Claude Agent SDK shines through its deep integration with Claude models. Its permission system and behavior control via hooks offer more granular security configuration. The Codex SDK is closer to a complete product, spanning a desktop app, IDE extensions, and a cloud interface.

[!KEY] If you want the freedom to swap models, choose Deep Agents. If you need deep integration with a specific model, Claude Agent SDK or Codex SDK is the better fit.

Security Model: “Trust the LLM”

Deep Agents takes a clear stance on security: “Trust the LLM” — let the agent do anything its tools allow, but enforce boundaries at the tool and sandbox level.

This is a pragmatic decision: don’t rely on the model to exercise self-restraint. Even if a prompt injection or jailbreak attempt succeeds, limiting tool permissions minimizes the blast radius. The CLI’s human-in-the-loop approval system works in the same vein, requiring explicit user consent for high-risk operations like shell command execution.

That said, this model has its limits. Without fine-grained tool permissions, accidental file deletions or sensitive data exposure can still occur. Compared to the Claude Agent SDK’s multi-layered permission system (modes, rules, hooks), the approach remains relatively coarse.

Limitations and Practical Considerations

Community feedback reveals several limitations worth noting.

Production deployment complexity — As one Reddit thread pointed out, a LangSmith license is effectively required for authentication handling and performance optimization in production4. The framework is open source, but production-grade observability and deployment depend on paid infrastructure.

Unclear positioning — A fair number of users are confused about when to use LangChain vs. LangGraph vs. Deep Agents. The official guidance is clear enough — LangChain for building from scratch, LangGraph for composing workflows and agents, Deep Agents for ready-to-use autonomous agents — but the boundaries blur in practice.

Prompt dependency — Deep Agents’ performance hinges heavily on the quality of its built-in system prompt. Just as Claude Code achieves its effectiveness through thousands of lines of carefully engineered prompts, Deep Agents requires significant prompt engineering investment. The default prompt doesn’t cover every use case.

Where It Fits in the LangChain Ecosystem

Deep Agents sits at the top layer of the LangChain ecosystem. LangGraph handles low-level orchestration, LangChain provides agent abstractions, and Deep Agents delivers ready-to-use, fully assembled agents on top of both.

This layering is intentional. The LangChain team designed it so developers can choose the right level of abstraction for their needs: LangGraph for maximum control, LangChain for a reasonable middle ground, and Deep Agents for an agent that works out of the box. LangSmith provides observability across all layers.

As explored in the previous analysis of the agent platform war, the agent framework market is fragmenting rapidly. Anthropic is pushing a Claude-centric integrated experience through Claude Code and the Agent SDK. OpenAI offers an end-to-end coding solution with Codex. LangChain positions Deep Agents as a model-agnostic open platform.

Conclusion: Who Is This For?

Deep Agents serves two audiences at once. For developers who want to prototype agents quickly, pip install deepagents delivers a working agent in one line. For teams building production agents, it offers a clear upgrade path: model swapping, custom tools, and deployment on LangGraph Platform.

The frank admission that it drew inspiration from Claude Code is both honest and strategically savvy. Deep Agents’ essence lies in analyzing why Claude Code’s architecture works and generalizing those patterns for any LLM. The ability to build “deep” agents without being tied to a specific model — that’s likely why Deep Agents has earned over 10,000 stars.

Footnotes

  1. Harrison Chase, “Deep Agents”, LangChain Blog, 2025년 12월 30일. https://blog.langchain.com/deep-agents/

  2. LangGraph 공식 문서, “LangGraph Overview”. https://docs.langchain.com/oss/python/langgraph/overview

  3. LangChain 공식 문서, “Comparison with Claude Agent SDK and Codex”. https://docs.langchain.com/oss/python/deepagents/comparison

  4. Reddit r/LangChain, “Anyone seen a deep agent architecture actually running in live production yet?”, 2025년 11월. https://www.reddit.com/r/LangChain/comments/1ou87ke/

← Gemma 4 vs Qwen 3.6: Why the Open-Model Battleground Is Shifting page-agent: Drop a Single Script Tag to Embed an AI Agent Inside Any Web Page →