Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.langchain.com/llms.txt

Use this file to discover all available pages before exploring further.

The easiest way to start building agents and applications powered by LLMs—with built-in capabilities for task planning, file systems for context management, subagent-spawning, and long-term memory. You can use deep agents for any task, including complex, multi-step tasks. Deep Agents is an “agent harness”. It is the same core tool calling loop as other agent frameworks, but with built-in capabilities that make agents reliable for real tasks:

Take actions in an environment

Take actions via tools, read and write files, execute code

Connect to your data

Load memories, skills, and domain knowledge at the right moment

Manage growing context

Summarize history and offload large results across long runs

Parallelize tasks

Delegate to general or specialized subagents running in isolated context windows

Stay in the loop

Pause for human approval at critical decision points

Improve over time

Update memory, skills, and prompts based on real usage
See Harness capabilities for a full breakdown of each component.
The LangSmith Engine detects issues in your Deep Agents traces and proposes fixes. You can open a pull request with the proposed fix directly from the Engine tab.
deepagents is a standalone library built on top of LangChain’s core building blocks for agents. It uses the LangGraph runtime for durable execution, streaming, human-in-the-loop, and other features. The deepagents repository contains:
  • Deep Agents SDK: A package for building agents that can handle any task
  • Deep Agents Code: A terminal coding agent built on the Deep Agents SDK
  • ACP integration: An Agent Client Protocol connector for using deep agents in code editors like Zed
LangChain is the framework that provides the core building blocks for your agents. To learn more about the differences between LangChain, LangGraph, and Deep Agents, see Frameworks, runtimes, and harnesses. For a side-by-side comparison with Anthropic’s harness, see Deep Agents vs. Claude Agent SDK.

Create a deep agent

# pip install -qU deepagents langchain-google-genai
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="google_genai:gemini-3.5-flash",
    tools=[get_weather],
    system_prompt="You are a helpful assistant",
)

# Run the agent
agent.invoke(
    {"messages": [{"role": "user", "content": "what is the weather in sf"}]}
)
See the Quickstart and Customization guide to get started building your own agents and applications with Deep Agents.
Trace requests, debug agent behavior, and evaluate outputs with LangSmith. Follow the tracing quickstart to get set up. When ready for production, deploy to LangSmith Cloud for managed hosting.

Core capabilities

Use the Deep Agents SDK to build agents that handle complex, multi-step tasks across any model provider. The SDK ships with the following built-in capabilities:

Planning and task decomposition

A built-in write_todos tool lets agents break down complex tasks into discrete steps, track progress, and adapt plans as new information emerges.

Context management

Built-in context compression offloads large tool inputs and results to the virtual filesystem and summarizes older messages to keep agents effective across extended sessions.

Pluggable filesystem backends

Swap the virtual filesystem via pluggable backends: in-memory state, local disk, LangGraph store, composite routing, or a custom backend with permission rules for read and write access.

Shell execution

Shell-capable backends add an execute tool for tests, builds, git operations, and system tasks. Use LocalShellBackend on the host for local development, or a sandbox backend when you need isolation from your host system.

Interpreters

Add an interpreter to run JavaScript in an in-memory runtime. Interpreters let agents compose tools programmatically, orchestrate subagents, and transform structured data without a full shell environment.

Subagent spawning

A built-in task tool spawns general-purpose or specialized subagents for context isolation on subtasks. For long-running or parallel work, async subagents run in the background with progress checks, follow-ups, and cancellation.

Long-term memory

Persist memory across threads and conversations using LangGraph’s Memory Store.

Filesystem permissions

Declare permission rules that control which files and directories agents can read or write. Subagents can inherit or override the parent’s rules.

Human-in-the-loop

Configure human approval for sensitive tool operations using LangGraph’s interrupt capabilities.

Skills

Extend agents with reusable skills that provide specialized workflows, domain knowledge, and custom instructions.

Smart defaults

Ships with opinionated system prompts that teach the model to plan before acting, verify work, and manage context. Customize or replace the defaults as needed.
For building custom agents without these builtin capabilities, consider using LangChain’s create_agent or building a custom LangGraph workflow.

Get started

Quickstart

Build your first deep agent

Customization

Learn about customization options

Models

Configure models and providers

Backends

Choose and configure pluggable filesystem backends

Sandboxes

Execute code in isolated environments

Interpreters

Compose tools and transform data in QuickJS

Permissions

Control filesystem access with permission rules

Human-in-the-loop

Configure approval for sensitive operations

Code

Use Deep Agents Code

ACP

Use deep agents in code editors via ACP

Reference

See the deepagents API reference