Deep Agents/Overview
★ OverviewIntermediate12 min

Deep Agents SDK: The Agent Harness

Deep Agents is the third layer of the LangChain stack — an agent harness with built-in planning, virtual filesystem, subagent spawning, and context engineering. The bridge from create_agent to production-grade autonomous agents.

Quick Reference

  • Three-tier model: LangChain (framework) → LangGraph (runtime) → Deep Agents (harness)
  • create_deep_agent() adds planning (write_todos), filesystem (read/write/edit files), and subagent spawning
  • Pluggable filesystem backends: in-memory, local disk, LangGraph store, sandboxes (Modal, Daytona, Deno)
  • Built-in context engineering: automatic offloading (>20K tokens) and summarization (85% window)
  • Model-agnostic: 100+ providers via LangChain init_chat_model
  • Deep Agents CLI: terminal coding agent built on the SDK

Where Deep Agents Fits

Deep AgentsAgent HarnessPlanningFilesystemSubagentsContext Mgmtbuilt onLangGraphAgent RuntimePersistenceStreamingHITLDurable Execbuilt onLangChainAgent FrameworkModelsToolsStructured OutputMiddleware

LangChain (abstractions) → LangGraph (runtime) → Deep Agents (batteries-included harness)

LayerPackageWhat It ProvidesEntry Point
FrameworklangchainModel abstraction, tools, structured output, middlewarecreate_agent()
RuntimelanggraphDurable execution, persistence, streaming, HITLStateGraph / @entrypoint
HarnessdeepagentsPlanning, filesystem, subagents, context managementcreate_deep_agent()

create_agent gives you a tool-calling agent. create_deep_agent gives you an agent that can plan multi-step tasks, manage files as working memory, spawn subagents for context isolation, and automatically manage its context window. It's the difference between a chatbot and an autonomous worker.

When to use which

Use create_agent for conversational agents, Q&A bots, and simple tool-calling tasks. Use create_deep_agent when the agent needs to plan, research, write multi-file outputs, or run for more than a few turns autonomously.