langchain-ai avatar

Deep Agents Orchestration

This covers Deep Agents' three orchestration patterns: delegating work to specialized subagents via the task tool, planning complex workflows with todo lists, and requiring human approval for sensitive operations. The subagent delegation is especially useful when you need to isolate complex work or use specialized tools without cluttering your main agent's context. The examples show practical patterns like creating researcher subagents with custom tools, setting up approval workflows for database operations, and managing multi-step API development tasks. One thing to watch out for is that custom subagents don't inherit skills from the main agent, so you need to explicitly configure their capabilities.

skills.sh installs
16.8K
GitHub stars
1.3K
last updated
Aug 21, 2026

Install

$ npx -y skills add langchain-ai/langchain-skills --skill deep-agents-orchestration --agent claude-code

Installs into .claude/skills of the current project.

Files

Deep Agents include three orchestration capabilities:
  1. SubAgentMiddleware: Delegate work via task tool to specialized agents
  2. TodoListMiddleware: Plan and track tasks via write_todos tool
  3. HumanInTheLoopMiddleware: Require approval before sensitive operations

All three are automatically included in create_deep_agent().


Subagents (Task Delegation)

Use Subagents WhenUse Main Agent When
Task needs specialized toolsGeneral-purpose tools sufficient
Want to isolate complex workSingle-step operation
Need clean context for main agentContext bloat acceptable
Main agent has `task` tool -> creates fresh subagent -> subagent executes autonomously -> returns final report.

Default subagent: "general-purpose" - automatically available with same tools/config as main agent.

Create a custom "researcher" subagent with specialized tools for academic paper search.

Sponsors

Details

Repository
github.com/langchain-ai/langchain-skills
Categories
AI & Agent Building, Productivity & Planning, Automation & Workflows

More from langchain-ai/langchain-skills

All 15
1mcp-use avatarchatgpt-app-buildermcp-use/mcp-useBuild, modify, debug, or review ChatGPT Apps with mcp-use.9.4Kskills.sh installs
2langchain-ai avatarlangsmith-tracelangchain-ai/langsmith-skillsINVOKE THIS SKILL when working with LangSmith tracing OR querying traces. Covers adding tracing to applications and querying/exporting trace data. Uses the lang5Kskills.sh installs
3livekit avatarlivekit-agentslivekit/agent-skillsBuild voice AI agents with LiveKit Cloud and the Agents SDK. Use when the user asks to "build a voice agent", "create a LiveKit agent", "add voice AI", "impleme4.1Kskills.sh installs
4elastic avatarkibana-connectorselastic/agent-skillsCreate and manage Kibana connectors for Slack, PagerDuty, Jira, webhooks, and more via REST API or Terraform. Use when configuring third-party integrations or m2.9Kskills.sh installs
5launchdarkly avataraiconfig-createlaunchdarkly/agent-skillsaiconfig create2.3Kskills.sh installs
6launchdarkly avataraiconfig-toolslaunchdarkly/agent-skillsaiconfig tools2.3Kskills.sh installs