Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
langchain-ai avatar

Deep Agents Core

  • 11.2k installs
  • 1.1k repo stars
  • Updated July 30, 2026
  • langchain-ai/langchain-skills

Framework + middleware patterns for building multi-step LLM agents with task planning, memory, file management, and delegation.

About

Deep Agents is an opinionated LangChain/LangGraph framework providing built-in middleware for task planning, context management, memory persistence, and human approval workflows. Developers use it to scaffold complex agent applications with TodoListMiddleware for task decomposition, FilesystemMiddleware for file-based context, SubAgentMiddleware for delegating work to specialized agents, and SkillsMiddleware for on-demand capability loading. Key workflows include configuring create_deep_agent() with tools, system prompts, subagents, storage backends, and interrupts; designing SKILL.md files for progressive disclosure; and maintaining conversation state via thread IDs and checkpointers.

  • Built-in middleware: task planning, filesystem context, subagent delegation, memory, human approval, skills
  • Progressive skill loading via SKILL.md format - agents fetch task-specific docs on demand
  • Persistent memory across threads using Store + checkpointer for multi-turn conversations
  • Filesystem and Store backends support both local and serverless deployments
  • Interrupt framework for human-in-the-loop approval on sensitive operations like file writes

Deep Agents Core by the numbers

  • 11,247 all-time installs (skills.sh)
  • +394 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #73 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

deep-agents-core capabilities & compatibility

Capabilities
task planning and decomposition via todolistmidd · file based context management with pluggable bac · subagent spawning and delegation with specialize · persistent memory across threads via store · human in the loop approval for sensitive operati · on demand skill loading with skill.md progressiv
Works with
github
Use cases
orchestration · code review · planning · project management
Platforms
macOS · Windows · Linux · WSL
Runs
Local or remote
Pricing
Free
From the docs

What deep-agents-core says it does

INVOKE THIS SKILL when building ANY Deep Agents application. Covers create_deep_agent(), harness architecture, SKILL.md format, and configuration options.
description
The agent harness provides these capabilities automatically - you configure, not implement.
overview
Use consistent thread_id to maintain conversation context across invocations.
fix-thread-id-for-conversations
npx skills add https://github.com/langchain-ai/langchain-skills --skill deep-agents-core

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs11.2k
repo stars1.1k
Security audit3 / 3 scanners passed
Last updatedJuly 30, 2026
Repositorylangchain-ai/langchain-skills

What it does

Build multi-step LLM agents with planning, memory, file management, and task delegation using Deep Agents framework.

Who is it for?

Multi-step tasks requiring planning, large context via files, specialized subagents, persistent memory across sessions.

Skip if: Simple single-purpose tasks, single-session ephemeral work, agents that fit entire context in one prompt.

When should I use this skill?

Building any Deep Agents application, configuring middleware, designing skills, setting up memory persistence.

What you get

Deploy scalable agent applications with planning, memory, approval workflows, and modular skills.

  • configured deep agent app
  • middleware stack
  • SKILL.md integration

By the numbers

  • 6 core middleware types: TodoList, Filesystem, SubAgent, HumanInTheLoop, Skills, Memory
  • 3 built-in tools: write_todos, task, filesystem (ls/read/write/edit/glob/grep)
  • 2 backend strategies: FilesystemBackend for local, StoreBackend for serverless/distributed

Files

SKILL.mdMarkdownGitHub ↗

<overview> Deep Agents are an opinionated agent framework built on LangChain/LangGraph with built-in middleware:

  • Task Planning: TodoListMiddleware for breaking down complex tasks
  • Context Management: Filesystem tools with pluggable backends
  • Task Delegation: SubAgent middleware for spawning specialized agents
  • Long-term Memory: Persistent storage across threads via Store
  • Human-in-the-loop: Approval workflows for sensitive operations
  • Skills: On-demand loading of specialized capabilities

The agent harness provides these capabilities automatically - you configure, not implement. </overview>

<when-to-use>

Use Deep Agents WhenUse LangChain's create_agent When
Multi-step tasks requiring planningSimple, single-purpose tasks
Large context requiring file managementContext fits in a single prompt
Need for specialized subagentsSingle agent is sufficient
Persistent memory across sessionsEphemeral, single-session work

</when-to-use>

<middleware-selection>

If you need to...MiddlewareNotes
Track complex tasksTodoListMiddlewareDefault enabled
Manage file contextFilesystemMiddlewareConfigure backend
Delegate workSubAgentMiddlewareAdd custom subagents
Add human approvalHumanInTheLoopMiddlewareRequires checkpointer
Load skillsSkillsMiddlewareProvide skill directories
Access memoryMemoryMiddlewareRequires Store instance

</middleware-selection>

<ex-basic-agent> <python> Create a basic deep agent with a custom tool and invoke it with a user message.

from deepagents import create_deep_agent
from langchain.tools import tool

@tool
def get_weather(city: str) -> str:
    """Get the weather for a given city."""
    return f"It is always sunny in {city}"

agent = create_deep_agent(
    model="claude-sonnet-4-5-20250929",
    tools=[get_weather],
    system_prompt="You are a helpful assistant"
)

config = {"configurable": {"thread_id": "user-123"}}
result = agent.invoke({
    "messages": [{"role": "user", "content": "What's the weather in Tokyo?"}]
}, config=config)

</python> <typescript> Create a basic deep agent with a custom tool and invoke it with a user message.

import { createDeepAgent } from "deepagents";
import { tool } from "@langchain/core/tools";
import { z } from "zod";

const getWeather = tool(
  async ({ city }) => `It is always sunny in ${city}`,
  { name: "get_weather", description: "Get weather for a city", schema: z.object({ city: z.string() }) }
);

const agent = await createDeepAgent({
  model: "claude-sonnet-4-5-20250929",
  tools: [getWeather],
  systemPrompt: "You are a helpful assistant"
});

const config = { configurable: { thread_id: "user-123" } };
const result = await agent.invoke({
  messages: [{ role: "user", content: "What's the weather in Tokyo?" }]
}, config);

</typescript> </ex-basic-agent>

<ex-full-configuration> <python> Configure a deep agent with all available options including subagents, skills, and persistence.

from deepagents import create_deep_agent
from deepagents.backends import FilesystemBackend
from langgraph.checkpoint.memory import MemorySaver
from langgraph.store.memory import InMemoryStore

agent = create_deep_agent(
    name="my-assistant",
    model="claude-sonnet-4-5-20250929",
    tools=[custom_tool1, custom_tool2],
    system_prompt="Custom instructions",
    subagents=[research_agent, code_agent],
    backend=FilesystemBackend(root_dir=".", virtual_mode=True),
    interrupt_on={"write_file": True},
    skills=["./skills/"],
    checkpointer=MemorySaver(),
    store=InMemoryStore()
)

</python> <typescript> Configure a deep agent with all available options including subagents, skills, and persistence.

import { createDeepAgent, FilesystemBackend } from "deepagents";
import { MemorySaver, InMemoryStore } from "@langchain/langgraph";

const agent = await createDeepAgent({
  name: "my-assistant",
  model: "claude-sonnet-4-5-20250929",
  tools: [customTool1, customTool2],
  systemPrompt: "Custom instructions",
  subagents: [researchAgent, codeAgent],
  backend: new FilesystemBackend({ rootDir: ".", virtualMode: true }),
  interruptOn: { write_file: true },
  skills: ["./skills/"],
  checkpointer: new MemorySaver(),
  store: new InMemoryStore()
});

</typescript> </ex-full-configuration>

<built-in-tools> Every deep agent has access to:

1. Planning: write_todos - Track multi-step tasks 2. Filesystem: ls, read_file, write_file, edit_file, glob, grep 3. Delegation: task - Spawn specialized subagents </built-in-tools>

---

SKILL.md Format

<skill-md-format> Skills use progressive disclosure - agents only load content when relevant.

Directory Structure

skills/
└── my-skill/
    ├── SKILL.md        # Required: main skill file
    ├── examples.py     # Optional: supporting files
    └── templates/      # Optional: templates

SKILL.md Format

---
name: my-skill
description: Clear, specific description of what this skill does
---

# Skill Name

## Overview
Brief explanation of the skill's purpose.

## When to Use
Conditions when this skill applies.

## Instructions
Step-by-step guidance for the agent.

</skill-md-format>

<skills-vs-memory>

SkillsMemory (AGENTS.md)
On-demand loadingAlways loaded at startup
Task-specific instructionsGeneral preferences
Large documentationCompact context
SKILL.md in directoriesSingle AGENTS.md file

</skills-vs-memory>

<ex-skills-with-filesystem-backend> <python> Set up an agent with skills directory and filesystem backend for on-demand skill loading.

from deepagents import create_deep_agent
from deepagents.backends import FilesystemBackend
from langgraph.checkpoint.memory import MemorySaver

agent = create_deep_agent(
    backend=FilesystemBackend(root_dir=".", virtual_mode=True),
    skills=["./skills/"],
    checkpointer=MemorySaver()
)

result = agent.invoke({
    "messages": [{"role": "user", "content": "Use the python-testing skill"}]
}, config={"configurable": {"thread_id": "session-1"}})

</python> <typescript> Set up an agent with skills directory and filesystem backend for on-demand skill loading.

import { createDeepAgent, FilesystemBackend } from "deepagents";
import { MemorySaver } from "@langchain/langgraph";

const agent = await createDeepAgent({
  backend: new FilesystemBackend({ rootDir: ".", virtualMode: true }),
  skills: ["./skills/"],
  checkpointer: new MemorySaver()
});

const result = await agent.invoke({
  messages: [{ role: "user", content: "Use the python-testing skill" }]
}, { configurable: { thread_id: "session-1" } });

</typescript> </ex-skills-with-filesystem-backend>

<ex-skills-with-store-backend> <python> Load skill content into a Store backend for environments without filesystem access.

from deepagents import create_deep_agent
from deepagents.backends import StoreBackend
from deepagents.backends.utils import create_file_data
from langgraph.store.memory import InMemoryStore

store = InMemoryStore()

# Load skill content into store
skill_content = """---
name: python-testing
description: Best practices for Python testing with pytest
---
# Python Testing Skill
..."""

store.put(
    namespace=("filesystem",),
    key="/skills/python-testing/SKILL.md",
    value=create_file_data(skill_content)
)

agent = create_deep_agent(
    backend=lambda rt: StoreBackend(rt),
    store=store,
    skills=["/skills/"]
)

</python> </ex-skills-with-store-backend>

<boundaries>

What Agents CAN Configure

  • Model selection and parameters
  • Additional custom tools
  • System prompt customization
  • Backend storage strategy
  • Which tools require approval
  • Custom subagents with specialized tools

What Agents CANNOT Configure

  • Core middleware removal (TodoList, Filesystem, SubAgent always present)
  • The write_todos, task, or filesystem tool names
  • The SKILL.md frontmatter format

</boundaries>

<fix-checkpointer-for-interrupts> <python> Interrupts require a checkpointer.

# WRONG
agent = create_deep_agent(interrupt_on={"write_file": True})

# CORRECT
agent = create_deep_agent(interrupt_on={"write_file": True}, checkpointer=MemorySaver())

</python> <typescript> Interrupts require a checkpointer.

// WRONG
const agent = await createDeepAgent({ interruptOn: { write_file: true } });

// CORRECT
const agent = await createDeepAgent({ interruptOn: { write_file: true }, checkpointer: new MemorySaver() });

</typescript> </fix-checkpointer-for-interrupts>

<fix-store-for-memory> <python> StoreBackend requires a Store instance for persistent memory across threads.

# WRONG
agent = create_deep_agent(backend=lambda rt: StoreBackend(rt))

# CORRECT
agent = create_deep_agent(backend=lambda rt: StoreBackend(rt), store=InMemoryStore())

</python> <typescript> StoreBackend requires a Store instance for persistent memory across threads.

// WRONG
const agent = await createDeepAgent({ backend: (config) => new StoreBackend(config) });

// CORRECT
const agent = await createDeepAgent({ backend: (config) => new StoreBackend(config), store: new InMemoryStore() });

</typescript> </fix-store-for-memory>

<fix-thread-id-for-conversations> <python> Use consistent thread_id to maintain conversation context across invocations.

# WRONG: Each invocation is isolated
agent.invoke({"messages": [{"role": "user", "content": "Hi"}]})
agent.invoke({"messages": [{"role": "user", "content": "What did I say?"}]})

# CORRECT
config = {"configurable": {"thread_id": "user-123"}}
agent.invoke({"messages": [...]}, config=config)
agent.invoke({"messages": [...]}, config=config)

</python> <typescript> Use consistent thread_id to maintain conversation context across invocations.

// WRONG: Each invocation is isolated
await agent.invoke({ messages: [{ role: "user", content: "Hi" }] });
await agent.invoke({ messages: [{ role: "user", content: "What did I say?" }] });

// CORRECT
const config = { configurable: { thread_id: "user-123" } };
await agent.invoke({ messages: [...] }, config);
await agent.invoke({ messages: [...] }, config);

</typescript> </fix-thread-id-for-conversations>

<fix-frontmatter-required>

# WRONG: Missing frontmatter in SKILL.md
# My Skill
This is my skill...

# CORRECT: Include YAML frontmatter
---
name: my-skill
description: Python testing best practices with pytest fixtures and mocking
---
# My Skill
This is my skill...

</fix-frontmatter-required>

<fix-backend-for-skills> <python> Skills require a proper backend to load from the filesystem.

# WRONG: Skills won't load without proper backend
agent = create_deep_agent(skills=["./skills/"])

# CORRECT: Use FilesystemBackend for local skills
agent = create_deep_agent(
    backend=FilesystemBackend(root_dir=".", virtual_mode=True),
    skills=["./skills/"]
)

</python> </fix-backend-for-skills>

<fix-specific-skill-descriptions> Use specific descriptions to help agents decide when to use a skill.

# WRONG: Vague description
---
name: helper
description: Helpful skill
---

# CORRECT: Specific description
---
name: python-testing
description: Python testing best practices with pytest fixtures, mocking, and async patterns
---

</fix-specific-skill-descriptions>

<fix-subagent-skills> <python> Skills are not inherited by subagents - provide them explicitly.

# WRONG: Custom subagents don't inherit skills
agent = create_deep_agent(
    skills=["/main-skills/"],
    subagents=[{"name": "helper", ...}]  # No skills
)

# CORRECT: Provide skills explicitly
agent = create_deep_agent(
    skills=["/main-skills/"],
    subagents=[{"name": "helper", "skills": ["/helper-skills/"], ...}]
)

</python> </fix-subagent-skills>

Related skills

Forks & variants (1)

Deep Agents Core has 1 known copy in the catalog totaling 43 installs. They canonicalize to this original listing.

FAQ

When should I use Deep Agents vs LangChain's create_agent?

Use Deep Agents for multi-step tasks, file context, subagents, or persistent memory. Use create_agent for simple single-purpose tasks.

How do I maintain conversation context across multiple agent invocations?

Pass a consistent thread_id in the config object: {configurable: {thread_id: 'user-123'}}

Do subagents automatically inherit parent agent skills?

No. Provide skills explicitly to each subagent via the skills parameter.

Is Deep Agents Core safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.