Workflow
Planning Tool
icon
Search documents
What are Deep Agents?
LangChainยท 2025-07-31 18:29
Deep Agent Characteristics - Deep agents utilize a planning tool to manage long-term tasks, enabling cohesive action over extended periods [3][5][9] - Sub-agents are employed to focus on specific areas, preserving context and allowing for specialized expertise, which can improve overall results [3][10][11][12][13][15] - A file system is used to offload context, preventing performance degradation of the LLM by storing and accessing information as needed [3][16][17][18] - Detailed system prompts, often hundreds or thousands of lines long, are crucial for guiding the agent's behavior and tool usage [3][21][22][23] Deep Agent Implementation - Deep agents operate using the same tool-calling loop as simpler agents, but are distinguished by their prompts and tools [3][4][5] - Planning tools can be simple, such as a "to-do write" tool that generates and modifies task lists within the model's context [7][8] - Sub-agents can have specialized expertise and different permissions, allowing for focused work and better results [13][14] - File systems allow agents to manage context by referencing files instead of directly including large observations in the LLM context [17][18] Deep Agent Benefits - Deep agents are capable of handling longer time horizon and more complex tasks compared to naive LLM implementations [4][5] - Sub-agents facilitate context preservation, preventing the main agent's context from being polluted by sub-tasks and vice versa [11][12] - Reusable sub-agents can be created and used across different agents, promoting efficiency and modularity [14]