# deepagents | LangChain | Knowledge Base | Instagit

Agent harness built with LangChain and LangGraph. Equipped with a planning tool, a filesystem backend, and the ability to spawn subagents - well-equipped to handle complex agentic tasks.

GitHub Stars: 13.5k

Repository: https://github.com/langchain-ai/deepagents

---

## Articles

### [How to Add Custom Middleware to the Deep Agent Execution Stack](/langchain-ai/deepagents/how-can-i-implement-and-add-custom-middleware-to-the-deep-agent-execution-stack)

Learn to add custom middleware to the Deep Agent execution stack by subclassing AgentMiddleware and overriding hooks. Enhance your agent's functionality today.

- Tags: how-to-guide
- Published: 2026-03-17

### [Security Model and Isolation Strategy for Execute Command Sandboxing in DeepAgents](/langchain-ai/deepagents/what-is-the-security-model-and-isolation-strategy-employed-for-the-execute-command-sandboxing)

Explore the three-layer security model for DeepAgents execute command sandboxing, featuring container isolation, secure payloads, and configurable timeouts. Learn how it prevents command injection.

- Tags: security-model
- Published: 2026-03-17

### [How the Harbor Framework Facilitates Evaluation and Benchmarking of Agent Performance](/langchain-ai/deepagents/how-does-the-harbor-framework-facilitate-the-evaluation-and-benchmarking-of-agent-performance)

Discover how the Harbor framework simplifies agent evaluation and benchmarking. It runs Deep Agents in isolated sandboxes, executes benchmarks, and records traces for deterministic scoring and analysis.

- Tags: deep-dive
- Published: 2026-03-17

### [How to Migrate Agent Logic from the DeepAgents SDK to the CLI for Interactive Development](/langchain-ai/deepagents/what-is-the-recommended-approach-for-migrating-agent-logic-from-the-sdk-to-the-cli-for-interactive-development)

Migrate agent logic from DeepAgents SDK to CLI using create_cli_agent for interactive development. Enjoy automatic middleware setup, interactive prompts, and Textual UI configuration.

- Tags: migration-guide
- Published: 2026-03-17

### [TodoListMiddleware vs Other Planning Tools in DeepAgents: Key Functional Differences](/langchain-ai/deepagents/what-is-the-functional-difference-between-todolistmiddleware-and-other-planning-tools-within-deepagents)

Discover the functional differences between TodoListMiddleware and other planning tools in DeepAgents. Learn how TodoListMiddleware's dedicated checklist API contrasts with auxiliary workflows in SubAgentMiddleware and HumanInT...

- Tags: comparison
- Published: 2026-03-17

### [DeepAgents Prompt Caching for Anthropic: Reducing LLM Latency with Automatic Middleware](/langchain-ai/deepagents/does-deepagents-support-prompt-caching-strategies-for-providers-like-anthropic-to-reduce-latency)

Reduce Anthropic LLM latency with DeepAgents prompt caching. Automatically cache Claude API responses to eliminate redundant calls and speed up your agents without manual setup.

- Tags: how-to-guide
- Published: 2026-03-17

### [How to Configure the interrupt_on Parameter in DeepAgents for Human-in-the-Loop Workflows](/langchain-ai/deepagents/how-do-i-configure-the-interrupt-on-parameter-in-middleware-for-custom-human-approval-workflows)

Learn to configure the interrupt_on parameter in DeepAgents for custom human approval workflows. This guide explains how to set up middleware for efficient human-in-the-loop processes.

- Tags: how-to-guide
- Published: 2026-03-17

### [Deep Agents CLI Configuration Options for Remote Sandboxing Environments Like Daytona](/langchain-ai/deepagents/what-are-the-configuration-options-for-integrating-the-cli-with-remote-sandboxing-environments-like-daytona)

Explore Deep Agents CLI configuration options for remote sandboxing with Daytona. Learn to use --sandbox --sandbox-id and --sandbox-setup flags for seamless integration.

- Tags: how-to-guide
- Published: 2026-03-17

### [How the DeepAgents CLI Manages Persistent Agent Sessions and Stateful Memory](/langchain-ai/deepagents/how-does-the-deepagents-cli-manage-persistent-agent-sessions-and-stateful-memory)

Discover how the DeepAgents CLI manages persistent agent sessions and stateful memory by saving LangGraph checkpoints to SQLite and injecting user defined memory files into system prompts.

- Tags: how-to-guide
- Published: 2026-03-17

### [PatchToolCallsMiddleware: Ensuring Tool Call Consistency in DeepAgents](/langchain-ai/deepagents/what-is-the-purpose-and-usage-of-the-patchtoolcallsmiddleware-in-the-agent-execution-pipeline)

Discover PatchToolCallsMiddleware in DeepAgents to ensure tool call consistency and message history integrity in your agent pipelines automatically. Learn how it handles missing tool responses.

- Tags: internals
- Published: 2026-03-17

### [How to Integrate a Custom Backend Implementation Using the BackendProtocol in DeepAgents](/langchain-ai/deepagents/how-do-i-integrate-a-custom-backend-implementation-using-the-backendprotocol-in-deepagents)

Learn to integrate a custom backend with BackendProtocol in DeepAgents. Implement the interface, override file operations, and pass it to DeepAgent for seamless integration.

- Tags: how-to-guide
- Published: 2026-03-17

### [How DeepAgents Implements Tool Retries and Error Recovery During Agent Execution](/langchain-ai/deepagents/what-mechanisms-does-deepagents-implement-for-tool-retries-and-error-recovery-during-agent-execution)

DeepAgents uses a tiered detect classify recover strategy with middleware for robust tool retries and error recovery without breaking agent execution. Learn how.

- Tags: internals
- Published: 2026-03-17

### [How the DeepAgents Filesystem Middleware Prevents Data Loss When Truncating Large Files](/langchain-ai/deepagents/how-does-the-filesystem-middleware-manage-potential-data-loss-with-large-file-truncation)

Learn how DeepAgents Filesystem Middleware protects against data loss during large file truncation by saving oversized results and enabling paginated reads. Ensure data integrity.

- Tags: internals
- Published: 2026-03-17

### [How to Create and Register Custom Skills with the SkillsMiddleware in DeepAgents](/langchain-ai/deepagents/what-is-the-process-for-creating-and-registering-custom-skills-with-the-skill-middleware)

Learn how to create and register custom skills with DeepAgents SkillsMiddleware. Scan skill directories and inject metadata into system prompts for enhanced capabilities.

- Tags: how-to-guide
- Published: 2026-03-17

### [Sync SubAgent vs AsyncSubAgent: Performance and Concurrency Deep-Dive in DeepAgents](/langchain-ai/deepagents/what-are-the-performance-and-concurrency-differences-between-sync-subagent-and-asyncsubagent)

Explore SyncSubAgent vs AsyncSubAgent performance and concurrency. Understand blocking vs background processing in DeepAgents for enhanced agent workflows.

- Tags: deep-dive
- Published: 2026-03-17

### [How to Configure HumanInTheLoopMiddleware for Granular Tool Approval Workflows](/langchain-ai/deepagents/how-can-i-configure-the-humaninthetloopmiddleware-for-granular-tool-approval-workflows)

Learn to configure HumanInTheLoopMiddleware for granular tool approval workflows. Intercept tool calls, inject HumanMessages for approval, and gain full control over agent operations. Enhance your Langchain app today.

- Tags: how-to-guide
- Published: 2026-03-17

### [How MemoryMiddleware Populates the System Prompt from AGENTS.md in DeepAgents](/langchain-ai/deepagents/how-does-the-memorymiddleware-populate-the-system-prompt-from-external-knowledge-sources-like-agents-md)

Learn how MemoryMiddleware populates the system prompt from AGENTS.md files, structuring and appending agent memory to LLM requests for enhanced context and performance.

- Tags: deep-dive
- Published: 2026-03-17

### [SubAgentMiddleware Architecture and Tool Dispatch Mechanism in DeepAgents](/langchain-ai/deepagents/what-is-the-underlying-architecture-of-the-subagentmiddleware-and-its-tool-dispatch-mechanism)

Explore the SubAgentMiddleware architecture and tool dispatch mechanism. Discover how it spawns isolated sub-agents for complex task execution and state updates in LangChain.

- Tags: architecture
- Published: 2026-03-17

### [AsyncSubAgentMiddleware State Management in Distributed LangGraph Deployments](/langchain-ai/deepagents/how-does-asyncsubagentmiddleware-handle-state-management-in-distributed-langgraph-deployments)

Discover how AsyncSubAgentMiddleware manages state in distributed LangGraph deployments. Learn about its specialized schema and reducer pattern for reliable job tracking across turns and restarts.

- Tags: deep-dive
- Published: 2026-03-17

### [How to Configure Sandbox Execution with SandboxBackendProtocol for Tool Execution in DeepAgents](/langchain-ai/deepagents/how-do-i-configure-sandbox-execution-with-sandboxbackendprotocol-for-tool-execution)

Configure sandbox execution with SandboxBackendProtocol in DeepAgents. Learn to set up providers, initialize sandboxes, and run isolated tool commands for secure agent operations.

- Tags: how-to-guide
- Published: 2026-03-17

### [StateBackend vs FilesystemBackend in DeepAgents: Storage Architecture Compared](/langchain-ai/deepagents/what-is-the-difference-between-statebackend-and-filesystembackend-in-deepagents)

Compare StateBackend vs FilesystemBackend in DeepAgents. Understand how StateBackend offers isolated agent state while FilesystemBackend ensures persistent storage.

- Tags: architecture
- Published: 2026-03-17

### [How create_deep_agent Integrates with LangGraph Checkpointing and Store](/langchain-ai/deepagents/how-does-create-deep-agent-integrate-with-langgraph-checkpointing-and-store)

Learn how create_deep_agent integrates with LangGraph checkpointing and store for stateful agent execution and cross-run data. Explore persistence with compiled graphs.

- Tags: deep-dive
- Published: 2026-03-17

