Deep agents use a modular middleware architecture where each core capability is implemented as composable middleware. This design allows you to customize agent behavior by adding, removing, or modifying middleware.
Learn more: For architecture details and customization patterns, see the Middleware documentation.
Create middleware that provides built-in filesystem tools and optional custom prompt guidance.
By default, the middleware registers every built-in filesystem tool listed in FILESYSTEM_TOOL_NAMES. Use
Create subagent middleware with task tool
Create middleware for loading agent memory from AGENTS.md files.
Loads memory content from configured sources and injects into the system prompt. Supports multiple sources that are combined together.
Create summarization middleware with backend support for conversation history offloading.
This middleware:
Create backend-agnostic middleware for loading and exposing agent skills.
This middleware loads skills from configurable backend sources and injects skill metadata into the system prompt. It implemen
Create middleware for loading agent-specific long-term memory.
This middleware loads the agent's long-term memory from a file (agent.md) and injects it into the system prompt. The memory is loaded on
Options for creating filesystem middleware.
Options for creating subagent middleware
Options for the memory middleware.
Options for the agent memory middleware.
Options for the summarization middleware.
Options for the skills middleware.