# deepagents > Specialized skill for building and troubleshooting agents using the DeepAgents framework. Use this skill when users need to develop agents with planning capabilities, file system tools, or subagent delegation for complex, multi-step tasks. This skill covers creating deep agents, configuring middleware, implementing persistent memory, setting up human-in-the-loop approval flows, and troubleshooting common errors in Python. - Author: cincly - Repository: rzte/skills - Version: 20251222100700 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-07 - Source: https://github.com/rzte/skills - Web: https://mule.run/skillshub/@@rzte/skills~deepagents:20251222100700 --- --- name: deepagents description: "Specialized skill for building and troubleshooting agents using the DeepAgents framework. Use this skill when users need to develop agents with planning capabilities, file system tools, or subagent delegation for complex, multi-step tasks. This skill covers creating deep agents, configuring middleware, implementing persistent memory, setting up human-in-the-loop approval flows, and troubleshooting common errors in Python." --- # DeepAgents Framework This skill provides comprehensive guidance for developing with DeepAgents, a framework for building sophisticated agents that can tackle complex, multi-step tasks with planning capabilities, file systems for context management, and the ability to spawn subagents. ## Core Capabilities - Create agents with planning, file system, and subagent capabilities - Implement persistent memory across conversation threads - Configure specialized subagents for different tasks - Set up human-in-the-loop approval for sensitive operations - Troubleshoot common implementation issues ## Quickstart ```python from deepagents import create_deep_agent # Create a basic deep agent agent = create_deep_agent( system_prompt="You are a helpful assistant with planning capabilities." ) # Use the agent result = agent.invoke({ "messages": [{"role": "user", "content": "What is the capital of France?"}] }) print(result["messages"][-1].content) ``` ## Installation ```bash # Basic installation pip install deepagents # With web search capabilities pip install deepagents tavily-python # For human-in-the-loop features pip install langgraph-checkpoint ``` ## Framework Structure DeepAgents is built on a modular middleware architecture: 1. **TodoListMiddleware** - Planning tool for tracking and updating tasks 2. **FilesystemMiddleware** - Tools for reading, writing, and managing files 3. **SubAgentMiddleware** - Tools for delegating to specialized subagents ## Core Concepts ### Creating a Deep Agent The `create_deep_agent()` function is the primary entry point: ```python from deepagents import create_deep_agent from langchain.tools import tool @tool def search_web(query: str) -> str: """Search the web for information.""" return f"Results for {query}..." agent = create_deep_agent( model="claude-sonnet-4-5-20250929", # Optional: specify model system_prompt="You are a helpful assistant.", # Optional: custom instructions tools=[search_web], # Optional: additional tools backend=None, # Optional: custom filesystem backend subagents=[], # Optional: subagent definitions interrupt_on={}, # Optional: human-in-the-loop config store=None, # Optional: persistent store checkpointer=None # Optional: required for human-in-the-loop ) ``` For complete parameter details, see [references/api_reference.md](references/api_reference.md). ### Built-in Tools Every deep agent has access to these built-in tools: 1. **Planning tool**: - `write_todos` - Update the agent's to-do list 2. **File system tools**: - `ls` - List directory contents - `read_file` - Read a file - `write_file` - Create a new file - `edit_file` - Edit an existing file - `glob` - Find files matching a pattern - `grep` - Search file contents 3. **Subagent tool**: - `task` - Delegate work to a specialized subagent ### Storage Backends DeepAgents supports multiple storage backends for file operations: 1. **StateBackend** (default) - Ephemeral storage in agent state 2. **FilesystemBackend** - Real filesystem access 3. **StoreBackend** - Persistent cross-conversation storage 4. **CompositeBackend** - Route different paths to different backends For backend configuration examples, see [references/storage_backends.md](references/storage_backends.md). ## Implementation Patterns For specific implementation scenarios, refer to these guides: - [Building agents with web search](references/web_search.md) - [Implementing persistent memory](references/persistent_memory.md) - [Creating specialized subagents](references/subagents.md) - [Setting up human-in-the-loop approval](references/human_approval.md) ## Troubleshooting For common errors and solutions, see [references/troubleshooting.md](references/troubleshooting.md). ## CLI Usage DeepAgents includes a CLI for interactive agent sessions with persistent memory: ```bash # Install the CLI pip install deepagents-cli # Start a session uvx deepagents-cli # With named agent (separate memory) uvx deepagents-cli --agent researcher ``` For complete CLI documentation, see [references/cli_usage.md](references/cli_usage.md).