DE

DeepAgents

⭐ 27,200•Python•Agent Framework

Batteries-included agent harness built on LangGraph by LangChain AI.

LangGraphLangChainLangSmithproductionHITLMCP

Overview

DeepAgents is the opinionated agent framework from LangChain, built on LangGraph with LangSmith tracing. Features sub-agents, persistent memory, human-in-the-loop approval, pluggable filesystem backends, context summarization, and native MCP integration. Ships with Deep Agents Code terminal coding agent.

Features

  • ✓LangGraph-based stateful execution
  • ✓Sub-agent isolation
  • ✓Context auto-summarization
  • ✓Persistent cross-session memory
  • ✓Human-in-the-loop approval
  • ✓MCP tool integration
  • ✓LangSmith observability
  • ✓Model-agnostic

Installation

uv add deepagents

Pros

  • +Production-ready out of the box
  • +Deep LangChain ecosystem integration
  • +Model-agnostic
  • +Built-in context management
  • +Terminal coding agent included
  • +MIT license

Cons

  • −Tightly coupled to LangGraph
  • −Steeper learning curve
  • −LangSmith required for full observability
  • −Newer project

Alternatives

Documentation

DeepAgents

Overview

DeepAgents is an open-source, batteries-included agent harness developed by LangChain AI. Built directly on LangGraph with LangSmith tracing and deployment, it is the opinionated evolution of LangChain's agent tooling. With 27,200 GitHub stars, DeepAgents is quickly becoming the reference implementation for production-grade agent development in the LangChain ecosystem.

DeepAgents takes a firm stance: agents should work out of the box for long-horizon, multi-step work, yet remain fully extensible. It ships with production-grade context management, filesystem abstraction, human-in-the-loop approval flows, and persistent memory — all built in rather than bolted on. A pre-built offering, Deep Agents Code, ships as a terminal-based coding agent, installable in one command.

Features

  • Built on LangGraph: Stateful, durable, interruptible agent execution
  • Sub-agents with isolated context: Child agents with separate context windows
  • Pluggable filesystem backends: S3, GCS, local, or custom via unified API
  • Context summarization: Auto-summarizes and trims to stay within model limits
  • Persistent cross-session memory: Knowledge retained across sessions
  • Human-in-the-loop approval: Pauses for confirmation on sensitive calls
  • Shell command execution: Sandboxed terminal with configurable allowlists
  • Reusable skills: Define, share, and compose tool bundles
  • Native MCP integration: Any MCP server plugs in as a tool source
  • LangSmith tracing: Full observability and debugging
  • Model-agnostic: Any tool-calling LLM

Installation

# With uv (recommended)
uv add deepagents

# With pip
pip install deepagents

# Terminal coding agent (Deep Agents Code)
curl -LsSf https://langch.in/dcode | bash

Quick Start

from deepagents import Agent

agent = Agent()
result = agent.run(
    "Analyze the sales data in data/ and produce a summary report",
    model="anthropic/claude-sonnet-4-6"
)
# With human-in-the-loop and persistent memory
from deepagents import Agent, Memory

agent = Agent(
    memory=Memory(session_id="my-session"),
    require_approval=["shell", "filesystem-write"]
)
agent.run("Draft an email to the client with the latest metrics")

Core Concepts

  • Stateful Agent: Runs on LangGraph StateGraph — a durable, interruptible state machine
  • Context Budgeting: Tracks token use and auto-summarizes to enable multi-hour runs
  • Pluggable I/O: Abstract filesystem backend layer for easy storage swapping
  • Skill Composition: Versioned, composable tool bundles

Advanced Features

Sub-agent delegation:

result = agent.delegate(
    "Research competitive landscape for AI agents in Q2 2026",
    model="openai/gpt-4o",
    isolation=True
)

MCP tools:

from deepagents import MCPToolset
agent = Agent(tools=MCPToolset.from_server("brave-search").tools())

LangSmith tracing:

import os
os.environ["LANGSMITH_TRACING"] = "true"
os.environ["LANGSMITH_PROJECT"] = "my-deepagents"

Pros

  • ✅ Production-ready (LangSmith, memory, HITL out of the box)
  • ✅ Deep LangChain/LangGraph ecosystem integration
  • ✅ Model-agnostic with any tool-calling LLM
  • ✅ Built-in context management for long-horizon work
  • ✅ Terminal coding agent ships ready to use
  • ✅ MIT license

Cons

  • ❌ Tight coupling to LangGraph
  • ❌ Steeper learning curve than lighter SDKs
  • ❌ Full observability requires LangSmith account
  • ❌ Newer project — ecosystem still maturing

When to Use

  • Production AI agents needing reliability and observability
  • LangChain teams wanting a unified framework
  • Long-horizon workflows (research, code review, analysis pipelines)
  • Organizations requiring HITL for compliance or safety
  • Developers wanting an agent-native terminal coding agent

Resources