← Back to BlogAIFrameworks

DeepAgents from LangChain: Planning, Filesystem Access, and Subagent Spawning

H.··4 min read

LangChain's new DeepAgents framework is the most interesting thing they have shipped in a while. It is not another chain abstraction or prompt template library. It is a full agent harness with hierarchical planning, filesystem access, and the ability to spawn subagents for parallel work. If you have been frustrated with LangChain's previous agent implementations (and who has not been), DeepAgents is worth a fresh look.

The Planning Layer

Previous LangChain agents operated in a flat loop: think, act, observe, repeat. DeepAgents introduces hierarchical planning. The agent first creates a high-level plan, then breaks each step into subtasks, then executes subtasks while tracking progress against the plan. If a subtask fails or reveals new information, the agent can revise the plan dynamically.

This sounds like what every "planning agent" claims to do, but DeepAgents actually implements it well. The key difference is that the plan is a concrete data structure, not just text in the conversation. You can inspect it, modify it programmatically, set constraints on it, and use it for progress tracking. The agent's planning and execution are separate concerns with a clean interface between them.

In practice, this means you can give a DeepAgent a complex task like "audit this codebase for security vulnerabilities, prioritize by severity, and generate fix PRs for the top 5" and it will create a plan (scan dependencies, analyze auth flows, check input validation, review secrets management), execute each phase, and maintain coherence across the entire workflow.

Filesystem As a First-Class Citizen

DeepAgents treats the filesystem as a core capability rather than an optional tool. Every agent gets a sandboxed workspace on disk where it can read, write, create directories, and manage files. This workspace persists across agent invocations and can be shared between agents.

Why does this matter? Because most real agent work involves files. You are generating reports, processing documents, writing code, creating configurations, building artifacts. Having the filesystem as a core primitive instead of an afterthought means the agent can work naturally with files instead of trying to hold everything in the conversation context.

The sandboxing is important. DeepAgents uses a chroot-like isolation (actual implementation varies by platform) so agents cannot access files outside their workspace. You can grant specific read-only paths for input data, but the agent's write access is strictly contained. This is the kind of safety guardrail that matters when you are running agents in production.

Subagent Spawning

This is the feature that got me excited. A DeepAgent can spawn child agents with their own tool sets, context, and instructions. The parent agent delegates work, the child agent executes independently, and results flow back to the parent.

The use cases are obvious once you see it. Need to process 50 files in parallel? Spawn 50 subagents. Need to compare approaches? Spawn two subagents with different strategies and pick the better result. Need specialized capabilities? Spawn a subagent with a different model or tool set.

The implementation handles the hard parts - resource limits on how many subagents can run simultaneously, timeout handling for agents that hang, result aggregation, and error propagation. If a subagent fails, the parent gets the error context and can decide whether to retry, work around it, or fail the overall task.

I tested subagent spawning on a real workload - processing a batch of 30 customer support tickets, categorizing each, drafting responses, and generating a summary report. The parent agent planned the workflow, spawned subagents for ticket processing (5 at a time), aggregated results, and produced the report. Total time: 3 minutes. Sequential processing with a single agent: 22 minutes.

The LangChain Baggage

DeepAgents is technically part of the LangChain ecosystem, and it carries some of that baggage. The abstraction layers can be deep. The documentation assumes familiarity with LangChain concepts. The dependency tree is heavier than I would like.

But the core ideas - hierarchical planning, filesystem-native agents, subagent spawning - are implemented well enough that the framework overhead is worth it. You can also use DeepAgents with minimal LangChain dependencies if you are careful about imports.

Verdict

DeepAgents is the first LangChain project in a while that I would recommend without caveats. The planning layer is genuinely useful for complex tasks. The filesystem integration eliminates a whole class of workarounds. And subagent spawning unlocks parallelism that single-agent architectures cannot achieve. If you have been building agents and hitting the ceiling of what a single agent loop can do, this is the tool you need.

Related Reading

Get Your AI Agent Running

We handle the entire setup — deploy, configure, and secure OpenClaw so you don't have to.

  • Fully deployed in 48 hours
  • All channels — Slack, Telegram, WhatsApp
  • Security hardened from day one
  • 14-day hypercare included

One-time setup

$999

Complete setup, no recurring fees